Repository navigation
Closed
Labels
priority/p1-highPriority P1: high-impact work for the next planned milestonescope/reviewMulti-persona code review engine, verification, and findingstype/featureType feature: a new function
Milestone
Description
Problem
In review session 20261001-224227 (2026-10-02), 87% of 563 reported findings were false. An audit of every prompt the pipeline sends a model tied each recurring failure to the prompt text that invites it. Counts are from the session's 903 candidates.
- Invented advisories.
role.mdsays "Name specific CVE IDs, OWASP Top 10 categories, attack vectors", andreview.md:8asks for "a real advisory identifier".- All 9 CVE references were wrong (Log4j, polkit, Apache httpd, OpenSSH, axios, JUnit), and 6 of those findings were VERIFIED.
- 82 findings that are not injections carry an OWASP A03 label.
- No threat model. No prompt the model sees states one. 125 injection, SSRF or traversal claims assume an attacker controls config, CLI arguments or internal values, or name no sink.
- Reporting what cannot be seen.
- Three prompts tell the model to report a control it cannot see:
code_review_prompt.md:10,devsecops/prompt.md:13,review_output_instruction.md:42. - 210 claims assert that something is absent, and all 357 UNVERIFIED findings were reported.
- Three prompts tell the model to report a control it cannot see:
- Severity bands with no reachability condition (
review.md:51-52). 534 of 903 candidates were CRITICAL or HIGH. Both prompt examples say"severity": "HIGH"and"confidence_score": 0.95. - Mandates read as defect lists. "Enforce bounded searches …", "health probes, PSS/PSA", "Flag … missing checksum digests" (
devsecops/prompt.md:7,12,config_review_prompt.md:6-7). This produced 92 generic findings and 188 "Potential …" titles. - Fixes that change nothing.
code_review_prompt.md:11accepts "a precise, mechanical change description". 117 fixes have no code; 68 say verify, check, ensure, consider or review. - Tests and docs.
- Nothing says what a finding in a test is: 87 test findings, 27 reported.
docs_review_prompt.md:5asks for "missing usage examples … confusing explanations", which gives about 30 doc opinions.- Planning documents produced 23 to 31 findings although four rules forbid them.
- A verifier with no standard for VERIFIED.
- It has about 40 rules for invalidating and none for verifying.
verify_finding_system.md:8makes it impossible to refute a finding whose description the verifier restates.- None of the 13 VERIFIED findings in a 40-finding sample holds at its severity.
- Contradictions and dead prompts.
config_review_prompt.mdasks forhttp://to be flagged, whilereview.md:10and the verifier call internal http fine.- Verifier
:34and:75disagree on masking markers. diff_review_prompt.mdandreview_pipeline_eval.mdare never loaded.review_output_instruction.md,paginated_review_protocol.md,path_review_prompt.mdandcompose.mdreach only the legacy loop.
- Prompt bloat.
- The persona system prompt carries the full
ReviewResultJSON schema: 8,220 characters, with more than 30 pipeline-owned fields such asstatus,verifiedandcriteria_execution_results. review.md:10-27holds 18 devops-cli-specific exemptions that belong in.devops/review.md.
- The persona system prompt carries the full
Acceptance criteria
- Persona prompts (
personas/devsecops/role.md,personas/devsecops/prompt.md):- They state the threat model:
- Untrusted: network and fetched content, model output, PR and issue text, the reviewed repository, Kubernetes and cloud API data, server requests, MCP and tool-call arguments.
- Trusted: the operator, their config, environment and arguments, and values the code builds.
- A vulnerability is a quoted source, a sink and a missing check between them.
- No CVE or GHSA id from memory; advisories come from the scanners.
- Return no finding when you cannot quote the defect.
- They state the threat model:
.devops/review.mdgains devops-cli's own trusted and untrusted lists.- Task prompts (
tasks/review.md,code_review_prompt.md,docs_review_prompt.md,config_review_prompt.md):- Severity follows reachability (CRITICAL needs an untrusted path you can quote).
- Report only what you can see.
- A fix is replacement code for the cited lines.
observed_valueis quoted from the cited lines.- Tests are reported only when the test cannot fail.
- Docs findings are only statements the code contradicts, broken links, or names that do not exist.
- Planning documents and changelogs get no findings.
- Mandates are rewritten as defects.
- Criteria are checks that import the cited code and
assertthe outcome; a command that finds, imports or prints code is written as a sentence with"executable": false. This takes over fix(review): grep-only criteria neither verify nor invalidate a finding, and prompt examples stop teaching them #846's prompt half.
- Verifier (
verify_finding_system.md):- A standard for VERIFIED: quote the defective line and give its number; a security claim also needs the untrusted source and sink.
- Trusted input is refuted unless the conventions require the guard.
- A check in the shown code that makes the failure impossible refutes the finding.
- The masking-marker rules agree.
- Example JSON no longer anchors
HIGHor0.95. - Cleanup.
- Dead prompt files are deleted.
- devops-cli-specific exemptions move from the shared prompts to
.devops/review.md. - The persona system prompt carries a schema limited to the fields a reviewer writes.
- A test pins the prompts:
- every prompt file in
ai/tasks/andai/personas/is loaded somewhere; - no generator prompt asks for what
review.mdor the verifier calls a non-defect (starting withhttp://); - no prompt contains "CVE ID" as an instruction.
- every prompt file in
- Measurement.
docs/SELF_IMPROVEMENT.mdrecords the A/B measurement for this change with feat(ai): model-in-the-loop prompt benchmarking #413's prompt benchmarking (devops review corpus score --session …, A/A noise first, interleaved runs, model-pinned), and the per-session failure counts (cve,tests,planning,masked,syntax,no_code_fix,crit_high,unverified_reported,find_only_criteria). The live run is a person's step. uv run devops cipasses.
Key questions
- Should "report what you cannot see" be reversed? Yes (proposed). It was a deliberate choice for recall. The session's data reverses it: verification left 357 findings UNVERIFIED and all were reported, and only 1 of the 13 UNVERIFIED findings in the sample is even partly valid. The A/B guards recall with
recall_foundon the absence-type templates. - Order with fix(review): grep-only criteria neither verify nor invalidate a finding, and prompt examples stop teaching them #846? This item owns the prompt text, and fix(review): grep-only criteria neither verify nor invalidate a finding, and prompt examples stop teaching them #846 owns the executor.
Metadata
Metadata
Assignees
Labels
priority/p1-highPriority P1: high-impact work for the next planned milestonescope/reviewMulti-persona code review engine, verification, and findingstype/featureType feature: a new function
Type
Projects
- StatusShow more project fieldsDone
Activity
feat(review): review prompts state a threat model and an evidence bar…
dan-petty commentedon Oct 2, 2026
Closed by #1004, merged into
release/v0.2.25.GitHub only acts on closing keywords when a pull request merges into the default branch, so this was closed by
devops gh issues close-merged.feat(release): v0.2.25 (#1089)