# Vulnerability Check

Is this package affected? OSV.dev's advisories for any npm, PyPI, Go, Maven, or crates.io package, optionally pinned to a version.

- Method: `GET`
- Path: `/v1/security/osv`

**Parameters**

| Name | Type | | Description |
|---|---|---|---|
| `ecosystem` | string | required | `npm`, `PyPI`, `Go`, `Maven`, `crates.io`, `Packagist`, `RubyGems`, or `NuGet`. |
| `package` | string | required | The package name. |
| `version` | string | optional | Pin to a version to get only the advisories that actually affect it. |
| `max_age` | integer (seconds) | optional | Ask for data no older than this. Clamped to the product's own floor, so it can narrow the window but never force a refresh on every call. |

**Example request**

```bash
curl https://api.diraz.ae/v1/security/osv \
  -H "Authorization: Bearer drz_live_…"
```

**Example response**

```json
{
  "data": {
    "package": "lodash",
    "ecosystem": "npm",
    "version": null,
    "vulnerabilities": [
      {
        "id": "GHSA-29mw-wpgm-hmr9",
        "summary": "Regular Expression Denial of Service in lodash",
        "aliases": ["CVE-2020-8203"],
        "url": "https://osv.dev/vulnerability/GHSA-29mw-wpgm-hmr9"
      }
    ]
  },
  "meta": {
    "request_id": "req_7Q2fK4mZ",
    "as_of": "2026-08-21T14:05:00.000Z",
    "age_seconds": 42,
    "next_update_at": "2026-08-21T15:05:00.000Z"
  }
}
```