Skip to content

fix(gitleaks): allowlist example JWT fixture in test_gitleaks_config.bats - #710

Merged
don-petry merged 1 commit into
mainfrom
claude/fix-gitleaks-jwt-test-fixture
Jun 14, 2026
Merged

fix(gitleaks): allowlist example JWT fixture in test_gitleaks_config.bats#710
don-petry merged 1 commit into
mainfrom
claude/fix-gitleaks-jwt-test-fixture

Conversation

@don-petry

Copy link
Copy Markdown
Collaborator

Closes #709.

What

Adds a path-scoped [[allowlists]] entry to .gitleaks.toml for the example expired-JWT fixture embedded in tests/test_gitleaks_config.bats.

Why

PR #705 (issue #697, commit 58934f64) added a regression-guard test that embeds the example expired JWT literally in the committed file as EXPIRED_JWT='eyJ…'. The secret scan runs gitleaks detect --source . (full history), and .gitleaks.toml only allowlisted that token under .claude/skills/**/api-testing-patterns.md — not in the test file. So the unallowlisted occurrence fails Secret scan (gitleaks) on affected PRs (notably #707, which never touches that file). main is clean; this surfaces on PRs in that lineage.

The fix

[[allowlists]]
description = "Suppress the example expired-JWT fixture in the gitleaks-config self-test (issue #697 / PR #705)"
condition = "AND"
paths = ['''^tests/test_gitleaks_config\.bats$''']
regexes = ['''eyJhbGciOiJIUzI1NiIs''']

condition = "AND" binds the dummy value to that one path — consistent with every other entry in the file — so a real secret committed there in future is still reported (not a blanket file suppression).

Unblocks

Once merged, affected PRs clear the check by updating their branch with main.


Generated by Claude Code

…bats

PR #705 (issue #697) embeds the example expired JWT literally in
tests/test_gitleaks_config.bats to test the allowlist, but .gitleaks.toml
only allowlisted that token under .claude/skills/**/api-testing-patterns.md.
Because the secret scan walks full history, the unallowlisted occurrence
fails Secret scan (gitleaks) on affected PRs (e.g. #707).

Add a path-scoped (condition=AND) allowlist for the self-test file so the
fixture is suppressed while a real secret committed there would still be
reported.

https://claude.ai/code/session_015VRMMWmqW9nW81jygmea3e
@don-petry
don-petry requested a review from a team as a code owner June 14, 2026 12:10
@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.

@coderabbitai

coderabbitai Bot commented Jun 14, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@don-petry, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 57 minutes and 17 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 6c88c53a-42a9-472c-80b7-a4c3a950bc2e

📥 Commits

Reviewing files that changed from the base of the PR and between 3b800fd and a9d3850.

📒 Files selected for processing (1)
  • .gitleaks.toml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/fix-gitleaks-jwt-test-fixture

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the .gitleaks.toml configuration to add an allowlist rule that suppresses an expired JWT dummy token fixture in the tests/test_gitleaks_config.bats self-test, preventing false positives. There are no review comments, and I have no additional feedback to provide.

@sonarqubecloud

Copy link
Copy Markdown

@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — waiting on PR blockers (intent: review-changes)

PR: #710
No changes were committed, but the PR still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews). The retry cron will re-attempt automatically. Next attempt after: 2026-06-14T12:48:32Z

@don-petry

Copy link
Copy Markdown
Collaborator Author

Note

@don-petry I reviewed this PR and no code changes were needed, but it still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews), so I cannot mark it done yet. I'll re-check automatically.
Next attempt after: 2026-06-14T12:48:32Z

@don-petry
don-petry enabled auto-merge (squash) June 14, 2026 12:18
@don-petry
don-petry merged commit fcc5ea9 into main Jun 14, 2026
28 of 30 checks passed
@don-petry
don-petry deleted the claude/fix-gitleaks-jwt-test-fixture branch June 14, 2026 12:19
don-petry added a commit that referenced this pull request Jun 14, 2026
Resolves the .gitleaks.toml conflict by keeping the canonical allowlist
entry merged via #710; drops #707's now-redundant duplicate. Brings the
secret-scan fix into this PR so its history-wide gitleaks scan passes.

https://claude.ai/code/session_015VRMMWmqW9nW81jygmea3e
don-petry added a commit that referenced this pull request Jun 14, 2026
…bats (#710)

PR #705 (issue #697) embeds the example expired JWT literally in
tests/test_gitleaks_config.bats to test the allowlist, but .gitleaks.toml
only allowlisted that token under .claude/skills/**/api-testing-patterns.md.
Because the secret scan walks full history, the unallowlisted occurrence
fails Secret scan (gitleaks) on affected PRs (e.g. #707).

Add a path-scoped (condition=AND) allowlist for the self-test file so the
fixture is suppressed while a real secret committed there would still be
reported.

https://claude.ai/code/session_015VRMMWmqW9nW81jygmea3e
don-petry added a commit that referenced this pull request Jun 18, 2026
…bats (#710)

PR #705 (issue #697) embeds the example expired JWT literally in
tests/test_gitleaks_config.bats to test the allowlist, but .gitleaks.toml
only allowlisted that token under .claude/skills/**/api-testing-patterns.md.
Because the secret scan walks full history, the unallowlisted occurrence
fails Secret scan (gitleaks) on affected PRs (e.g. #707).

Add a path-scoped (condition=AND) allowlist for the self-test file so the
fixture is suppressed while a real secret committed there would still be
reported.

https://claude.ai/code/session_015VRMMWmqW9nW81jygmea3e
don-petry added a commit that referenced this pull request Jul 18, 2026
* feat(personas): onboard dev-lead, pr-review, business-analyst as personas

Formalizes the three existing agents under the persona standard and makes each
addressable as @petry-projects/<role> (org team handles — teams created:
dev-lead, pr-review, business-analyst; all closed, notifications disabled, 0
members). Closes the manifest half of #1281 / #1282 / #1283.

Each persona (all status: draft):
- personas/<id>/persona.yml — a compliant manifest documenting the REAL runtime:
  definition layers point at what exists (dev-lead → prompts/dev-lead/;
  pr-review → agents/pr-reviewer.md + prompts/; business-analyst → vendored
  bmad-method analyst v6.8.0 + prompts/incubation/). Triggers reflect reality,
  advisory by default, every write surface carries its gate_label (§4 rule 2).
- prompts/<id>/advisory.md — a role-focused advisory the shared persona runner
  serves on @-mention (read-only, prints between sentinels, marker-first — the
  qa-lead contract). dev-lead advises on implementation/scoping (code is still
  written only by its label-triggered runtime, not this path); pr-review gives
  review guidance (the full tiered review runs on its existing path);
  business-analyst advises on framing/research/next-analysis-step.
- README.md + seed held-out evals (draft-exempt from the count gate; expand
  before promotion). pr-review points evals.paths at its EXISTING skill sets
  (evals/deep-review/, evals/triage/) — the multi-skill case #779 unblocks.

Decisions taken (from the onboarding issues):
- @-addressability for all three (the initiative's goal). pr-review's legacy
  @donpetry-bot path is retained (real account, works); this adds the role handle.
- business-analyst is the Analyst role (brainstorm/market-research/brief) ONLY;
  the PRD stays with a separate product-manager persona — the documented
  Analyst→PM handoff is preserved, not collapsed.
- pr-review's canary-rings registration (#710) stays a separate follow-up; draft
  personas don't require it.

Deliberately NOT here (tracked, per-issue): real (non-seed) eval sets; the
product-manager persona; pr-review canary registration; and — for the mention
paths to go live — enrolling these into the router soak (the framework is live
only in the next ring today).

MERGE ORDER: after petry-projects/.github#779 (schema: evals.paths) and #1302
(validator: reads paths + count gate). pr-review's manifest uses `paths`, which
main's validator cannot parse until #1302 lands.

Verification
- validate-personas.py (with #779 schema + #1302 validator): 4/4 valid,
  invariants hold.
- validate-cases.py: OK, 7 skills / 54 cases, no cross-split id overlap.
- markdownlint: clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: dev-lead update (review-changes) [skip ci-relay]

* chore: dev-lead update (review-changes) [skip ci-relay]

* fix(reviews): address review comments [skip ci-relay]

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
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.

gitleaks secret-scan fails on PRs: example JWT fixture in tests/test_gitleaks_config.bats is not allowlisted (introduced by #705/#697)

1 participant