Repository navigation
ci(github): add full-history gitleaks scans - #5
Merged
Merged
Conversation
- Move the gitleaks pin to the setup-gitleaks action and add the gitleaks-history workflow. - A weekly cron, workflow_dispatch, and a change to .gitleaks.toml or the pin run the full scan. - The range scan of Repository checks also falls back to the full history on a pin change.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
rbright
commented
Nov 29, 2026
rbright
left a comment
Member
Author
There was a problem hiding this comment.
Security review at 14f8c2b: no findings.
- The gitleaks pin moves to
.github/actions/setup-gitleaksand keeps the SHA-256 check before extraction. - The range step scans the full history (
--log-opts=HEAD) when the base commit is not in the clone, and when the change touches.gitleaks.tomlor the setup action. A PR measures from the merge base (...). A push measuresbefore..sha, which is conservative after a force push. Event values reach the script only throughenv. gitleaks-historyscans--log-opts=HEADwith--redacton Mondays at 06:17Z, on dispatch, and on PRs and pushes that change the rules or the pin. It usespersist-credentials: falseandcontents: read. The repository is public, so--redactmatters, and every scan keeps it.- repository-checks.yml has no concurrency group, so no push range is skipped.
- Info: unlike uplink#7, the history workflow does not list its own file under
paths, so an edit to it alone does not trigger a run. The weekly cron covers that.
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.
References
gitleaks-history.yml,setup-gitleaks) and agentgolf/terraform (pin-change fallback).What
.github/actions/setup-gitleaks/action.ymlis now the only gitleaks pin (8.30.1 and SHA-256, unchanged).gitleaks-history(jobgitleaks-history) scans the full history every Monday at 06:17 UTC, onworkflow_dispatch, and on a pull request or push to main that changes.gitleaks.tomlor the pin.Repository checksstill scans the commit range. It now scans the full history when the range changes.gitleaks.tomlor the pin, and when the base commit is not in the clone.Why
A new gitleaks rule or version never reached older commits, so a secret that only the new rules detect stayed unreported.
How to Review
Start with the Gitleaks step in
repository-checks.yml, thengitleaks-history.yml. The scan stays in theRepository checksjob, so the ruleset still requires it. No.gitleaks.tomlis added: gitleaks reads it from the root when it exists and uses its default rules when not, so this PR works before and after Security Bot's config PR.Verification
actionlint1.7.12: no findings.zizmor --offline .github1.32.0: 0 medium or high, 2 lowself-repositoryhints that match the./form of analytics.HEAD; other ranges givebase..head.gitleaks git --log-opts=HEAD8.30.1 on the branch: no leaks.workflow_dispatchofgitleaks-historyon this branch: run 46262275145, full history, no leaks.Repository checkslogged the pin change and scannedHEAD;gitleaks-historyran through its path trigger. Both found no leaks.