security(ci): close .DotSettings gap in pr.yaml protected-file guard - #379
Merged
Merged
Conversation
The InspectCode job's comment already flagged .DotSettings as a protected-config vector (line 287: 'a malicious PR could ship a permissive .editorconfig / BannedSymbols.txt / .DotSettings that would silence InspectCode findings'), but *.DotSettings was missing from the config_files array actually overwritten from main. A PR could therefore ship its own .DotSettings suppression file to silence InspectCode warnings on its own code, since InspectCode's noise floor is tuned via .DotSettings at the repo root. Add "*.DotSettings" to every fetch-from-main config array (five bash arrays and the Windows-stage pwsh globPatterns) and extend the Detect protected configuration file changes regex to catch it, so a PR that touches its own .DotSettings gets flagged for maintainer review just like .editorconfig, .globalconfig, .ruleset, and workflow files already do. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This was referenced Aug 19, 2026
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
.DotSettingsas a protected-config vector:*.DotSettingswas missing from everyconfig_files=(...)array — so the code did not do what the comment said. A PR could therefore ship its own.DotSettingssuppression file and InspectCode would honor it, since InspectCode's noise floor is tuned via.DotSettingsat the repo root (see chore(security): InspectCode noise-floor .DotSettings (#361) #378).*.DotSettingsto all five bash arrays plus the Windows-stage pwsh$globPatterns, and extends theDetect protected configuration file changesregex so a PR that touches its own.DotSettingsgets the same maintainer-review gate as.editorconfig/.globalconfig/.ruleset/ workflow files already do.Notes for merge
Detect .NET Projectswill fail with the "protected config file changed" gate. Admin bypass required — the pattern is a one-file protected-file-PR-split; this PR is the split (nothing else in it).pr.yamlinChris-Wolfgang/repo-templateneeds the same edit so downstream repos pick it up on the next template-drift sweep (follow-up).Test plan
.DotSettings(e.g. a follow-up to chore(security): InspectCode noise-floor .DotSettings (#361) #378), confirmDetect .NET Projectsfails with.DotSettingsin the changed-files list✓ Copying <file>.DotSettings from main branchon any PR where main has a.DotSettings🤖 Generated with Claude Code