# CVE, CISA KEV, EPSS & NVD Vulnerability Lookup | SecPulse (`liebreich-software/secpulse-cve-epss-cisa-kev-enricher`) Actor

Bulk CVE vulnerability lookup, scanner triage & intelligence API combining official CISA Known Exploited Vulnerabilities (KEV), FIRST.org EPSS 30-day exploit probability & NIST NVD CVSS v4.0/v3.1 into deterministic SLA patch tiers ($0.008/CVE).

- **URL**: https://apify.com/liebreich-software/secpulse-cve-epss-cisa-kev-enricher.md
- **Developed by:** [Seyithan Akay](https://apify.com/liebreich-software) (community)
- **Categories:** Developer tools, AI, MCP servers
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$8.00 / 1,000 cve enriched (kev + epss + nvd)s

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/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

## SecPulse — Official CISA KEV, FIRST EPSS & NIST NVD CVE Priority Enricher

**SecPulse by Liebreich Software** re-answers the question every security,
NIS2-, ISO-27001-, EU-DORA- and DevSecOps team faces daily: *of thousands of
scanner-reported CVEs, which ~2 % are actually exploited in the wild — and
which must be patched within 24 hours?*

SecPulse enriches CVE IDs with **100 % official, key-less public APIs** —
zero API keys, zero proxies, zero CAPTCHAs:

| Source | Endpoint | Data delivered |
|---|---|---|
| **CISA KEV** | `cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json` | Active-exploitation listing, `knownRansomwareCampaignUse`, `dateAdded`, `dueDate`, `requiredAction`, `vendorProject`, `product` |
| **FIRST EPSS** | `api.first.org/data/v1/epss` | 30-day exploit probability (`0.0–1.0`) + percentile, batched ≤ 50 CVEs/request |
| **NIST NVD** | `services.nvd.nist.gov/rest/json/cves/2.0` | CVSS v4.0/v3.1/v3.0/v2.0 base score, severity, vector, CWEs, status, description — polite retries on HTTP 429/503 |

On top sits a **deterministic patch-prioritization engine** (`secpulse/scorer.py`)
that fuses all signals into a transparent `priorityScore` (0–100) and an
actionable `slaTier`:

| SLA Tier | Threshold | Meaning |
|---|---|---|
| `FIX_NOW_24H` | score ≥ 85 | KEV + ransomware, or KEV + EPSS ≥ ~0.5 — patch today |
| `URGENT_7D` | score ≥ 65 | KEV-listed, or EPSS ≥ 0.2 + CVSS ≥ 7.5 — patch this week |
| `SCHEDULED_30D` | score ≥ 40 | CVSS ≥ 7.0 without known active exploit — next cycle |
| `MONITOR` | score < 40 | Low EPSS + low CVSS — saves ~80 % unnecessary patch panic |

Every record carries a machine-readable `rationale` list explaining exactly
why it scored what it scored — audit-defensible for NIS2 / ISO 27001 / DORA
evidence.

### Pricing (Pay-Per-Event)

| Event | Price | Charged when |
|---|---|---|
| `cve-enriched` | **$0.008 / CVE** ($8.00 / 1,000) | Status `ok` or `partial` — at least one official authority returned real data |

`invalid_cve_id`, `not_found`, `upstream_unavailable` and `error` records are
pushed to the dataset for full transparency but are **always $0.00**. Charging
happens strictly *before* each dataset push with deterministic idempotency
keys and budget-exhaustion stop — the actor can never overspend your PPE
budget.

The 1-click default input (`CVE-2021-44228` Log4Shell + `CVE-2024-3094`
XZ Utils backdoor) costs exactly **$0.016** and demonstrates KEV + EPSS + NVD
enrichment end-to-end.

### Actor Input

| Field | Type | Default | Description |
|---|---|---|---|
| `cveIds` | array | `["CVE-2021-44228","CVE-2024-3094"]` | CVE IDs, case-insensitive, auto-normalized + deduplicated (`^CVE-\d{4}-\d{4,7}$`) |
| `cisaKevRecentDays` | int 0–90 | `0` | Also enrich all CVEs newly added to CISA KEV in the last N days |
| `cisaKevVendorFilter` | string | `""` | KEV vendor/product filter (e.g. `Fortinet`, `Ivanti`, `Microsoft`, `Atlassian`) |
| `includeNvdDetails` | bool | `true` | NIST NVD CVSS/CWE/description lookup |
| `includeEpss` | bool | `true` | FIRST EPSS probability/percentile |
| `maxItems` | int 1–200 | `25` | Max CVEs enriched per run |
| `exportCsvToKeyValueStore` | bool | `true` | OWASP-safe `VULN_TRIAGE_CSV` + SHA-256 seal |

### Use Cases

- **NIS2 / DORA vulnerability management:** prove to auditors which CVEs were
  triaged by exploitation evidence (KEV) and statistical exploit probability
  (EPSS), not just CVSS severity — with hash-sealed CSV evidence export.
- **ISO 27001 patch management:** SLA-tiered remediation queues
  (`FIX_NOW_24H` → `MONITOR`) mapped to your change-management windows.
- **DevSecOps / ASPM pipelines:** drop SecPulse into n8n, Make or GitHub
  Actions after every scanner run; only billable, authority-backed records
  are charged.
- **Threat-intel monitoring:** `cisaKevRecentDays` + vendor filter surfaces
  newly weaponized CVEs for your stack within hours of CISA listing.

### MCP Server (batch-honest)

`mcp_server.py` exposes three tools over JSON-RPC 2.0 (stdio) and optional
FastAPI HTTP (`POST /mcp`):

- `enrich_cves` — **batch** enrichment of up to 50 CVE IDs per call
  (KEV + EPSS batched ≤ 50/request + NVD per-CVE). This is the recommended
  path for Claude/MCP security workflows — one call, one dataset.
- `get_cve_priority` — single-CVE triage record.
- `list_recent_cisa_kev` — KEV discovery by recency/vendor without NVD load.

Note: NVD lookups are inherently per-CVE (official API has no multi-ID
endpoint), so very large batches take proportionally longer — the actor caps
work at `maxItems` and paces NVD politely to respect the key-less rate limit.

### Local CLI

```bash
## 1-click demo (2 CVEs, ~$0.016 on platform)
python -m apify_main --cves "CVE-2021-44228,CVE-2024-3094"

## KEV discovery: last 14 days, Fortinet only
python -m apify_main --cves "" --kev-recent-days 14 --kev-vendor "Fortinet"

## Arbitrary JSON input (same schema as the actor)
python -m apify_main --input-json '{"cveIds":["CVE-2023-44487"],"maxItems":10}'
```

### Library usage

```python
import asyncio
from secpulse.service import SecPulseEngine
from secpulse.models import EnrichmentOptions

async def main():
    engine = SecPulseEngine()
    results = await engine.enrich_many(
        ["cve-2021-44228", "CVE-2024-3094", "not-a-cve"],
        options=EnrichmentOptions(include_nvd_details=True),
        max_items=25,
    )
    for r in results:
        print(r.cve_id, r.status, r.sla_tier, r.priority_score, r.rationale)

asyncio.run(main())
```

### Deployment

```bash
apify push   # builds Dockerfile, validates .actor/* schemas, publishes
```

### Tests

```bash
pytest -p no:cacheprovider   # 50+ unit tests, fully mocked upstreams
```

Covers CVE validation/dedupe, KEV matching & recent-days/vendor filters, EPSS
batching, NVD v3.1/v4.0/fallback parsing, graceful degradation on HTTP 429/503,
all four SLA tiers, OWASP CSV export and the budget-safe PPE charge contract
(limit 0, mid-batch stop, zero-charge on `invalid_cve_id`).

# Actor input Schema

## `cveIds` (type: `array`):

CVE identifiers to enrich (case-insensitive, e.g. 'cve-2021-44228' is normalized to 'CVE-2021-44228'). Identical normalized IDs are deduplicated. May be empty when using CISA KEV discovery mode below.

## `cisaKevRecentDays` (type: `integer`):

When > 0, additionally enrich every vulnerability added to the CISA Known Exploited Vulnerabilities catalog within the last N days (1-90). Set to 0 to disable. Also activates automatically when cveIds is empty and cisaKevVendorFilter is set.

## `cisaKevVendorFilter` (type: `string`):

Optional case-insensitive substring filter on CISA KEV vendorProject/product, e.g. 'Fortinet', 'Ivanti', 'Microsoft', 'Atlassian'. Applies to KEV recent-days discovery.

## `includeNvdDetails` (type: `boolean`):

Query the official NIST NVD CVE API v2.0 for CVSS v4.0/v3.1/v3.0/v2.0 base score, severity, vector, CWEs, status and description. Disable to halve runtime (KEV + EPSS still delivered).

## `includeEpss` (type: `boolean`):

Query the official FIRST.org EPSS API v1 (batched, up to 50 CVEs per request) for 30-day exploit probability and percentile.

## `maxItems` (type: `integer`):

Maximum number of CVEs enriched per run (explicit cveIds first, then discovered KEV entries). 1-200.

## `timeoutSeconds` (type: `number`):

Network timeout per upstream API call in seconds (3.0 to 30.0).

## `exportCsvToKeyValueStore` (type: `boolean`):

Write an OWASP formula-injection-safe VULN_TRIAGE_CSV file plus its SHA-256 hash to the Apify Key-Value Store for security-audit/NIS2/ISO 27001 evidence archival.

## Actor input object example

```json
{
  "cveIds": [
    "CVE-2021-44228",
    "CVE-2024-3094"
  ],
  "cisaKevRecentDays": 0,
  "cisaKevVendorFilter": "",
  "includeNvdDetails": true,
  "includeEpss": true,
  "maxItems": 25,
  "timeoutSeconds": 15,
  "exportCsvToKeyValueStore": true
}
```

# Actor output Schema

## `enrichments` (type: `string`):

Dataset containing one record per input/discovered CVE with authority data, SLA tier, priority score and status.

## `triageCsv` (type: `string`):

OWASP-safe CSV export of all records plus SHA-256 hash in the Key-Value Store.

# 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 = {
    "cveIds": [
        "CVE-2021-44228",
        "CVE-2024-3094"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("liebreich-software/secpulse-cve-epss-cisa-kev-enricher").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 = { "cveIds": [
        "CVE-2021-44228",
        "CVE-2024-3094",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("liebreich-software/secpulse-cve-epss-cisa-kev-enricher").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 '{
  "cveIds": [
    "CVE-2021-44228",
    "CVE-2024-3094"
  ]
}' |
apify call liebreich-software/secpulse-cve-epss-cisa-kev-enricher --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,liebreich-software/secpulse-cve-epss-cisa-kev-enricher"
        }
    }
}
```

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/bptYk19UujXAwhhQs/builds/5m85YAD4rzVwdE5Qs/openapi.json
