bump to net10; lighter Identity.Core dep (drops xml vuln) - #1
Merged
Conversation
- TargetFramework: net7.0 -> net10.0 - Microsoft.AspNetCore.Cryptography.KeyDerivation: 3.1.5 -> 10.* - Microsoft.AspNetCore.Identity 2.2.0 -> Microsoft.Extensions.Identity.Core 10.* Microsoft.AspNetCore.Identity pulls in System.Security.Cryptography.Xml (known vulnerability NU1903 / GHSA-37gx-xxp4-5rgx + GHSA-w3x6-4m5h-cxqf) that we don't actually use. Microsoft.Extensions.Identity.Core gives us PasswordHasherOptions / PasswordHasherCompatibilityMode (which is all the vendored PasswordHasher.cs needs from Identity), without the heavy transitive graph. KeyDerivation handles the PBKDF2 itself. Built clean (0 warnings, 0 errors) and verified roundtrip: $ h test123 # -> AQAAAAEAACcQ... $ h test123 <that-hash> # -> True $ h wrongpass <that-hash> # -> False Vendored PasswordHasher behavior unchanged (still v3 SHA256/10000) — this is a build/runtime bump only, no crypto changes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replaces the disabled `test/Tests.cs.txt` (which asserted deterministic hashes from a non-deterministic function — couldn't have ever passed) with a real test/h.Tests project that exercises: - format/shape: 84-char base64, v3 marker prefix, varying salts - roundtrip: hash + verify across ASCII / symbols / unicode - known-good regression fixtures (verifying tamper-resistance) - tampered-hash failure cases - cross-tool compat: pwsh-generated hashes (matching format spec) must verify against this build — pins the format as our public contract for any external generator (e.g. frtl/frtl-bc's Get-PasswordHash.ps1) Test project compiles the vendored PasswordHasher sources directly rather than ProjectReference-ing the Exe — exercises the same code, avoids the awkwardness of taking a reference on an Exe project. Plus a minimal CI workflow (.github/workflows/ci.yml) runs `dotnet test` on push to main and every PR, so the next contributor gets a green/red signal automatically. $ dotnet test test/h.Tests Passed! - Failed: 0, Passed: 21, Skipped: 0 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TargetFramework: net7.0 → net10.0Microsoft.AspNetCore.Cryptography.KeyDerivation: 3.1.5 → 10.*Microsoft.AspNetCore.Identity2.2.0 →Microsoft.Extensions.Identity.Core10.*The full
Microsoft.AspNetCore.Identitypackage pulls inSystem.Security.Cryptography.Xml(NU1903 — GHSA-37gx-xxp4-5rgx + GHSA-w3x6-4m5h-cxqf) which we don't use.Microsoft.Extensions.Identity.Coregives usPasswordHasherOptions/PasswordHasherCompatibilityMode(all the vendoredPasswordHasher.csreferences from Identity), without the heavy transitive graph.KeyDerivationhandles PBKDF2 itself.Vendored
PasswordHasherbehavior unchanged (still v3 SHA256/10000) — this is a build/runtime bump only, no crypto changes.Test plan
🤖 Generated with Claude Code