Repository navigation
feat(skills): add findings-first /secreview skill — emit before exploring (#12951) - #12952
Merged
Merged
Conversation
Contributor
✅ SSOT Configuration Compliance: Passing🎉 No hardcoded values detected that have SSOT config equivalents! |
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thinking Path
Usage analysis over 59 sessions found
security_reviewwas the most-requestedgoal (11 sessions) and 8 of the 11 delivered nothing — every one abandoned
during
Read/Grepexploration, before a single finding was printed. Thereviews that did land found real defects, so the quality was never the problem:
the ordering was. Absent a constraint, a review optimises for completeness —
read everything, then report — which is right for an unbounded audit and wrong
for a diff, where partial value delivered early beats total value delivered late.
Audited existing coverage before adding anything.
review-fleetis theheavyweight 10-agent PR path,
reviewis CI triage,security-auditoriswhole-codebase,
pre-merge-validatehas no security dimension. A fast,diff-only, findings-first path was genuinely absent, and no rule for review
ordering existed anywhere:
What Changed
.claude/skills/secreview/SKILL.md— a non-negotiable ordering contract:one orientation call (the diff, nothing else) → findings table within 3 tool
calls → verify after → verdict. Unconfirmed rows are marked
(unverified),which is what makes early emission safe.
review-fleet/security-auditor/pre-merge-validateso the fast path is not misapplied to work that needs depth.secrets on disk/in logs, injection, TOCTOU, rate-limit bypass, and refactor
fallout (renames with un-updated call sites), historically the highest-yield
category.
CLAUDE.md— one line under Workflow Quick Rules, so the ordering ruleapplies even when the skill is not explicitly invoked.
Long analyses to a file, not the response (#12955)
Research sessions were dying to
output token maximum exceededand losing thewhole analysis. This turned out not to be a missing rule but an active one
pointing the wrong way —
research/SKILL.md:199mandated the failing behaviour:.claude/skills/research/SKILL.md— inverted: findings are written todocs/research/<topic>.mdincrementally, so Phase 1 is on disk before thePhase 2 approval gate and an unapproved or interrupted run still leaves the
analysis behind. Chat reply is path + summary.
CLAUDE.md— the general form, for any long analysis.Verification
Dogfooded against a real branch diff (PR #12950). The diff was read in one
tool call and the findings table was emitted before any other read — the
contract held. Three findings; two confirmed on verification:
rglob("*.py")descends into nested subpackages but applies only the top-level package prefixinclude_routermatching; the code checks the package mounts anything, then includes every router submodulemodule_pathcould escapebackend_dirvia..Confirmation for the first, showing the nested submodule is yielded while the
nested
__init__.pythat carries its prefix is filtered out:Both findings reported to #12950. Notably this is the same defect class that PR
is fixing — inventing endpoints under a wrong prefix.
Scope of the second fix confirmed to be a single line — no sibling skill carries
the same instruction, and
canonical-auditalready writes its report to disk:docs/research/already exists, so this adopts an existing convention ratherthan inventing one.
No product code touched; this PR changes skills and two CLAUDE.md lines.
Closes #12951, #12955
Model Used
Claude Opus 5 (1M context)