Skip to content

bump to net10; lighter Identity.Core dep (drops xml vuln) - #1

Merged
royashbrook merged 2 commits into
masterfrom
net10-bump
May 2, 2026
Merged

bump to net10; lighter Identity.Core dep (drops xml vuln)#1
royashbrook merged 2 commits into
masterfrom
net10-bump

Conversation

@royashbrook

Copy link
Copy Markdown
Owner

Summary

  • TargetFramework: net7.0 → net10.0
  • Microsoft.AspNetCore.Cryptography.KeyDerivation: 3.1.5 → 10.*
  • Microsoft.AspNetCore.Identity 2.2.0 → Microsoft.Extensions.Identity.Core 10.*

The full Microsoft.AspNetCore.Identity package pulls in System.Security.Cryptography.Xml (NU1903 — GHSA-37gx-xxp4-5rgx + GHSA-w3x6-4m5h-cxqf) which we don't use. Microsoft.Extensions.Identity.Core gives us PasswordHasherOptions / PasswordHasherCompatibilityMode (all the vendored PasswordHasher.cs references from Identity), without the heavy transitive graph. KeyDerivation handles PBKDF2 itself.

Vendored PasswordHasher behavior unchanged (still v3 SHA256/10000) — this is a build/runtime bump only, no crypto changes.

Test plan

  • dotnet build clean — 0 warnings, 0 errors
  • h test123 outputs AQAAAAEAACcQ... (v3 hash with SHA256/10000 marker)
  • h test123 hash returns True
  • h wrongpass hash returns False
  • Confirm dist.sh still publishes single-file binaries cleanly for win/linux/osx (untested locally — single-platform sanity passed)

🤖 Generated with Claude Code

royashbrook and others added 2 commits May 1, 2026 21:12
- 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>
@royashbrook
royashbrook merged commit 1b0c8f0 into master May 2, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant