Repository navigation
Conversation
Run osv-scanner during setup, persist the result to osv-findings.json, and inject a summary of known-vulnerable dependencies into the threat-model prompt so the model writes the Threat model and patterns-to-flag sections with those advisories in view (and reasons about whether each is reachable, not just present). - osv-enrich.ts: run osv-scanner, parse results, drop vendored sources (.deepsec/node_modules/vendor), keep each advisory's id + one-line summary so the ids are self-explanatory, and write osv-findings.json as a first-class artifact. - repository-analysis.ts: optional dependencyContext appended to the threat-model prompt. - coordinator.ts: run osv before the info phase and pass the context through. Degrades cleanly when osv-scanner is absent or finds no package sources. Hermetic tests cover parsing, vendored-source filtering, summaries, and prompt injection. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ning osv-scanner only reads pinned lockfiles, so a source package that declares dependency ranges in a manifest (no lockfile) reports "no package sources" and every dependency CVE is missed. Resolve the manifest to its lowest allowed versions — the worst-case / applicable-CVE floor, since a `>=` constraint permits a build to land on that floor — with `uv pip compile --resolution lowest`, then hand osv-scanner the resolved lockfile alongside the recursive source walk. The resolved lockfile is written to a temp dir (so its osv source path is not treated as vendored) and a copy is kept as deps-lowest.txt evidence next to osv-findings.json. Degrades cleanly: when uv is missing or the manifest cannot be resolved, the scan falls back to the source walk unchanged. On a bare pyproject.toml (fastapi, range-only) this surfaces 22 advisories across anyio/idna/starlette where the source walk alone found none. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ories (phase 2) Phase 1 fed dependency CVEs into the threat model, which shapes the per-finding investigation. But matcher generation — the step that decides which code even becomes a scan candidate — only ever filled surface-coverage gaps; it never saw the CVEs. So a dependency advisory was only surfaced when its code happened to also be an uncovered surface (incidental), and a CVE in already-covered or non-surface code was never flagged at all. Pass the threat model (INFO.md) and the known-vulnerable dependency count into proposeMatchers. When the project has vulnerable deps, the prompt asks the agent to also propose matchers anchored to the reachable advisories' call sites (e.g. a form-parsing call with no size/field limit), skipping the ones the threat model marks not-reachable. The coordinator runs one matcher pass even when every surface is already covered, so a dependency CVE in non-gap code still gets a matcher. Degrades cleanly: no vulnerable deps or no threat model → unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…kpoints) Addresses the automated review on the dependency-CVE adapter: Security: - uv is now sandboxed when resolving a repo-controlled manifest: `--no-build` (no PEP 517 build hooks / dynamic-metadata project builds), `--no-sources` (ignore attacker `[tool.uv.sources]`), and an empty temp cwd (no project `uv.toml`/`[tool.uv]`). Resolution still works; repo code never executes. - Sanitize package name/version (collapse whitespace, clamp length) before they reach the threat-model prompt — blocks newline/markdown injection from attacker-controlled lockfile fields. - osv-scanner now runs with a timeout (it had none) so a stalled scan can't wedge the info phase indefinitely. - Probe for uv/osv-scanner on PATH; a missing tool is reported distinctly (warn, no artifact) instead of writing an empty osv-findings.json that reads as "no vulnerable dependencies". Correctness: - Skip floor resolution when an authoritative lockfile exists (uv.lock, poetry.lock, requirements.txt, …) so installed/patched versions aren't overridden by hypothetical floor versions (false positives). - Resolve both lowest and highest allowed versions (widens range coverage). - Resolve every manifest in a monorepo, not just the first. - Dedupe parseOsv by name@version@ecosystem (a package can surface from multiple resolved lockfiles). - Matcher prompt: require closesSurfaceIds (the schema rejects empty, which could abort setup) — point it at the surface the vulnerable call sits in. Checkpoints / durability: - Bump rubricVersion (2 -> 3) so existing projects re-run and gain the enrichment. - Don't restore the pre-osv INFO.md over the CVE-enriched threat model. - Run the dependency-CVE matcher pass only on first generation, not every resume. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…d on vercel-labs#190) osv-scanner can't read a bare pom.xml. syft resolves the Maven project into a CycloneDX SBOM, which osv-scanner then matches against advisories (reusing our osv tool, not grype). syft is probed on PATH and run with a timeout; it only catalogs (no build/exec). parseOsv dedup already merges a package seen from both osv's pom parse and the SBOM. Stacked on vercel-labs#190 (the Python osv adapter + hardening); this commit is the Java addition on top. Validated end-to-end on WebGoat (xstream 1.4.5 -> 36 advisories, SBOM resolved, CVE-targeted matcher generated). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
@Nehanth is attempting to deploy a commit to the Vercel Labs Team on Vercel. A member of the Team first needs to authorize it. |
| "--exclude", | ||
| "./vendor/**", | ||
| "--exclude", | ||
| "./node_modules/**", | ||
| "--exclude", | ||
| "./third_party/**", | ||
| "--exclude", |
🤖 auto-maintain reviewAutomated, advisory triage for
Review panel: 🔴 high highest severity deepsec maintainer code review: 🟡 medium
General code review: 🔴 high
Scanner and matcher quality: 🔴 high
Sandbox and credential boundaries: 🔴 high
Durability and distributed state: 🟡 medium
Posted by auto-maintain. This automated code review is advisory; a human maintainer makes the call. |
What
Extends the osv dependency-CVE adapter to Java/Maven. osv-scanner can't read a bare
pom.xml("no package sources"), so Maven dependency CVEs were invisible.syftresolves the Maven project into a CycloneDX SBOM, which osv-scanner then matches against advisories — reusing the existing osv tool rather than adding grype. Runs alongside the Python floor-resolver; excludes mirror the vendored-tree filter; the SBOM is kept asdeps-sbom.cdx.jsonevidence.Hardening (consistent with #190)
syftis probed on PATH and run with a timeout; it only catalogs (no build/exec), so no sandbox flags are required.parseOsvdedupes by name@version@ecosystem — osv-scanner parses a simplepom.xmlduring the recursive walk and the SBOM, so the same package can appear twice.Validation (end-to-end, real harness)
xstream 1.4.5):syft→SBOM→osv surfaced 36 advisories; the threat model pinned reachability; matcher steering generated anxstream-fromxml-deserializationmatcher.Scope
syftmissing → falls back to the source walk unchanged.🤖 Generated with Claude Code