Repository navigation
Closed
Labels
priority/p1-highPriority P1: high-impact work for the next planned milestonescope/reviewMulti-persona code review engine, verification, and findingstype/securityType security: a vulnerability or a leak
Milestone
Description
Problem
A review must treat the tree it reviews as untrusted, but three paths run its code or follow its instructions. Found while analysing review session 20261001-224227 (2026-10-02).
- Code execution from the reviewed tree (HIGH).
_module_typechecks_clean(ai/review/verification.py:1109-1127) runs["uv", "run", "mypy", "--strict", <cited file>]outside the sandbox, with nocwd, so it runs wherever the CLI was started.- Started inside a repository under review,
uv runsyncs that project and runs its build backend, and mypy loads that project's config and plugins. - The loop analysis probed it: a repository with an in-tree
backend.pyhad it executed byuv run mypy. - Trigger: any finding phrased as a None dereference on a
.pyfile (_check_none_dereference_hallucination).
- A branch can loosen its own review (LOW).
devops review branchreadsAGENTS.mdand.devops/review.mdfrom the branch's working tree:pipeline.py:2150-2178, withtarget_dir=repo_pathatcommands/review.py:544.- It puts them into the persona system prompt ("Adhere to target project conventions",
classification.py:62-71) and into the verifier. - So a branch written by an agent or a contributor can add exemptions that suppress findings about itself.
- PR reviews already take conventions from the base revision (
runner.py:1984-2012), and branch reviews should match.
- Corpus reviews inherit devops-cli's conventions.
_nearest(review_environment.py:45-59) walks up from a corpus under.data/reviews/corpora/...to the devops-cli checkout. Every benchmark review therefore gets devops-cli'sAGENTS.mdand.devops/review.md, and neither is inprompt_digest.- feat(ai): model-in-the-loop prompt benchmarking #413 and feat(review): per-model review quality baseline for the devops-review pool #475 arms are scored with conventions the arm did not choose.
Acceptance criteria
- The type probe runs nothing from the target. It runs
[sys.executable, "-m", "mypy", "--strict", "--no-incremental", "--config-file", <empty temp ini>, <file>]withcwdset to a temporary directory, or it is skipped when the cited file is outside devops-cli's own source tree.- Test 1: patch
run_subprocessand assertargv[0]is notuv,--config-fileis present, andcwdis outside the target. - Test 2: a temp repository with an in-tree build backend that writes a marker.
_check_none_dereference_hallucinationon a None-dereference finding there writes no marker.
- Test 1: patch
- Branch reviews take conventions from the base revision (the merge base), as PR reviews do. Test: a branch that adds an exemption to
.devops/review.mddoes not see it in its own persona or verifier prompt. - The conventions lookup stops at a corpus root (its manifest marks it), and
profile.jsonrecords a digest of the conventions used. Test: a corpus generated under a temp repository containing.devops/review.mdreads no conventions. uv run devops cipasses.
Key questions
- Skip the type probe for files outside devops-cli, or isolate it? Isolate it (proposed): an empty config and a temp
cwdkeep the guard useful for any Python target, and nothing from the target runs. - Is this a critical fix? Yes: a security fix for a code-execution path.
Metadata
Metadata
Assignees
Labels
priority/p1-highPriority P1: high-impact work for the next planned milestonescope/reviewMulti-persona code review engine, verification, and findingstype/securityType security: a vulnerability or a leak
Type
Projects
- StatusShow more project fieldsDone
Activity
fix(security): reviews run nothing from, and take no conventions from…
dan-petty commentedon Oct 2, 2026
Closed by #976, 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)