<!-- Copyright (c) 2026 defconxt. All rights reserved. -->
<!-- Licensed under AGPL-3.0 — see LICENSE file for details. -->
<!-- NERF is a trademark of defconxt. -->
# Vulnerability Remediation — API Reference

## Nessus API

```bash
# Authenticate
curl -k -X POST https://nessus:8834/session -d '{"username":"admin","password":"pass"}'

# List scans
curl -k -H "X-ApiKeys: accessKey=...; secretKey=..." https://nessus:8834/scans

# Export scan results
curl -k -H "X-ApiKeys: ..." https://nessus:8834/scans/{scan_id}/export -d '{"format":"json"}'

# Download export
curl -k -H "X-ApiKeys: ..." https://nessus:8834/scans/{scan_id}/export/{file_id}/download
```

## Qualys API

```bash
# VM scan results
curl -u "user:pass" "https://qualysapi.qualys.com/api/2.0/fo/scan/?action=list"

# Host detection list
curl -u "user:pass" "https://qualysapi.qualys.com/api/2.0/fo/asset/host/vm/detection/?action=list&show_results=1"

# Knowledge base lookup
curl -u "user:pass" "https://qualysapi.qualys.com/api/2.0/fo/knowledge_base/vuln/?action=list&ids=12345"
```

## NVD / EPSS APIs

```python
import requests

# NVD CVE lookup
resp = requests.get("https://services.nvd.nist.gov/rest/json/cves/2.0?cveId=CVE-2024-1234")
cve_data = resp.json()

# EPSS score lookup
resp = requests.get("https://api.first.org/data/v1/epss?cve=CVE-2024-1234")
epss_data = resp.json()
```

## CVSS Severity Mapping

| CVSS Score | Severity | Default SLA |
|-----------|----------|-------------|
| 9.0-10.0 | Critical | 7 days |
| 7.0-8.9 | High | 14 days |
| 4.0-6.9 | Medium | 30 days |
| 0.1-3.9 | Low | 90 days |

## Exit Codes

| Code | Meaning |
|------|---------|
| 0 | All findings remediated or plan generated |
| 1 | Unresolved critical/high findings remain |
| 2 | Runtime error or API failure |
