# 1gateway Package Vulnerability Check

> 1gateway Package Vulnerability Check is a paid API for AI agents from 1gateway.dev, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-30).

Checks whether an exact package version is vulnerable by querying OSV.dev, returning severity counts and advisory details (GHSA/CVE IDs, CVSS, CWEs, fixed versions).

## Facts

- Endpoint: GET https://1gateway.dev/v1/dev/vulnerabilities?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/1gateway-package-vulnerability-check-f99969e9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_X7iyt7OsXO8IFojvHD6eh

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 1gateway-package-vulnerability-check-f99969e9
```

Example prompt: Before I upgrade, check whether lodash version 4.17.15 on npm has any known security vulnerabilities — I need the severity breakdown and any CVE or GHSA IDs with their fixed versions.

## When to prefer this

Choose this endpoint when you need a quick, single-version vulnerability check against OSV.dev data without running a full dependency scanner locally. Ideal for agentic workflows that gate installation, deployment, or PR merges on security status. Covers a broader ecosystem range than GitHub's native Dependabot alerts for non-GitHub-hosted projects, and returns structured JSON suitable for downstream decision-making without parsing HTML advisories.

## Known failure modes

- Unknown ecosystem value returns validation error — must use supported enum values
- Package not found in the specified ecosystem returns empty vulnerability list (not an error)
- Exact version string mismatch (e.g. using 'v1.2.3' vs '1.2.3') may return no results
- Result may be truncated for packages with very large numbers of advisories (truncated: true)
- Network or OSV.dev upstream downtime returns a gateway/service error
- Payment failure (x402) if USDC balance insufficient

## How this service works

Use when an agent must check a dependency before installing or upgrading: is this exact package version vulnerable? Input: package, ecosystem (npm, PyPI, Go, Maven, crates.io, NuGet, RubyGems, Packagist...), version. Output: JSON vulnerable yes/no, counts by severity, advisories (GHSA/CVE id, summary, severity, CVSS, CWE, fixed versions, links). Data: OSV.dev. Example: ?package=lodash&ecosystem=npm&version=4.17.15

## Output

A JSON object with: a `vulnerable` boolean, total `count` of matching advisories, `bySeverity` breakdown (critical/high/moderate/low/unknown), and a `vulnerabilities` array where each item includes GHSA/CVE IDs, summary, severity, CVSS vector, CWE list, fixed versions, and advisory URLs. Also includes the package echo (name, version, ecosystem) and an OSV.dev attribution string.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "package",
      "ecosystem",
      "version"
     ],
     "properties": {
      "package": {
       "type": "string",
       "examples": [
        "lodash"
       ],
       "maxLength": 214,
       "description": "Package name as in its registry (Go: module path; Maven: group:artifact)"
      },
      "version": {
       "type": "string",
       "examples": [
        "4.17.15"
       ],
       "maxLength": 64,
       "description": "Exact released version"
      },
      "ecosystem": {
       "enum": [
        "npm",
        "PyPI",
        "Go",
        "Maven",
        "crates.io",
        "NuGet",
        "RubyGems",
        "Packagist",
        "Pub",
        "Hex",
        "Hackage",
        "CRAN",
        "SwiftURL"
       ],
       "type": "string",
       "examples": [
        "npm"
       ],
       "description": "Package ecosystem (case-insensitive; pip/python, cargo/rust, composer, gem also accepted)"
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "package",
      "vulnerable",
      "count",
      "bySeverity",
      "fixedVersionsMentioned",
      "vulnerabilities",
      "truncated",
      "attribution",
      "note"
     ],
     "properties": {
      "note": {
       "type": "string"
      },
      "count": {
       "type": "integer"
      },
      "package": {
       "type": "object",
       "properties": {
        "name": {
         "type": "string"
        },
        "version": {
         "type": "string"
        },
        "ecosystem": {
         "type": "string"
        }
       }
      },
      "truncated": {
       "type": "boolean"
      },
      "bySeverity": {
       "type": "object",
       "properties": {
        "low": {
         "type": "integer"
        },
        "high": {
         "type": "integer"
        },
        "unknown": {
         "type
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "note": "Advisories that list this exact version as affected (withdrawn ones removed). fixedIn = first fixed version per affected range; pick the lowest one above your …",
  "count": 6,
  "package": {
   "name": "lodash",
   "version": "4.17.15",
   "ecosystem": "npm"
  },
  "truncated": false,
  "bySeverity": {
   "low": 0,
   "high": 3,
   "unknown": 0,
   "critical": 0,
   "moderate": 3
  },
  "vulnerable": true,
  "attribution": "Vulnerability data from OSV.dev (https://osv.dev), CC BY 4.0, aggregating GitHub Advisory Database, PyPA, Go, RustSec and other sources.",
  "vulnerabilities": [
   {
    "id": "GHSA-r5fr-rjxr-66jc",
    "cve": "CVE-2026-4800",
    "cwe": [
     "CWE-94"
    ],
    "url": "https://osv.dev/vulnerability/GHSA-r5fr-rjxr-66jc",
    "cvss": {
     "type": "CVSS_V3",
     "vector": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"
    },
    "aliases": [
     "CVE-2026-4800"
    ],
    "fixedIn": [
     "4.18.0"
    ],
    "summary": "lodash vulnerable to Code Injection via `_.template` imports key names",
    "advisory": "https://nvd.nist.gov/vuln/detail/CVE-2026-4800",
    "modified": "2026-10-17T02:56:15.633068434Z",
    "severity": "HIGH",
    "published": "2026-04-01T23:51:12Z"
   }
  ],
  "fixedVersionsMentioned": [
   "4.18.0"
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/1gateway-package-vulnerability-check-f99969e9/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 1gateway.dev](https://www.zero.xyz/host/1gateway.dev/llms.txt)
