Skip to content

Don't skip CVE Phase 2 re-verification on a TypeError - #31

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-bug-management-3d84
Draft

cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-bug-management-3d84

Conversation

@cursor

@cursor cursor Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Bug and impact

On every AI-enabled scan that produced Phase 1 verifier signals, the default-engine verifier Phase 2 sensor crashed with TypeError: reverify_with_context() missing 1 required positional argument: 'phase1_results'.

The exception is caught and logged as a warning, so the scan still finishes — but Phase 2 CVE re-verification never runs. Failed Phase 1 probes never get a second chance with full host context. Fusion treats leftover version-only CVE leads as non-findings, so confirmable CVEs stay unconfirmed.

Deep-probe scans already called the planner correctly (src/deep/coordinator.py). Only the default src/engine.py sensor was broken.

Root cause

_run_verifier2 called:

reverify_with_context(engine_ctx, complete=ctx.completer)

reverify_with_context requires (cve_ids, phase1_results, context=..., complete=...). The context dict was passed as cve_ids, and phase1_results was omitted.

Fix

Match the deep-scan path: collect unconfirmed CVE-* claims from Phase 1 signals, skip when none remain, and pass cve_ids, phase1_results, context, and complete explicitly.

Validation

  • Reproduced the TypeError against the live planner API.
  • python3 -m pytest test_verifier_sanitize.py -q — 21 passed (including new Phase 2 wiring tests).
  • Live _run_verifier2 call with the real reverify_with_context no longer emits a TypeError warning.
Open in Web View Automation 

The default-engine verifier2 sensor passed the host context dict as
cve_ids and omitted phase1_results, so reverify_with_context always
TypeError'd. The exception was swallowed as a warning, which silently
dropped Phase 2 re-verification on every AI-enabled scan.

Co-authored-by: dmitryflynn <dmitryflynn@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant