Skip to content

ci: run gitleaks on every PR, not only in the weekly sweep - #89

Merged
hseshadr merged 1 commit into
mainfrom
ci/run-gitleaks-on-every-pr
Aug 1, 2026
Merged

ci: run gitleaks on every PR, not only in the weekly sweep#89
hseshadr merged 1 commit into
mainfrom
ci/run-gitleaks-on-every-pr

Conversation

@hseshadr

@hseshadr hseshadr commented Aug 1, 2026

Copy link
Copy Markdown
Owner

The gap

aml-filter was the only repo in the portfolio whose secret scan never ran on a pull request.

gitleaks lived only in security-audit.yml, which triggers on schedule + workflow_dispatch. A secret committed in a PR merged to main and then sat in the public history for up to seven days until the Monday 09:00 UTC sweep. Every other repo blocks it at the PR:

repo secret scan on PR required
edge-proc, edgeproc-core, privacy-core, spookie gitleaks yes
edge-reco gitleaks yes
almamesh Secret Scan (gitleaks) yes
assay gitleaks yes
aml-filter none — weekly only n/a

This matters more than an ordinary missing test. A leaked secret is the one defect a revert does not fix: once it is in the public history the credential is burned and must be rotated. This repo has already paid that bill once.

The change

One new gitleaks job in ci.yml. Same action, same pinned SHA (e0c47f4f v3), same .gitleaks.toml as the weekly run, so the two cannot disagree about what counts as a secret. fetch-depth: 0 because gitleaks scans every commit, not just HEAD.

The weekly sweep stays. It re-scans unchanged history against an updated ruleset, which a push-triggered job never does. The two answer different questions.

Job id is gitleaks (no name:) so the check-run context matches what the other seven repos already require, and can be added to this repo's branch protection.

Claim touched

"No secret reaches the public history." Previously enforced up to seven days late; now enforced before merge.

aml-filter was the only repo in the portfolio whose secret scan never ran on
a pull request. gitleaks lived solely in security-audit.yml, which triggers on
`schedule` + `workflow_dispatch` — so a secret committed in a PR merged to main
and sat in the public history for up to seven days before the Monday sweep saw
it. Every other repo blocks it at the PR.

That gap matters more than a normal test gap because a leaked secret is the one
defect a revert does not fix: once it is in the public history the credential is
burned and has to be rotated. This repo has already paid that bill once.

The weekly sweep stays. It re-scans unchanged history against an updated
ruleset, which a push-triggered job never does; the two jobs answer different
questions.

Same action, same pinned SHA, same .gitleaks.toml as the weekly run, so the two
cannot disagree about what counts as a secret. Job id is `gitleaks` to match the
check-run name the other seven repos already require.

Claim touched: "no secret reaches the public history." Previously enforced up to
seven days late; now enforced before merge.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0186xrrT9mYfCZTVkk8HN12p
@hseshadr
hseshadr merged commit 71a0b5d into main Aug 1, 2026
3 checks passed
@hseshadr
hseshadr deleted the ci/run-gitleaks-on-every-pr branch August 1, 2026 18:17
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