Skip to content

df: wire --security security-review mode into the review commands (spec 010) - #122

Merged
bborbe merged 8 commits into
masterfrom
feature/security-pr-review-command
Aug 23, 2026
Merged

df: wire --security security-review mode into the review commands (spec 010)#122
bborbe merged 8 commits into
masterfrom
feature/security-pr-review-command

Conversation

@bborbe

@bborbe bborbe commented Aug 23, 2026

Copy link
Copy Markdown
Owner

Wires the --security security-review mode into /coding:pr-review, /coding:code-review, /coding:local-review (spec 010).

  • Prompt 042: pr-review.md — canonical full security pipeline (recon → /tmp/security-model.json, six trait groups + authz over-selection + deterministic invariant selection, adjudicator inputs, verifier gate, derived blocking, PR-mode diff anchoring, Security Findings + Security Model report sections, SECURITY_MODEL_FILE citation validation)
  • Prompt 043: code-review.md — audit-mode mirror (whole-repo scope, no diff anchoring)
  • Prompt 044: local-review.md — local-mode mirror (HEAD~1 diff anchoring)
  • Prompt 045: scenarios 007/008/009 finalized (TBD fixture blocks → inline-built generic fixtures + /coding:local-review --security walks) + new 010 security-zero-findings
  • Prompt 046: README commands/Quick Start/Acceptance-Scenarios rows, llms.txt alignment, CHANGELOG ## Unreleased feat entry

Frozen contract untouched: docs/selector-mode-guide.md (dormant Security Extension), scripts/validate-citations.sh, agents/security-verifier.md, agents/go-security-specialist.md, docs/security/* (AC6 enforced via checksum baseline).

@bborbe
bborbe marked this pull request as ready for review August 23, 2026 17:09

@ben-s-pull-request-reviewer ben-s-pull-request-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All checks pass. Let me compile the final findings and produce the verdict JSON.

Plan concern verification summary:

Concern Verified? Evidence
SECURITY_REVIEW=1 gates dormant extension argument-hint updated in all 3 commands; SECURITY_REVIEW=1 set on flag detection
blocking formula derived (not stored as severity) All 3 commands: blocking = confidence==confirmed ∧ exploitability==high ∧ impact≥medium; explicit "never stored as severity"
/tmp/security-model.json session-local All 3 commands: "never to any path inside the reviewed repo — if accidentally written in-tree, delete and rewrite"
SECURITY_MODEL_FILE citation validation fail-closed All 3 commands: SECURITY_MODEL_FILE=/tmp/security-model.json passed to validator; absent/unreadable model → WARN: dropped fail-closed
HARD INVARIANT preserved All 3 commands: "The HARD INVARIANT holds: applicable set is a subset of Step 4b-i candidate set; trait groups never add a rule the glob did not produce"
Toolchain pass fail-closed All 3 commands: "A scan failure, a database-fetch timeout, or a flagged vulnerability surfaces as a Must-Fix toolchain finding — never a silent skip"
--security × short mode: pipeline runs even when short skips Step 4 pr-review: line 85; local-review: line 25; explicit "never silently ignored"
--security × --refresh-baseline: maintenance exit not silent ignore code-review line 33: "exits WITHOUT a report — on such an invocation no security pipeline runs, because there is no review being performed; this is not a silent ignore of the flag"
audit scope (code-review) is whole-repo, no baseline suppression code-review line 195: "baseline-independent whole-repo inventory"
4 scenarios: all have ≥8 checkboxes, 0 TBD, each has --security invocation Grep: TBD count = 0 for 007/008/009; checkbox counts = 18/14/17/13 ≥8 each

AC6 (negative guard): git diff origin/master -- docs/selector-mode-guide.md scripts/validate-citations.sh agents/security-verifier.md agents/go-security-specialist.md docs/security/ → empty ✅

No code findings — this is a procedure/spec wiring PR for a coding plugin; changed files are commands/docs/scenarios/prompts/specs with no executable code in scope.

{
  "verdict": "approve",
  "summary": "PR 122 wires the `--security` flag into all three review commands, activating the dormant security extension. All 10 plan concerns are correctly addressed: SECURITY_REVIEW=1 gates the pipeline, blocking is derived from the verifier verdict formula (not stored as severity), the security model is session-local at /tmp/security-model.json, citation validation is fail-closed via SECURITY_MODEL_FILE, the HARD INVARIANT is preserved (applicable ⊆ Step 4b-i candidates), the toolchain pass is fail-closed, short mode cannot suppress the security pipeline, --refresh-baseline maintenance exit is documented as non-silent, audit scope is whole-repo and baseline-independent, and all 4 scenarios have ≥8 checkboxes, 0 TBD blocks, and the --security invocation. AC6 negative guard confirmed: shipped artifacts (selector-mode-guide, validate-citations, security-verifier, go-security-specialist, docs/security/) are untouched.",
  "comments": [],
  "concerns_addressed": [
    "security: SECURITY_REVIEW=1 gates dormant security extension in all three commands — verified by argument-hint and flag detection text",
    "security: blocking formula (confidence==confirmed ∧ exploitability==high ∧ impact≥medium) derived at render time, never stored as severity — verified in all three command files",
    "security: /tmp/security-model.json is session-local, never written in-tree; accidental in-tree writes are deleted and rewritten — verified in all three command files",
    "security: SECURITY_MODEL_FILE=/tmp/security-model.json passed to validate-citations.sh; absent/missing model → invariant findings drop fail-closed with WARN — verified in all three command files",
    "correctness: HARD INVARIANT preserved — applicable set is subset of Step 4b-i candidate set; trait groups never add a rule the glob did not produce — verified in all three command files",
    "security: toolchain pass is fail-closed — scan failure, DB timeout, or flagged vuln surfaces as Must-Fix, never silent skip — verified in all three command files",
    "correctness: --security × short mode — security pipeline runs even when short mode skips Step 4; flag is never silently ignored — verified in pr-review.md:85 and local-review.md:25",
    "correctness: --security × --refresh-baseline — command exits after writing baseline without running pipeline; documented as maintenance-mode exit, not silent ignore — verified in code-review.md:33",
    "security: audit scope (code-review --security) is whole-repo; Security Findings are baseline-independent and not suppressed by severity filter — verified in code-review.md:195",
    "tests: 4 acceptance scenarios (007/008/009/010) — all have ≥8 unchecked checkboxes (18/14/17/13), zero TBD blocks, each names exact --security invocation — verified via grep and file reads"
  ]
}

@bborbe
bborbe merged commit cd6dcba into master Aug 23, 2026
1 check passed
@bborbe
bborbe deleted the feature/security-pr-review-command branch August 23, 2026 17:53
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