Repository navigation
Vault Sentinel: real-detector controls; folder allowlist entries match whole segments (Part of #7155) - #7180
Merged
Conversation
…hes whole segments (Part of #7155) The scanner's proofs mocked the detector and the file filter, so a blind scanner would have passed them. These run it for real over planted fakes. Its allowlist was a substring match, so tests/ also exempted src/latests/. Known misses are strict xfails, tracked in #7179. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
Contributor
|
No description provided. |
Contributor
|
No description provided. |
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.
Part of #7155. Found #7179.
Problem
Vault Sentinel's only failure proofs mock both
SecurityLensandApertureFilter, so they prove the exit code, not that a secret is ever found. If its signature name changed, it would go blind and still print success.What this does
tests/security_auditing/test_vault_sentinel_control.py. The real detector and file filter run over planted fakes, nothing mocked. Six secret kinds must fail CI, a clean tree must pass, secret files must fail by name, and a detected secret must never be logged.ALLOWLIST_PATHSused a substring match, so"tests/"also exemptedsrc/latests/andcontests/. Newpath_allowlisted()treats an entry ending in/as a folder and matches whole path segments. Other entries stay the partial matchgitgalaxy_config.pydocuments.gate_controls.pyat the real control and lists the gaps.Do the controls fail when something is broken?
Yes. Each sabotage was temporary:
Risk
The allowlist change makes the pre-gate stricter. Vault Sentinel on this repo with the fix: exit 0, 0 secrets, 2,069 files deep-scanned. For users, a path that was only exempt through the substring match will now be reported.
X-Ray and Supply Chain Firewall have the same substring match. They aren't changed here, to stay within the 5-file limit; the next control PR moves them to
path_allowlisted().What this doesn't do
It doesn't widen what Vault Sentinel reads. That changes a shipped tool and needs a false-positive measurement first (#7179).
Cost
No new workflow or job. About 30 small scans inside
full-suite, under a second in total.Checks
-k 'gate_controls or vault or sentinel or config or resolver or workflow or classifier'): 774 passed, 1 skipped, 11 expected failures. Not the full suite locally.tests/ruff_audit.py --cipasses.🤖 Generated with Claude Code