Repository navigation
ci(secrets): scan by level — a pull request on its own commits, the default branch on its history, the weekly run on every ref - #3
Merged
Conversation
…efault branch on its history, the weekly run on every ref
PabloFMM
self-requested a review
October 29, 2026 14:05
PabloFMM
approved these changes
Oct 29, 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.
Why
secrets.ymlchecks out withfetch-depth: 0and runsgitleaks git ., which reads every ref of the clone, remote branches included. A false alarm on one branch (numinia-web #290, 4×generic-api-keyon an account id) turned thescancheck red on every other open pull request in that repository, until the branch was deleted.What
Same job, three scopes, chosen from the calling workflow's event:
base..HEAD). Blocks that PR, and only it.HEAD).--all, gitleaks' default), branches included. A red run here warns; it blocks no PR.If a base commit is missing, it falls back to the whole branch history. Config handling, the checksum-verified binary and
--redactare unchanged.fetch-depth: 0stays: the range needs the base.Checked locally (gitleaks 8.30.1, numinia-web history with a leaky branch next to a clean one)
--all: exit 1 (finds the leak on the other branch)After merge
Callers pin this file by SHA. Bump the pin in each repository (one PR each). Callers that should run the weekly level need
schedule:in theirsecrets.yml(numinia-web has it) andmerge_group:if the scan should run in the queue.