Skip to content

security: verify-or-drop refuter, exclusion list and variant analysis - #1965

Closed
remigiusz-antczak wants to merge 1 commit into
mainfrom
feat/security-verify-variants-land
Closed

remigiusz-antczak wants to merge 1 commit into
mainfrom
feat/security-verify-variants-land

Conversation

@remigiusz-antczak

Copy link
Copy Markdown
Collaborator

Adds three security-path ideas from rival review tools, re-implemented: a verify-or-drop refuter, a tunable false-positive exclusion list, and variant analysis from a diff.

  • references/appsec-verify.md is routed from security-appsec.md and full-map.md. Every candidate finding needs a concrete source and sink path:line, or it is marked unverified. The file defines the exclusion slugs and the variant-analysis procedure: after a confirmed finding, search the repo for the same pattern.
  • scripts/security_verify.py triages a JSON list of findings. It fails closed:
    • An excluded category never hides a High or Critical finding, or one whose severity is missing. Those come back as needs-evidence.
    • The output records active_exclusions, override_read, and any +slug the reviewed repo added beyond the defaults (added_nondefault), so a hostile .dcr-security-exclusions file is visible.
    • An unreadable explicit override path, bad JSON, or a non-list input exits 2. Malformed rows come back as unverified instead of crashing.
  • 3 new eval cases. scripts/test_security_verify.py is wired into scripts/test-ci-gates.sh.

Size-budget rows for the new and edited references are left to CI regeneration, per the lane contract.

Not yet measured: precision and recall against a seeded-vulnerability bench. That is the next item.

Tests: 21/21 (test_security_verify.py), run on the commit's own tree. Independent review: 2🔴 (a fail-open exclusion and no exclusion record) and 4🟡, all fixed in this commit.

🤖 Generated with Claude Code

https://claude.ai/code/session_014QNFFPWVcPUbeuvwM5fk2Z

…ty path

New references/appsec-verify.md (routed from security-appsec.md and full-map.md):
a security finding needs a source-to-sink file:line path or drops to a question,
a default false-positive exclusion list is tunable via .dcr-security-exclusions
(High and Critical are never dropped by it; the override file is untrusted and
non-default additions are surfaced), and a confirmed finding triggers a repo-wide
sibling search. security_verify.py checks claim shape, applies exclusions, emits a
record with active exclusions and override status, and fails closed on bad input;
three evals added.

Not done here per lane contract: INDEX.md, SHA256SUMS, size-budgets.tsv
(the size-budget check fails until the lane owner adds the new file's row).

Tests: 21/21 assert statements in scripts/test_security_verify.py pass

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014QNFFPWVcPUbeuvwM5fk2Z
@remigiusz-antczak

Copy link
Copy Markdown
Collaborator Author

Superseded by #1979.

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