Skip to content

ci(gates): remove the stale copy of the gitleaks baseline - #202

Merged
hyperpolymath merged 1 commit into
mainfrom
claude/remove-stale-gitleaks-copy
Nov 10, 2026
Merged

hyperpolymath merged 1 commit into
mainfrom
claude/remove-stale-gitleaks-copy

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

The secret scan on main fails on 1 job, scan / gitleaks (run 42877094785 at a045184). This pull request removes the cause: .gitleaks.toml, a stale full copy of the estate baseline.

This is the follow-up that #201 named ("Not in this change: .gitleaks.toml"). The owner decided to remove the copy. #201 merged before the change was in it, so the change is here.

Cause

  • The scanner (hyperpolymath/proven-cicd at 03e858b) puts its own baseline into the tree with the name .gitleaks-estate.toml.
  • When a repository has a .gitleaks.toml, the scanner uses that file as the config.
  • The .gitleaks.toml here was a full copy of an earlier estate baseline. It did not extend .gitleaks-estate.toml, so the path entry that exempts the baseline file was not in effect.
  • Result: the tree pass finds 3 lines in .gitleaks-estate.toml (lines 88 and 89, rule generic-api-key). The lines are fixture text in a comment of the scanner's baseline. They are not secrets, and the file is not a file of this repository.

State of the scan on main at a045184: history pass 0 leaks (350 commits), Rust rule 0, shell rule 0, tree pass 3 findings.

Changes

  • .gitleaks.toml is removed (105 lines).

With no .gitleaks.toml, the scanner uses the baseline directly. The scan then follows the estate rule and cannot be weaker than it.

Why removal and not a file that extends the baseline: the copy has no entry of its own. Each of its 14 allowlist entries is in the baseline (18 entries). A file with [extend] path = ".gitleaks-estate.toml" is correct on the day that this repository needs a local exemption. gitbot-fleet has that form.

No other file in this repository names .gitleaks.toml.

What to expect in CI

scan / gitleaks stays red on this pull request. On a pull request, the scanner takes the config from the base and not from the head (check.sh of the scanner, lines 27 to 49 and 82). The base still has the copy. So this check cannot show the repair before the merge. This is the design of the scanner: a pull request cannot change the rules of its own scan.

The proof is the first scan on main after the merge. Expected: all 3 scan / ... jobs pass.

Testing

  • Text comparison of the 2 files: 14 of 14 entries of the copy are in the baseline at 03e858b.
  • grep for gitleaks.toml in the tree after the change: 0 files.
  • Not verified by a gitleaks run. The session has no gitleaks binary. The expected result comes from the comparison above and from the scanner log on main.

If the scan on main is not clean after the merge

A new finding then comes from an entry that the baseline has and the copy did not have, or from a rule of the baseline. The repair is a .gitleaks.toml that extends the baseline with 1 justified entry. The repair is not this file again.


Generated by Claude Code

The secret scanner (proven-cicd at 03e858b) puts its own baseline into the
tree as `.gitleaks-estate.toml`. When a repository has a `.gitleaks.toml`,
the scanner uses that file as the config.

The `.gitleaks.toml` of this repository was a full copy of an earlier
estate baseline. It did not extend `.gitleaks-estate.toml`, so the path
entry that exempts the baseline file was not in effect. On `main` at
a045184 (run 42877094785) the scan fails on 1 job, `scan / gitleaks`:
the tree pass finds 3 lines of fixture text in a comment of the
scanner's own baseline (rule `generic-api-key`). The history pass, the
Rust rule and the shell rule pass.

Each of the 14 allowlist entries of the removed file is in the baseline
(18 entries). The file had no entry of its own. No other file in this
repository names it. With no `.gitleaks.toml`, the scanner uses the
baseline directly, so the scan follows the estate rule.

Not verified by a gitleaks run: the session has no gitleaks binary. On a
pull request the scanner takes the config from the base, so the check on
the pull request still uses the old file. The first proof is the scan on
`main` after the merge.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0136P7ZmiFSCoB3UR9Kk56rK
@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 25 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 9f646a4e-290b-49dc-8f6e-ee08b67b222d
Commits

Reviewing files that changed from the base of the PR and between a045184 and 5304616.

Files selected for processing: 1

  • .gitleaks.toml
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@sonarqubecloud

Copy link
Copy Markdown

Copy link
Copy Markdown
Owner Author

scan / gitleaks fails on 5304616. This is the result that the description predicts ("What to expect in CI").

  • The failure is the failure of main at a045184 (run 42877094785). The tree pass finds 3 lines in .gitleaks-estate.toml. The history pass, the Rust rule and the shell rule pass.
  • This pull request removes the cause, but its own check cannot show that. On a pull request the scanner reads its config from the base (check.sh of the scanner, lines 27 to 49 and 82), and the base still has the stale .gitleaks.toml.
  • No re-run: a run against the same base gives the same result.
  • The proof is the Secret Scanner run on main after the merge. I read that run and put the result here.

Generated by Claude Code

Copy link
Copy Markdown
Owner Author

Dependency audit fails on 5304616. The failure is not from this pull request.


Generated by Claude Code

@hyperpolymath
hyperpolymath marked this pull request as ready for review November 10, 2026 18:52
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-10T18:52:26.030527Z
We couldn’t complete this review. Comment @codex review to try again.
5304616 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@hyperpolymath
hyperpolymath enabled auto-merge (squash) November 10, 2026 18:52
@hyperpolymath
hyperpolymath merged commit 3722843 into main Nov 10, 2026
23 of 25 checks passed
@hyperpolymath
hyperpolymath deleted the claude/remove-stale-gitleaks-copy branch November 10, 2026 18:57

Copy link
Copy Markdown
Owner Author

Result after the merge, as promised above.

Secret Scanner on main at e498948 (run 42880413105): all 3 jobs pass.

  • scan / gitleaks: pass
  • scan / rust-secrets: pass
  • scan / shell-secrets: pass

The scan before the merge (a045184, run 42877094785) failed on scan / gitleaks with the 3 baseline lines. So the removal of the stale .gitleaks.toml is the repair, and the scanner now uses the estate baseline directly.

Dependency audit also passes on main at e498948 (run 42880412002), after #199.


Generated by Claude Code

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.

3 participants