Skip to content

[FIX] Point CI's gitleaks at the repo's .gitleaks.toml - #97

Merged
ScottieR merged 1 commit into
masterfrom
fix/gitleaks-config-in-ci
Aug 31, 2026
Merged

ScottieR merged 1 commit into
masterfrom
fix/gitleaks-config-in-ci

Conversation

@ScottieR

Copy link
Copy Markdown
Owner

The bug

gitleaks-action only uses a repo config when GITLEAKS_CONFIG names it. Without that it runs gitleaks' built-in default ruleset and silently ignores the .gitleaks.toml at the repo root.

So every allowlist entry in that file is honoured by the local pre-commit hook and then re-flagged in CI. Local and CI have been disagreeing about the same file.

The config has carried the Privacy transaction fixture allowlist since Aug 10 without ever taking effect here. It only surfaced now because #94 adds a second entry (the JS↔Rust crypto golden vector) whose finding lands on a changed line, so verify actually fails.

The fix

One env var. [extend] useDefault = true in that config keeps the full default ruleset, so this narrows nothing — it only stops CI and the local hook from disagreeing.

Verification

Locally, on the branch carrying the vector, gitleaks detect passes with the config and the identical finding is reported without it — which is the CI behaviour this corrects.

Ordering

#94 stays red until this merges. Nothing wrong with #94's own contents; it's blocked on this.

This touches .github/workflows/, so the sensitive-path guard will hold it for human review rather than auto-merging. Correct — a change to how secret scanning is configured is exactly what that guard is for. Worth reading closely: confirm useDefault = true really is still in .gitleaks.toml (it is, line 2), since that's the one thing standing between this and a much weaker scan.

🤖 Generated with Claude Code

gitleaks-action only uses a repo config when GITLEAKS_CONFIG names it.
Without that it runs the built-in default ruleset and silently ignores
the .gitleaks.toml at the repo root -- so every allowlist entry in that
file is honoured by the local pre-commit hook and then re-flagged in CI.

The file has carried an allowlist for the Privacy transaction fixture
since Aug 10 without it ever taking effect here; the mismatch only
surfaced now because a PR added a second entry (the JS<->Rust crypto
golden vector) whose finding actually lands on a changed line.

`[extend] useDefault = true` in that config keeps the full default
ruleset, so this narrows nothing -- it only stops CI and the local hook
from disagreeing about the same file.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Auto-merge skipped

This PR touches a path this pipeline always treats as needing a human:

.github/workflows/security.yml

Review and merge manually.

@ScottieR
ScottieR merged commit d86cdf0 into master Aug 31, 2026
7 checks passed
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