Skip to content

fix(review): findings are lost between the model reply and the report #512

Closed

Description

@dan-petty

Part of #509.

Problem

Findings are lost between the model's reply and the report, with no model involved and no trace left:

  1. Scanner findings overwritten (pipeline.py:1622): payload.findings = consolidate_duplicate_findings(file_findings) replaces the Gitleaks, Bandit, Semgrep, Trivy and OSV findings seeded at pipeline.py:1273-1285 with the persona findings alone. The error paths (:1629, 1730, 1864, 1879) set payload.findings = [].
  2. Whole-reply parse loss (review_schema.parse_review_response): one malformed field returns None for the whole reply. Reproduced with a valid SQL-injection finding plus "external_dependencies": ["requests"]. The same happens with wrapper keys ({"issues": [...]}), stray {} in prose, and a literal <think> in a finding, which truncates the reply.
  3. Different defects merged (_are_findings_duplicate, _merge_two_findings): titles with Jaccard ≥ 0.5 merge at any line. Reproduced: "Missing timeout" with "Missing authorization check", and two "Hardcoded secret" findings at lines 5 and 90. The merge keeps the first location and can mix a verified status with an invalidated finding's severity and description.
  4. Titles blanked (sanitize_finding_text): "Looks good overall, but token is logged in plaintext", "Checking of token expiry is missing" and "Verification criteria list is never deduplicated" become empty and are dropped.
  5. Model-set status trusted: a persona reply with "status": "INVALIDATED" or "MITIGATED" skips verification and is filtered out.
  6. Redaction rewrites code (mask_secrets on review pages): password = hashlib.md5(pw.encode()).hexdigest() becomes password=<masked-password>, and token = req.query.token becomes token=<masked-token>.
  7. Severities flattened: BLOCKER, P0 and SEVERE become MEDIUM.

Acceptance criteria

  • Each case has a test that reproduces the loss first.
  • Scanner findings reach the report alongside persona findings.
  • A reply keeps every valid finding.
  • Distinct defects stay distinct.
  • Redaction masks secret values only, never code.

Activity

  1. added this to the v0.2.23 milestone on Sep 24, 2026
  2. added
    type/bug
    scope/review
    priority/p0-critical
    on Sep 24, 2026
  3. dan-petty commented on Sep 24, 2026

    @dan-petty
    OwnerAuthor

    Closed by #517, merged into release/v0.2.23.

    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.

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/p0-criticalscope/reviewtype/bug

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions