Skip to content

Gate whole-app security findings on a cited guard check - #2295

Closed
remigiusz-antczak wants to merge 1 commit into
mainfrom
fix/fp-guard-gate-2
Closed

remigiusz-antczak wants to merge 1 commit into
mainfrom
fix/fp-guard-gate-2

Conversation

@remigiusz-antczak

Copy link
Copy Markdown
Collaborator

Supersedes #2294.

BLUF: Whole-app security audits must now find and cite the guard for each candidate before filing it. Held guard -> drop; env-gated dev path -> drop unless proven reachable in production; unreadable guard (platform gate, cookie flags) -> unverified, ranked below proven findings, never Medium or higher. Targets false-positive classes seen in a private audit bench: env-gated dev bypass, admin console behind auth, local-only paths, JWT claims vs the checked identity, opaque IDs flagged as IDOR.

Root cause: the whole-app mode never ran a refutation step, so a plausible-but-unproven candidate was filed.

Changes:

  • security-review-mode.md step 5: the rule, inline, naming five guard classes and requiring a cited file:line or "no guard found at ".
  • evals.json: env-gated-dev-bypass-not-reported (fictional fixture).
  • Size-budget raise marker for security-review-mode.md (13589 to 14545) in the commit message.

Why a new PR: #2294 had two commits (per-commit gates need one squashed commit) and edited security-appsec.md, which broke the appsec-split pin test and the must-load ceilings. This version leaves security-appsec.md and appsec-verify.md untouched.

Measured (private bench, n=3 per repo, adjudicated by one reviewer): mean false positives per run on one repo fell 3.5 to 1.0 with real findings 3.5 to 2.3; on the other repo no gain (2.5 to 2.7 FP, real 4.5 to 4.3). Treat as directional.

Not merged.

🤖 Generated with Claude Code

A bench of whole-app security audits showed the reviewer filing env-gated dev bypasses, consoles behind auth, local-only paths, same-bearer JWT claim mismatches and platform-gated routes as findings. Step 5 of whole-app security mode now carries a hard rule: search five guard classes (route guard, env or feature gate, validator or ownership check, identity binding, documented decision), cite the guard file:line or "no guard found at <paths>", drop a held guard or an env-gated path not proven prod-reachable, and mark guards that cannot be read as unverified, ranked below proven findings and never Medium or higher. The eval env-gated-dev-bypass-not-reported pins the behavior with a fictional fixture.

Tests: 164/166 in scripts/test-ci-gates.sh locally; the 2 failures are the byte-budget check (derived size rows are regenerated by CI, and the local worktree cannot write them) and the dcr-gates opt-in check, neither touched by this change. mustload ok, routing ok, rules ok, privacy clean, test_appsec_split 7/7.

size-budget-raise: .claude/skills/deep-code-review/references/security-review-mode.md 13589→14545 inline guard check for whole-app security mode

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@remigiusz-antczak

Copy link
Copy Markdown
Collaborator Author

Superseded by #2296 (amended revision addressing review; amend would need a force-push).

@remigiusz-antczak
remigiusz-antczak deleted the fix/fp-guard-gate-2 branch November 12, 2026 06:23
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