Skip to content

fix(review): the devsecops persona does not treat a function parameter as untrusted until it quotes where an untrusted value enters it #1052

Closed as not planned

Description

@dan-petty

Problem

In #1015's re-run (both arms pinned to qwen3-coder; .data/measurements/recall2/decision.md), 8 of the 9 false findings on src/devops_cli/ai/spend/pricing.py, across both arms, name a function parameter (provider or source_url) as the untrusted source:

Their real sources are trusted: provider comes from a closed set (ai/client/unified.py:456 accepts only ollama, claude, copilot, openai and gateway; ai/direct.py:119 passes pydantic_ai_direct), and source_url is the --source option of devops ai cost (commands/ai_cost.py:568-575, the only caller at :588). No MCP tool or server route reaches update_from_remote. The callers are in modules the review page does not show, and the persona fills the gap by assuming the worst. The project's threat model treats CLI arguments and config as trusted (.devops/review.md).

Acceptance criteria

  • The devsecops persona prompt states, as feat(review): review prompts state a threat model and an evidence bar, and send nothing the pipeline does not use #951's Servers rule does for launch paths: a function's parameter is not an untrusted source until the finding quotes where an untrusted value enters it; when the callers are not available, return no finding. A marker test pins the sentence.
  • (person-run) A path-review A/B on pricing.py and one file with a real vulnerability reached from another module, --no-cache, three samples per arm, pinned model: the no-sink and --source SSRF findings on pricing.py drop to at most 1 of 3, and the real vulnerability is still found in at least 2 of 3. The numbers go in the PR.
  • changelog.d/1052.md records the fix under ### Fixed. CHANGELOG.md is not edited.
  • uv run devops ci passes.

Key questions

Depends on: none.
Order: after #1015 (the same prompt file).
Related: #1015, #1017, #1021.

Activity

  1. added
    type/bug
    scope/ai
    scope/review
    priority/p2-medium
    on Oct 3, 2026
  2. dan-petty commented on Oct 3, 2026

    @dan-petty
    OwnerAuthor

    Frozen by the evidence-first review redesign (#1137, owner direction of 2026-10-03): patches to the model generator and verifier stop, and tool-layer fixes continue. This item sits in the persona review stage; the devsecops persona's prompt stays for chat, and only its review rule goes, which #1151 deletes together with the legacy engine (#995 lands first as its child).

    It stays open, labelled status/blocked, and closes as not planned with "Superseded by #1151" when that item lands. Do not start work on it.

  3. added
    status/blocked
    on Oct 3, 2026
  4. dan-petty commented on Oct 17, 2026

    @dan-petty
    OwnerAuthor

    Closed as not planned in the 2026-10-17 unblocking review: Superseded by #1151 (D7: close now). ADR 0005:27 and :39 reject prompt fixes for model findings, and #1151 PR 2 deletes the only stage where the prompt becomes findings. Until then, use --no-persona-review, not a review.toml suppression.

  5. removed
    status/blocked
    on Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/p2-mediumscope/aiscope/reviewtype/bug

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions