Skip to content

ci: exact-match gitleaks exception for the synthetic typed-review fixture - #1773

Merged
ViperJuice merged 2 commits into
mainfrom
claude/gitleaks-typed-review-vector-exception
Oct 20, 2026
Merged

ViperJuice merged 2 commits into
mainfrom
claude/gitleaks-typed-review-vector-exception

Conversation

@ViperJuice

@ViperJuice ViperJuice commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Why

The gitleaks job in .github/workflows/scrub.yml checks out with fetch-depth: 0, so it scans every branch and tag. It always loads .gitleaks.toml from the checked-out tree. A synthetic test-vector digest on the branch for #1770 trips generic-api-key. That PR already allowlists the value, but only in its own config. Scans running from any other checkout still use main's config, which has no exception. That is why agent-harness#1763, agent-harness#1764, agent-harness#1744 and agent-harness#1762 all fail on the same finding: commit bbb3bb8b, phase-loop-runtime/tests/data/typed_review_contract_vectors.json:67.

The value is a SHA-256 digest computed from a test-only identifier. A Daybreak review independently recomputed it and confirmed it is not a credential.

What

  • .gitleaks.toml: one allowlist regex, the exception from 37be3360 (agent-harness#1770). It is anchored with \A…\z so it must match the whole extracted secret. Nothing else changes: no path or rule exclusions, no .gitleaksignore, no change to the workflow or to what gets scanned.
  • CHANGELOG.md: an [Unreleased] entry.

The first commit extracted the hunk exactly. Round 1 of the independent review rejected it: the regex was unanchored, so tokens with the value embedded inside them were also suppressed. The second commit adds the anchors and corrects the CHANGELOG wording. Both commits are kept.

Verification

  • All runs used pinned gitleaks v8.21.2 with the same command as scrub.yml, over the full fetched history.
  • Main's config gives 1 finding. This branch's config gives 0, with exactly that fingerprint removed and none added.
  • Boundary cases (private synthetic fixtures, never committed):
    • the exact value is suppressed;
    • all of these are still detected: substitutions at the start, middle and end; a case change; a prefix, a suffix, and text on both sides; newline-adjacent placements; the value inside a longer hex run; and captures that include delimiters.
  • Negative controls (generic-api-key, github-fine-grained-pat, github-pat, aws-access-token, slack-bot-token, gitlab-pat) produce the same findings under both configs.
  • This head and its merge preview have 0 findings. make check and git diff --check pass.
  • An independent Daybreak review accepted this head in round 2 and found no new issues.

Follow-ups

agent-harness#1770, agent-harness#1740 and agent-harness#1733 carry the same exception without anchors. Their owners have been told not to merge that version and to drop or replace it when they merge main.

Draft. A maintainer decides when to merge.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

ViperJuice and others added 2 commits October 20, 2026 00:54
Extract the confirmed exception from agent-harness#1770 so full-history scrub checks for agent-harness#1763, agent-harness#1764, agent-harness#1744, and agent-harness#1762 use the main-targeted configuration.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Anchor the exception to an exact full-secret match per review for agent-harness#1770, agent-harness#1763, agent-harness#1764, agent-harness#1744, and agent-harness#1762.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ViperJuice
ViperJuice marked this pull request as ready for review October 20, 2026 05:54
@ViperJuice
ViperJuice merged commit 7b49e86 into main Oct 20, 2026
16 checks passed
@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.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@ViperJuice
ViperJuice deleted the claude/gitleaks-typed-review-vector-exception branch October 21, 2026 03:54
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