Repository navigation
pilot(mcp): scan for secrets on the triage-approved path too - #786
Conversation
The deep-review (tier-2) secret scan only runs on PRs that triage escalates. Clean PRs are triage-approved and reviewed by single-review.md, which never scanned them — so a secret in an otherwise-trivial PR could be approved by the agent without an MCP scan (gitleaks CI still covers it, but the agent did not). Mirror the deep-review step into single-review.md so every agent-reviewed PR is scanned: when run_secret_scanning is available, scan the diff's raw added/ modified content; any finding is HIGH and blocking (escalate, never auto- approve). Same graceful degradation — if the tool is absent or errors, note it in one line and continue; never fail the review or fabricate a result. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015VRMMWmqW9nW81jygmea3e
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reached
More reviews will be available in 56 minutes and 30 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 To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Dev-Lead — review-changes (no-changes)No changes were needed for this PR. |
There was a problem hiding this comment.
Code Review
This pull request updates the single-review prompt to include a secret scanning step using the MCP tool when available. The review feedback correctly points out that the instructions should explicitly define how to derive the 'owner' and 'repo' variables in this new step, as they are currently only defined within the nested context of step 2.
|
Advisory bots were rate-limited; auto-approval is withheld until they recover. pr-review-sweep will re-review this PR after 2026-06-19T01:49:01Z. |
…n step Address Gemini review (#786): step 3 runs for all PRs, but owner/repo derivation was only shown under step 2's incremental sub-bullet. State it inline — owner = headRepository.owner.login, repo = headRepository.name from the step-1 PR metadata. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015VRMMWmqW9nW81jygmea3e
|
Dev-Lead — waiting on PR blockers (intent: review-changes)PR: #786 |
|
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. |
donpetry-bot
left a comment
There was a problem hiding this comment.
Automated review — APPROVED ✓
Risk: LOW
Reviewed commit: 1ae1111812438c45bb398827d4e5d8ae6e93dc86
Review mode: triage-approved (single reviewer)
Summary
Documentation-only change to prompts/single-review.md (16 add / 2 del) that adds a run_secret_scanning (MCP) step to the triage-approved review path, mirroring the existing step in deep-review.md. Closes the gap where triage-approved (clean) PRs were never agent-scanned for secrets. No executable code changes.
Linked issue analysis
No formal closingIssuesReference; PR is a pilot for epic #676 (#681) and extends the secret-scanning work from #783. The stated goal — scan the triage-approved path the same way escalated PRs are scanned — is fully realized by the new step 3, which is a faithful mirror of deep-review.md's secret-scan step.
Findings
None blocking. Verified the change against the mcp__github__run_secret_scanning tool schema: files accepts a single string or an array of strings (max 100) of raw file contents/diff hunks, not paths or objects — exactly as the new prose states. owner/repo derivation (headRepository.owner.login / headRepository.name) is correctly specified inline, addressing Gemini's review comment in commit 1ae1111. HIGH/blocking handling and graceful-degradation wording match deep-review.md.
CI status
All required checks green on the head SHA: Lint, ShellCheck, Compile agentic workflows, Agent Security Scan, Secret scan (gitleaks), CodeQL (actions/python), SonarCloud, unit-tests, AgentShield, holdout-guard. Earlier CANCELLED dev-lead/review check runs were superseded by SUCCESS re-runs. mergeStateStatus is BLOCKED pending org-leads review (human merge gate), which is outside this agent's auto-approval scope.
Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.



What
Extends the secret-scanning pilot (#681) to the triage-approved path so every agent-reviewed PR is scanned — not just escalated ones.
Why
The tier-2 deep-review secret scan (merged in #783) only runs on PRs that triage escalates. Clean PRs are triage-approved and handled by
single-review.md, which never scanned them. A secret in an otherwise-trivial PR could therefore be approved by the agent without an MCP scan. (gitleaks CI still scans every PR, but the agent didn't — this closes that gap.)Change
prompts/single-review.md— add arun_secret_scanningstep mirroringdeep-review.md:files= string or array of strings, not paths/objects — per the tool schema).RISK=HIGH,DECISION=escalate(HIGH can never auto-approve).Activation
Effective once merged and
pr-review/stableis re-cut to include the commit.Pilot for epic #676 (#681).
🤖 Generated with Claude Code
Generated by Claude Code