Skip to content

Scan secrets once per change instead of twice - #208

Merged
Sev7eNup merged 1 commit into
mainfrom
ci/scope-secret-scan-push-trigger
Aug 15, 2026
Merged

Scan secrets once per change instead of twice#208
Sev7eNup merged 1 commit into
mainfrom
ci/scope-secret-scan-push-trigger

Conversation

@Sev7eNup

Copy link
Copy Markdown
Owner

secret-scan.yml had a push trigger with no branch filter. Every push to a
topic branch started a scan, and the pull_request event started a second one
over the same commits moments later — two "Secret scan" runs per change, plainly
visible on every Dependabot PR.

The existing concurrency group does not collapse them: the push run keys on
github.ref, the PR run on github.event.pull_request.number, so the two land
in different groups and neither cancels the other.

Scoping push to main keeps both cases that matter — branch commits stay
covered by pull_request, and main keeps a run of its own, which is the one
that scans all reachable history after a merge. merge_group, workflow_dispatch
and the weekly schedule are untouched.

Note this PR itself still shows the old double run; the change only takes effect
for pushes after it lands.

🤖 Generated with Claude Code

The `push` trigger carried no branch filter, so every push to a topic branch
started a scan and the pull_request event started a second one over the same
commits — plainly visible as two "Secret scan" runs on each Dependabot PR.

The existing concurrency group does not merge them. The push run keys on
`github.ref`, the PR run on `github.event.pull_request.number`, so the two land
in different groups and neither cancels the other.

Scoping `push` to main keeps both cases that matter: branch commits are scanned
through `pull_request`, and main keeps a run of its own — the one that scans all
reachable history after a merge.
@Sev7eNup
Sev7eNup merged commit 656911c into main Aug 15, 2026
9 checks passed
@Sev7eNup
Sev7eNup deleted the ci/scope-secret-scan-push-trigger branch August 15, 2026 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant