# Dependency Vulnerability & License Audit | KEV + EPSS Priority (`andok/dependency-risk-auditor`) Actor

Audit package.json, lockfiles, requirements.txt, go.mod or a GitHub repo: OSV vulnerabilities ranked by CISA KEV and EPSS, fix versions, license policy. $0.0015/package + $0.01 start.

- **URL**: https://apify.com/andok/dependency-risk-auditor.md
- **Developed by:** [Andok](https://apify.com/andok) (community)
- **Categories:** Developer tools, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 package auditeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Dependency Vulnerability & License Audit — OSV, CISA KEV and EPSS Priority

Audit the dependencies of any project and get a **ranked to-fix list instead of a wall of CVEs**. Point the Actor at a GitHub repo, a lockfile URL, a pasted `package.json` / `requirements.txt` / `go.mod`, or a plain package list. For every package it returns known vulnerabilities from **OSV.dev**, flags the ones **actively exploited in the wild (CISA KEV)**, adds the **EPSS exploit probability**, names the **minimum version that fixes everything**, and checks licenses against your policy. No API key, no login.

Most scanners rank by CVSS alone, so a lockfile with 40 "high" findings looks the same as one with a single actively exploited bug. Here every package gets a `priority`: **P0** actively exploited (CISA KEV), **P1** critical or likely to be exploited (EPSS ≥ 10%), **P2** high severity, **P3** other, `none` clean.

### What you get

One row per package:

| Field | Description |
|---|---|
| `ecosystem`, `package_name`, `version` | What was audited. Ecosystems: npm, PyPI, Go, crates.io |
| `version_source` | `pinned` (lockfile / `==`), `range-minimum` (lowest version of a range such as `^1.2.0`), or `explicit` |
| `priority` | `P0` / `P1` / `P2` / `P3` / `none` (see above) |
| `vulnerability_count`, `max_severity` | Distinct advisories (GHSA/CVE aliases merged) and the worst severity |
| `in_kev`, `max_epss` | Listed in the CISA Known Exploited Vulnerabilities catalog; highest EPSS probability |
| `recommended_version` | Lowest version that fixes the advisories OSV has a fix for |
| `vulnerabilities[]` | Per advisory: `id`, `cve`, `severity`, `summary`, `fixed_in`, `epss`, `in_kev`, `url` |
| `licenses`, `license_status` | SPDX licenses from deps.dev; `ok`, `blocked` (matches your policy) or `unknown` |
| `latest_version`, `is_outdated`, `is_deprecated`, `published_at` | Freshness signals |

A **`SUMMARY`** record in the key-value store rolls the run up: counts by priority, blocked-license packages, deprecated packages and the top upgrade steps. It is free.

### Input

| Field | Description |
|---|---|
| `githubRepos` | `owner/name`. Reads `package-lock.json` (else `package.json`), `requirements.txt`, `go.mod`, `Cargo.lock` from the default branch root |
| `manifestUrls` | Raw URLs of those files (works for private files behind a tokenised URL) |
| `manifestText` + `manifestFileName` | Paste one manifest |
| `packages` | `npm:lodash@4.17.15`, `pypi:requests==2.19.0`, `go:github.com/gin-gonic/gin@v1.6.0`, `cargo:serde@1.0.100` |
| `includeDevDependencies` | Off by default |
| `blockedLicenses` | SPDX ids to block. Default: AGPL, GPL-3.0, SSPL, BUSL |
| `onlyRisky` | Deliver and pay for risky packages only |
| `maxPackages` | Cap per run (default 300) |

#### Example: audit a repo, show only what needs attention

```json
{
  "githubRepos": ["expressjs/express"],
  "onlyRisky": true
}
```

### Pricing

Pay per event: **$0.01 per run** plus **$0.0015 per package** delivered. A 300-package lockfile costs about **$0.46**; with `onlyRisky` you pay only for the packages that need attention. The run stops at your maximum cost limit.

### Notes

- Sources: [OSV.dev](https://osv.dev) (advisories), [deps.dev](https://deps.dev) (licenses, versions), [CISA KEV](https://www.cisa.gov/known-exploited-vulnerabilities-catalog), [FIRST EPSS](https://www.first.org/epss/).
- Matching is by exact version. For `package.json` ranges the lowest version of the range is audited (`version_source: range-minimum`); use a lockfile for the exact installed tree.
- Dual-licensed packages (`MIT OR GPL-3.0`) list both licenses; review `blocked_licenses_found` before acting.
- It reports known advisories only; it does not check whether your code reaches the vulnerable function. Not legal or security advice.

# Actor input Schema

## `githubRepos` (type: `array`):

Public repos as owner/name. The Actor reads package-lock.json (or package.json), requirements.txt, go.mod and Cargo.lock from the default branch root.

## `manifestUrls` (type: `array`):

Direct (raw) URLs of package.json, package-lock.json, requirements.txt, go.mod or Cargo.lock files.

## `manifestText` (type: `string`):

Paste the contents of one manifest file. Set 'Pasted manifest file name' so the format is detected.

## `manifestFileName` (type: `string`):

package.json, package-lock.json, requirements.txt, go.mod or Cargo.lock.

## `packages` (type: `array`):

One per line as ecosystem:name@version. Ecosystems: npm, pypi, go, cargo. Example: npm:lodash@4.17.15

## `includeDevDependencies` (type: `boolean`):

Also audit devDependencies and lockfile entries marked dev.

## `blockedLicenses` (type: `array`):

Packages carrying any of these SPDX identifiers get license_status = blocked. Default blocks AGPL, GPL-3.0, SSPL and BUSL.

## `onlyRisky` (type: `boolean`):

Deliver (and charge) only packages with a vulnerability, a blocked license or a deprecation. The SUMMARY record still counts everything.

## `maxPackages` (type: `integer`):

Cap on packages audited per run (1 to 2000).

## Actor input object example

```json
{
  "githubRepos": [
    "expressjs/express"
  ],
  "manifestUrls": [],
  "manifestText": "",
  "manifestFileName": "package.json",
  "packages": [
    "npm:lodash@4.17.15",
    "pypi:requests==2.19.0"
  ],
  "includeDevDependencies": false,
  "blockedLicenses": [
    "AGPL-3.0",
    "AGPL-3.0-only",
    "AGPL-3.0-or-later",
    "GPL-3.0",
    "GPL-3.0-only",
    "GPL-3.0-or-later",
    "SSPL-1.0",
    "BUSL-1.1"
  ],
  "onlyRisky": false,
  "maxPackages": 300
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `resultsCsv` (type: `string`):

No description

## `run` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "githubRepos": [
        "expressjs/express"
    ],
    "packages": [
        "npm:lodash@4.17.15",
        "pypi:requests==2.19.0"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("andok/dependency-risk-auditor").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "githubRepos": ["expressjs/express"],
    "packages": [
        "npm:lodash@4.17.15",
        "pypi:requests==2.19.0",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("andok/dependency-risk-auditor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "githubRepos": [
    "expressjs/express"
  ],
  "packages": [
    "npm:lodash@4.17.15",
    "pypi:requests==2.19.0"
  ]
}' |
apify call andok/dependency-risk-auditor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,andok/dependency-risk-auditor"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/cShZoAPEjBVcJZHAv/builds/3y0TrVVpAwBEgeEan/openapi.json
