Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions changelog.d/845.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
### Changed
- **A Mitigated Finding Is Not a Verified One (`devops review path|branch|pr`, `devops review verify`, `devops_cli.ai.review.verdicts`)**:
- A MITIGATED verdict, a model's or a person's, sets `verified=False`, and so does the merge of two findings whose best verdict is MITIGATED. MITIGATED defaulted to verified, so 11 of the 28 mitigations in review session `20261001-224227` counted as verified defects (#845).
- **The Verifier Is Told What a Mitigation Needs (`devops review path|branch|pr`, `ai/tasks/verify_finding_system.md`)**:
- The verifier's instructions say a perimeter file is a repository-relative path to code or configuration in the reviewed tree, never documentation such as the project's conventions, that the mechanism names an identifier in backticks which a perimeter file or the finding's file holds, and that a mechanism describing the defect is no mitigation. The prompt digest changes, so cached verifier replies are not replayed (#845).

### Fixed
- **A Mitigation Stands Only on Code the Reviewed Tree Holds (`devops review path|branch|pr`, `devops_cli.ai.review.verification`)**:
- A model's MITIGATED verdict stays MITIGATED only when every perimeter file resolves inside the reviewed tree through `safe_resolve_subpath`, and an identifier its mechanism names (`_extract_code_symbols`) appears in a perimeter file or in the finding's own file. An absolute path, even to a file in the tree, a `../` escape, a symlink, a directory and a missing file are unresolved, and a pull request review's tree holds only the pull request's files. Otherwise the finding is UNVERIFIED, stays reported, drops the line the verdict cited, and its `verification_note` names the check that failed. The finding's own file is read where its location points, absolute as a scanner writes it or relative, so a mechanism held only there still counts. A HIGH "Command injection via os.system" finding that the verifier called mitigated by a "shlex.quote wrapper in safe_exec" in `src/does/not/exist.py`, citing line 999 of a four-line file, was MITIGATED with no note and the review recommended APPROVE; it is now UNVERIFIED with a `mitigation-unproven` note saying that `src/does/not/exist.py` does not resolve inside the reviewed tree, and the review requests changes (#845).
- A documentation file, the conventions file `.devops/review.md` among them, is no perimeter, and a mechanism that negates itself ("caught but not logged", "does not fully sanitize", "is expected to handle", "intended to", "too permissive") describes the defect rather than what limits it. Replayed against session `20261001-224227`'s 28 MITIGATED verdicts, 26 become UNVERIFIED: 19 mechanisms name no code identifier, 5 describe the defect and 2 perimeters are `.devops/review.md`. The 2 naming `validate_service_url` and `is_relative_to()` in the files that hold them stay MITIGATED (#845).
- A verdict that names no reason, mechanism or perimeter files says which, under the same note kind (#845).
- **A Confirmation Cites a Line Its File Has (`devops review path|branch|pr`, `devops_cli.ai.review.verification`)**:
- A model's VERIFIED verdict whose `citation_line` is below 1 or past the end of the finding's file is UNVERIFIED, stays reported and drops the citation, with a `citation-out-of-range` note naming the line, the file and its length. A citation inside the file stays VERIFIED. A scanner's finding, located by an absolute path inside the reviewed tree, is checked the same way. Each verdict of a reply is checked on its own: a fabricated one leaves the others as they were (#845).
- **A Confirmation or Mitigation Its Own Reason Contradicts Is Not Applied (`devops review path|branch|pr`, `devops_cli.ai.review.verification`)**:
- A model's VERIFIED or MITIGATED verdict whose reason denies the finding's claim is UNVERIFIED, stays reported and drops its citation, with a `verifier-contradiction` note quoting the denial. In review session `20261003-012555` qwen3-coder confirmed two Semgrep findings, "Untrusted user input in `importlib.import_module()`", with reasons ending "No user input reaches this point" and "These are not derived from untrusted user input", and #948's ranking put both among the report's top 8 rows; in session `20261003-005122` it called two of the same findings mitigated on the same grounds. The guard mirrors the self-refutation guard on the same claim words and negations: a negation followed by at least two consecutive words of the claim that the claim does not negate itself (#845).
- A confirmation whose reason supports the claim is still applied, also when it negates a guard ("this does not prevent path traversal") or a word the claim negates too ("no input validation" against "Missing input validation"). Over 778 cached VERIFIED and MITIGATED verdicts, the plain mirror (any negation and 60% of the claim's words) would have set aside 318; this guard sets aside 13, 12 of which argue their finding away (#845).
- A verdict whose reason says a criterion passed ("verified by the test execution which passes") when every recorded run of a criterion failed gets the same note. Session `20261003-005122` confirmed a finding that way while its criterion had failed with `No module named 'pytest'` (#845).
- **The Profile Counts Mitigations That Proved Nothing (`devops review path|branch|pr`, `devops_cli.ai.review_schema`)**:
- `verdict_distributions.verification_note` in `profile.json` counts `mitigation-unproven`, `citation-out-of-range` and `verifier-contradiction` notes as their own kinds. A mitigation degraded for want of a mechanism or perimeter was noted in free text and counted as `other` (#845).
- **A Perimeter Path Matches Only Itself (`devops review branch|pr`, `devops pr check-readiness`, `devops_cli.ai.review.mitigations`)**:
- The perimeter-change warning stripped paths with `.lstrip("./")`, which cut the dot off `.github/...` and `.devops/...` and the root off an absolute path, so a change to `github/workflows/ci.yml` warned about a mitigation whose perimeter is `.github/workflows/ci.yml`, and `etc/hostname` matched `/etc/hostname`. It now strips a leading `./` only. An absolute path inside the repository is read relative to its root, so a person's mitigation of a scanner finding, whose perimeter is the finding's absolute path, still warns when that file changes; an absolute path outside the repository matches only itself (#845).
Loading
Loading