Repository navigation
GH-6334: fix(security): push secret gate — ignore textconv and external diff drivers, show root commits, scan the exact branch ref, no followed tags, scan file paths - #6340
Merged
Conversation
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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
Automated PR created by Pilot for task GH-6334.
Closes #6334
Changes
GitHub Issue GH-6334: fix(security): push secret gate — ignore textconv and external diff drivers, show root commits, scan the exact branch ref, no followed tags, scan file paths
Context
Navigator TASK-650. The push secret gate is CheckSecretGate in
internal/executor/secret_gate.go; the scan is CheckPush and CheckPushRange ininternal/executor/secretpatterns/pushrange.go; the push methods are Push, PushForceWithLease and PushToMain ininternal/executor/git.go. The gate runs in a repository that the model session can write. The run-it review of PR #6331 found five ways to publish a secret past the gate; each one works on main and none came from that PR:Scope
// mutation pin: <case> -> this test failsabove each test.Acceptance
go test -race -count=1 ./internal/executor/... -run 'SecretGate|PushRange|PushRefused'passes; paste the output into the PR body.Out of scope
The trust in remote-tracking refs that the session can write (TASK-651 moves the gate to a repository that the daemon owns). A scan of tag messages. Any change to the secret patterns.
Not verified
go test -race -count=1 ./internal/executor/... -run 'SecretGate|PushRange|PushRefused'passes; paste the output into the PR body.Reason: Not verified: shell operators are not allowed in evidence commands
Remove --no-textconv -> the three textconv tests and the marker test fail.
Reason: freeform mutation, run manually
Remove the log.showRoot argument -> the orphan root test fails.
Reason: freeform mutation, run manually
Scan the short branch name again -> the shadow test fails.
Reason: freeform mutation, run manually
Remove --no-follow-tags -> the tag test fails.
Reason: freeform mutation, run manually
Pre-PR review
Mode: enforce
Verdict: APPROVE-WITH-NOTES
Fix: none
Defects:
Not-verified: