Skip to content

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

Merged
remigiusz-antczak merged 1 commit into
mainfrom
fix/fp-guard-gate-3
Nov 12, 2026
Merged

remigiusz-antczak merged 1 commit into
mainfrom
fix/fp-guard-gate-3

Conversation

@remigiusz-antczak

Copy link
Copy Markdown
Collaborator

Supersedes #2295.

BLUF: Whole-app security audits must find and cite the guard for each candidate before filing it, with a fail-closed rule for env/dev gates. Revision after review of #2295.

Changes vs #2295:

  • Env/dev gate drops a finding only if the production value is read at file:line (Dockerfile, deploy config) and the check fails closed on unset or unknown values; default-on flags and unset NODE_ENV are named traps; otherwise unverified.
  • Removed "never Medium or higher": unverified leads keep provisional severity, listed after proven findings, as in method.md.
  • Step 5 now links appsec-verify.md section 1 and carries only the delta (five guard classes, env rule, whole-app lead vs listed-unverified split).
  • Class (d) reworded as a guard (identity checked against the signed token's subject); class (e) drops a finding only when the code matches the comment at file:line.
  • New negative-twin eval default-on-flag-guard-still-reported.
  • Size marker for security-review-mode.md now 13589 to 14643.

Why a new PR: the amend changed the sha, and pushing to the #2295 branch would need a force-push.

Tests: mustload ok, test_appsec_split 7/7, run-evals dry-run ok, test-ci-gates.sh 166 pass / 3 environment-only fails (byte-budget derived rows regenerated by CI; dcr-gates opt-in checks hitting sandbox lock/network limits).

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 links appsec-verify.md section 1 and adds only the delta: five guard classes, a cited guard file:line or 'no guard found at <paths>', and an env rule that drops a finding only when the production value is read at file:line and the check fails closed (default-on flags and an unset NODE_ENV are named traps). Unconfirmed guards are listed unverified after proven findings at their provisional severity, matching method.md. Evals env-gated-dev-bypass-not-reported and default-on-flag-guard-still-reported pin both directions with fictional fixtures.

Tests: 166/169 in scripts/test-ci-gates.sh locally; the 3 failures are environment-only (byte-budget check, since derived size rows are regenerated by CI; dcr-gates opt-in default-off and refix_gate/serial_gate checks, which hit sandbox lock and network limits). mustload ok, privacy clean, run-evals dry-run ok, test_appsec_split 7/7.

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

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@remigiusz-antczak
remigiusz-antczak merged commit 0073b5c into main Nov 12, 2026
11 checks passed
@remigiusz-antczak
remigiusz-antczak deleted the fix/fp-guard-gate-3 branch November 12, 2026 06:09
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