# Real-Time Open-Source Package CVE & GHSA Vulnerability Scanner (OSV.dev)

> Real-Time Open-Source Package CVE & GHSA Vulnerability Scanner (OSV.dev) is a paid API for AI agents from onchain-risk.agentdiet.dev, paid per call via MPP, $0.01/call, status unknown (last checked 2026-10-21).

Queries live OSV.dev to return active CVEs, GHSA advisories, and patched versions for a given PyPI, npm, Go, or Rust crate package.

## Facts

- Endpoint: GET https://onchain-risk.agentdiet.dev/v1/npm-vuln-scan?utm_source=zero.xyz
- Price: $0.01/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-10-21
- Activations on Zero: 0
- Provider: onchain-risk.agentdiet.dev
- Website: https://onchain-risk.agentdiet.dev
- Canonical page: https://www.zero.xyz/c/onchain-risk-agentdiet-dev-real-time-open-source-package-cve-ghsa-da181fca
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_cTFPm2IK_Ed3RZkcyUUmL

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability onchain-risk-agentdiet-dev-real-time-open-source-package-cve-ghsa-da181fca
```

Example prompt: Can you check if the npm package lodash has any active CVEs or GHSA security advisories, and tell me which versions are patched?

## When to prefer this

Choose this endpoint when you need real-time, live vulnerability data from the authoritative OSV.dev database for PyPI, npm, Go, or Rust crate packages. It is preferable over static NVD lookups or bundled advisory databases when freshness matters, and over GitHub's own advisory API when you need a single endpoint covering multiple ecosystems uniformly.

## Known failure modes

- Package not found or ecosystem not supported returns empty vulnerability list or error
- Invalid package identifier format (missing ecosystem prefix) may return an error or unexpected results
- OSV.dev upstream unavailability causes request failure
- Network timeout if OSV.dev is slow to respond
- Payment failure (HTTP 402) if x402 USDC payment is not supplied correctly

## How this service works

Queries live Google OSV.dev vulnerability intelligence for any PyPI, npm, Go, or Rust crate and returns active CVEs, GHSA advisories, and patched versions. (Live x402 v2, IETF MPP & MCP endpoint at https://onchain-risk.agentdiet.dev/v1/npm-vuln-scan)

## Output

Returns a structured object listing all active CVE identifiers, GHSA advisories, affected version ranges, and recommended patched versions for the queried package, sourced live from Google OSV.dev.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "package"
 ],
 "properties": {
  "package": {
   "type": "string",
   "minLength": 1,
   "description": "Package identifier in 'Ecosystem:name' or 'name' format (e.g. 'PyPI:requests', 'npm:lodash', 'Go:golang.org/x/net', 'crates.io:hyper')"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/onchain-risk-agentdiet-dev-real-time-open-source-package-cve-ghsa-da181fca/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from onchain-risk.agentdiet.dev](https://www.zero.xyz/host/onchain-risk.agentdiet.dev/llms.txt)
