Skip to content

fix(osv): address review findings in the dependency-CVE adapter (main) - #14

Merged
Nehanth merged 1 commit into
mainfrom
sync-main-review-fixes
Oct 21, 2026
Merged

Nehanth merged 1 commit into
mainfrom
sync-main-review-fixes

Conversation

@Nehanth

@Nehanth Nehanth commented Oct 21, 2026

Copy link
Copy Markdown
Owner

Ports the review fixes to fork main (same change as commit 7ac1bc0 on the PR vercel-labs#190 branch osv-adapter-upstream).

  • Remember the last --osv / --no-osv choice so resumes and later bare init/setup don't flip it; --no-osv turns the step off.
  • Keep hand-edited INFO.md on re-runs; only the Dependency reachability verdicts are refreshed.
  • Range resolution uses lowest-direct (fastapi: 3 packages / 22 advisories → starlette / 14).
  • osv-scanner "no package sources" now clears stale findings; vendored-tree filter uses root-relative paths; uv/syft failures warn instead of reading as clean; matcher pass retries on failure and re-runs when the dependency set changes.

Unit tests: 2412 passing. Lint and typecheck clean.

🤖 Generated with Claude Code

Setup state and INFO.md handling:
- Remember the last explicit --osv / --no-osv choice in setup state, and
  carry --osv in the printed resume command. Previously a plain resume or a
  later bare init/setup flipped the info checkpoint digest, re-ran the
  analysis without dependency context, and dropped the reachability verdicts.
  --no-osv is new and is the way to turn the step back off.
- Keep a hand-edited INFO.md on every re-run. Only the agent's
  "### Dependency reachability" block is refreshed (spliced into the Threat
  model section), kept as-is when osv produced nothing, and removed when osv
  is off.
- Stop the osv section strip at the next "## " heading instead of cutting to
  end of file.
- Record the dependency matcher pass only after it completes, keyed to a
  digest of the vulnerable-dependency set, so a failed pass is retried and a
  newly found dependency gets its own pass.
- Ignore a leftover osv-findings.json when osv is disabled.

Scanning:
- Resolve ranges with --resolution lowest-direct instead of lowest, so only
  declared dependencies are floored. Plain lowest also pinned transitive
  dependencies to versions no real install picks; on fastapi this cut the
  report from 3 packages / 22 advisories to starlette / 14.
- Capture osv-scanner stderr so "No package sources found" (exit 128, empty
  stdout) is treated as a clean result and clears stale findings.
- Match vendored trees against the path relative to the project root, so a
  project checked out under a vendor/ directory is not filtered out.
- Warn when uv or syft fails to resolve a manifest instead of reporting it as
  clean.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@Nehanth
Nehanth merged commit f9c8318 into main Oct 21, 2026
@Nehanth
Nehanth deleted the sync-main-review-fixes branch October 21, 2026 17:42
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