fix(ci): scope merge_group gitleaks scan to the merge-group commit range#337
Closed
scottschreckengaust wants to merge 1 commit into
Closed
fix(ci): scope merge_group gitleaks scan to the merge-group commit range#337scottschreckengaust wants to merge 1 commit into
scottschreckengaust wants to merge 1 commit into
Conversation
…nge (#336) The merge_group case of the range resolver set GITLEAKS_RANGE empty, falling back to a full-history scan that re-reports the historical #313 aws-account-id findings and fails the required check for every PR in the merge queue. Use the merge_group event's base_sha..head_sha so the queue scans exactly the commits being merged, mirroring how build.yml consumes the merge_group payload. workflow_dispatch keeps the full-history backstop. Closes #336
Contributor
|
Fix merged, closing this one |
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
Closes #336 (P0). Unblocks the merge queue (currently deadlocking PR #334).
On
merge_groupevents, theResolve PR commit rangestep insecurity-pr.ymlsetGITLEAKS_RANGEto empty, so the "range" scan fell back to the full reachable history (335 commits). The full history re-reports the historical #313aws-account-idfindings, so the required Secrets, deps, and workflow scan check fails for every PR entering the merge queue — see job 81132907683:Fix
Add a dedicated
merge_groupcase that scopes the scan to exactly the commits being merged, using the event payload (same sourcebuild.ymlalready uses):pull_requestbehaviour unchanged (base.sha..head.sha)workflow_dispatchkeeps the full-history backstop (manual run, not a required check)Verification
mise run security:gh-actions(zizmor): no findingspull_requestrun of security-pr on this PR exercises the unchanged pathNote
Pushed as a draft without waiting for the full local build, per maintainer direction — this is a CI-only YAML change and the queue is blocked.