fix: race-safe DP-keys cert provisioning + Dependabot ruleset unblock#37
Merged
Merged
Conversation
- ConfigurePlatformKeyProtection now writes dp-key-protection.pfx atomically (unique temp + File.Move) and retries transient IO/crypto, tolerating a concurrent writer by loading the winner's file. Fixes the intermittent File.WriteAllBytes failure under net10 parallel integration tests that hung Dependabot #34/#35. Verified 210/210 x3 locally; production unaffected. - CHANGELOG: the DP-keys fix + the master-ruleset required-checks swap (Analyze csharp/actions -> aggregate CodeQL, app 57789) that unblocked Dependabot PRs.
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
Two fixes from the net10 Dependabot fallout:
DP-keys race (code)
Program.ConfigurePlatformKeyProtectionnow provisionsdp-key-protection.pfxatomically (unique temp file +File.Move) and retries transient IO/crypto errors, tolerating a concurrent writer by loading the winner's file. Eliminates the intermittentFile.WriteAllBytesfailure under net10 parallel integration tests (eachWebApplicationFactorywrites its own cert; an AV/Defender scan of a fresh.pfxunder load could briefly lock it). Production builds this once per process and is unaffected. Verified 210/210 x3 locally.Ruleset unblock (recorded in CHANGELOG)
The master ruleset required the two CodeQL per-language contexts (
Analyze (csharp)/Analyze (actions)), which CodeQL default-setup does not emit on Dependabot PRs — so they sat permanentlyBLOCKED. Swapped to the aggregateCodeQL(GHAS app 57789); mirrors the control-menu fix. Already applied to ruleset16570488; this PR just records it.Caught hanging Dependabot #34/#35 (DP-keys flake) and #32/#33 (ruleset).