From discovery to remediation — building a systematic, AI-augmented approach to finding and fixing security weaknesses before attackers exploit them.
Vulnerability scanning should only be performed on systems you own or have explicit authorization to test. Unauthorized scanning may be detected and reported.
Organizations face an ever-growing attack surface. The average enterprise has thousands of known vulnerabilities at any given time, but limited resources to fix them.
26,000+ CVEs published in 2023 alone. No team can patch everything immediately.
Not all vulnerabilities are equal. A Critical-rated CVE on an air-gapped system may be lower risk than a Medium on a public-facing server.
AI can process scan results at scale, correlate environmental context, predict exploitability, and recommend prioritized remediation — turning data overload into actionable plans.
A continuous, five-phase cycle that never truly ends — each iteration strengthens your security posture.
You cannot protect what you do not know about. Discovery combines asset inventory with vulnerability scanning.
| Tool | Type | Strengths | Best For |
|---|---|---|---|
| Nessus | Commercial | Huge plugin library, low false positives, compliance checks | Enterprise infrastructure scanning |
| OpenVAS | Open Source | Free, community-maintained, GVM framework | Budget-conscious teams, learning |
| Qualys | Cloud SaaS | Agentless cloud scanning, asset management, continuous monitoring | Large/distributed environments |
All three tools export results in structured formats (CSV, JSON, XML). Feed these directly to an LLM to summarize findings, group by remediation action, and draft executive reports.
A typical Nessus export contains structured data per finding. Here is an abbreviated CSV example:
Plugin ID,CVE,CVSS v3,Risk,Host,Protocol,Port,Name,Synopsis
11219,CVE-2023-44487,7.5,High,10.0.1.15,tcp,443,HTTP/2 Rapid Reset DoS,Remote HTTP/2 server vulnerable to DoS
20007,CVE-2023-38545,9.8,Critical,10.0.1.22,tcp,22,curl SOCKS5 Heap Overflow,libcurl SOCKS5 proxy heap buffer overflow
42873,,2.1,Low,10.0.1.15,tcp,80,SSL/TLS Certificate Info,SSL certificate uses SHA-1 signature
57582,CVE-2024-3094,10.0,Critical,10.0.2.5,tcp,22,XZ Utils Backdoor (CVE-2024-3094),Backdoored xz-utils 5.6.0/5.6.1
19506,,0.0,Info,10.0.1.15,tcp,0,Nessus Scan Information,Scan metadata and configuration
"Analyze this Nessus scan CSV. Group findings by host, highlight Critical/High items first, identify which vulnerabilities have known exploits in the wild, and recommend remediation priority."
Common Vulnerabilities and Exposures — a standardized identifier (e.g., CVE-2024-3094) for publicly known security flaws. Maintained by MITRE and NVD.
| Score Range | Severity | Typical SLA |
|---|---|---|
| 9.0 – 10.0 | Critical | 24–72 hours |
| 7.0 – 8.9 | High | 7–14 days |
| 4.0 – 6.9 | Medium | 30–60 days |
| 0.1 – 3.9 | Low | 90 days / next cycle |
| 0.0 | Informational | Track / no action |
Every CVSS score is derived from a vector string that encodes attack characteristics:
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (Score: 9.8 Critical)
AV:N = Attack Vector: Network (remotely exploitable)
AC:L = Attack Complexity: Low (no special conditions needed)
PR:N = Privileges Required: None (unauthenticated)
UI:N = User Interaction: None (no clicks needed)
S:U = Scope: Unchanged
C:H = Confidentiality Impact: High
I:H = Integrity Impact: High
A:H = Availability Impact: High
"Explain CVE-2024-3094 (XZ Utils backdoor) for a non-technical audience. Include: what it does, how it gets exploited, affected versions, and recommended fix. Parse the CVSS vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H and explain each component."
Raw scan results contain noise. Assessment separates real risk from false positives and informational clutter.
Prompt an LLM: "For each of these 47 High/Critical findings, check if a public exploit exists in ExploitDB or CISA KEV. Flag any that are actively exploited in the wild."
CVSS score alone is a poor prioritization strategy. Risk-based vulnerability management (RBVM) adds context.
"Given this scan report and the following asset inventory (with criticality tags and network zones), re-rank vulnerabilities by effective risk. Consider: CISA KEV status, EPSS score, asset criticality, and network exposure."
EPSS is a data-driven model that estimates the probability a vulnerability will be exploited in the wild within the next 30 days.
CVSS measures theoretical severity.
EPSS measures likelihood of real-world exploitation.
A CVSS 9.8 with EPSS 0.02 may be lower priority than a CVSS 6.5 with EPSS 0.87.
Feed EPSS percentiles into your AI-assisted triage workflow. Combine with CISA KEV (Known Exploited Vulnerabilities catalog) for strongest prioritization signal.
# Query EPSS API for a CVE
import requests
cve_id = "CVE-2024-3094"
resp = requests.get(f"https://api.first.org/data/v1/epss?cve={cve_id}")
data = resp.json()["data"][0]
print(f"{cve_id}: EPSS={data['epss']}, Percentile={data['percentile']}")
# CVE-2024-3094: EPSS=0.93, Percentile=0.99
Modern applications inherit hundreds of transitive dependencies. Each is a potential vulnerability vector.
| Tool | Ecosystem | Type | Integration |
|---|---|---|---|
| npm audit | Node.js | Built-in | CLI, CI/CD |
| pip-audit | Python | Open source | CLI, CI/CD |
| Snyk | Multi-language | Commercial | CLI, IDE, CI/CD, GitHub |
| Dependabot | Multi-language | GitHub native | Automated PRs |
Your package.json lists 20 packages. After install, node_modules/ contains 1,200+. Each transitive dependency is an attack surface you did not explicitly choose.
$ npm audit
# npm audit report
semver <7.5.2
Severity: moderate
semver vulnerable to ReDoS - https://github.com/advisories/GHSA-c2qf-rxjj-qqgw
fix available via `npm audit fix`
node_modules/semver
xml2js <0.5.0
Severity: moderate
xml2js is vulnerable to prototype pollution - GHSA-776f-qx25-q3cc
fix available via `npm audit fix --force`
node_modules/xml2js
jsonwebtoken <9.0.0
Severity: high
jwt algorithm confusion - https://github.com/advisories/GHSA-hjrf-2m68-5959
Depends on: semver
fix available via `npm audit fix --force`
node_modules/jsonwebtoken
8 vulnerabilities (3 moderate, 4 high, 1 critical)
To address all issues, run: npm audit fix
"Analyze this npm audit report. For each vulnerability: explain the real-world risk, whether this is exploitable in a typical Express.js web app, and rank them by urgency. Flag any that require breaking changes."
$ pip-audit
Found 4 known vulnerabilities in 3 packages
Name Version ID Fix Versions
----------- -------- -------------------- ------------
requests 2.28.0 PYSEC-2023-74 2.31.0
flask 2.2.0 CVE-2023-30861 2.3.2
cryptography 39.0.1 CVE-2023-38325 41.0.2
cryptography 39.0.1 CVE-2023-49083 41.0.6
Key observations for AI triage:
"I need to upgrade cryptography from 39.0.1 to 41.0.6. List the breaking changes between these versions. Check if my code (attached) uses any deprecated APIs."
# Scan a project
snyk test
# Monitor continuously
snyk monitor
# Scan a container image
snyk container test myapp:latest
# .github/dependabot.yml
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 10
Container images bundle OS packages, language libraries, and your code — all need scanning.
Comprehensive, fast, open-source scanner by Aqua Security. Scans images, filesystems, git repos, and Kubernetes.
# Scan an image
trivy image python:3.11-slim
# Scan and filter severity
trivy image --severity HIGH,CRITICAL \
myapp:latest
# Output as JSON for AI processing
trivy image -f json -o results.json \
myapp:latest
Open-source scanner by Anchore. Fast, SBOM-native, integrates with Syft for software bill of materials.
# Scan an image
grype python:3.11-slim
# Generate SBOM first, then scan
syft myapp:latest -o json > sbom.json
grype sbom:sbom.json
# Filter by severity
grype myapp:latest --only-fixed \
--fail-on high
$ trivy image myapp:latest
myapp:latest (debian 12.4)
==========================
Total: 142 (UNKNOWN: 2, LOW: 68, MEDIUM: 49, HIGH: 19, CRITICAL: 4)
+-----------------+------------------+----------+-------------------+---------------+
| LIBRARY | VULNERABILITY | SEVERITY | INSTALLED VERSION | FIXED VERSION |
+-----------------+------------------+----------+-------------------+---------------+
| libcurl4 | CVE-2024-2398 | HIGH | 7.88.1-10+deb12u4 | 7.88.1-10+deb12u5 |
| openssl | CVE-2024-0727 | MEDIUM | 3.0.11-1~deb12u2 | 3.0.13-1~deb12u1 |
| zlib1g | CVE-2023-45853 | CRITICAL | 1:1.2.13.dfsg-1 | |
| libc6 | CVE-2024-2961 | HIGH | 2.36-9+deb12u3 | 2.36-9+deb12u7 |
| python3.11 | CVE-2024-0450 | MEDIUM | 3.11.2-6 | 3.11.2-6+deb12u2 |
+-----------------+------------------+----------+-------------------+---------------+
Python (pip)
============
Total: 12 (HIGH: 3, CRITICAL: 1)
+-----------------+------------------+----------+-------------------+---------------+
| LIBRARY | VULNERABILITY | SEVERITY | INSTALLED VERSION | FIXED VERSION |
+-----------------+------------------+----------+-------------------+---------------+
| cryptography | CVE-2024-26130 | HIGH | 41.0.1 | 42.0.4 |
| pillow | CVE-2024-28219 | CRITICAL | 10.0.0 | 10.3.0 |
| jinja2 | CVE-2024-22195 | MEDIUM | 3.1.2 | 3.1.3 |
+-----------------+------------------+----------+-------------------+---------------+
"Analyze this Trivy scan of our production web app container. Separate OS-level and application-level vulnerabilities. Which CRITICAL/HIGH findings have fixes available? Draft a Dockerfile patch to remediate the fixable items."
The hardest question in patching: "Will this patch break something?"
prompt = """
Analyze the upgrade path from Django 4.1 to Django 5.0 for our project.
Our codebase uses:
- django.utils.timezone.utc (removed in 5.0)
- DEFAULT_FILE_STORAGE setting (replaced with STORAGES)
- url() patterns (removed, must use path())
List each breaking change, the files affected, and a migration plan.
"""
Here is what an AI-assisted analysis might return for the Django upgrade:
Risk Level: MEDIUM — 3 breaking changes found, all have documented migration paths.
Breaking Changes Detected:
==========================
1. django.utils.timezone.utc → datetime.timezone.utc
Files affected: utils/dates.py (line 12), api/views.py (line 87)
Migration: Find-and-replace import. No logic change needed.
Risk: LOW
2. DEFAULT_FILE_STORAGE → STORAGES dict
Files affected: settings/production.py (line 45)
Migration: Restructure setting to new STORAGES format.
Risk: LOW (config-only change)
3. url() → path()/re_path()
Files affected: urls.py (14 patterns), api/urls.py (8 patterns)
Migration: Convert regex patterns to path() converters.
Risk: MEDIUM — regex patterns with captures need careful conversion.
Recommendation: Stage upgrade in dev, run full test suite.
Estimated effort: 2-3 hours for experienced developer.
Remediation is not always "just patch it." There are multiple strategies depending on context and risk.
| Strategy | When to Use | Example |
|---|---|---|
| Patch/Update | Fix available, low regression risk | Apply security update to OpenSSL |
| Mitigate | No patch yet, or patch has high risk | WAF rule to block exploit payload |
| Compensating control | Cannot patch, need alternative protection | Network segmentation, IPS signature |
| Accept risk | Low impact, high patch cost, documented | Air-gapped system, scheduled EOL |
| Remove/Replace | Component is end-of-life or unnecessary | Decommission legacy service |
A structured approach to deploying patches safely across environments.
Zero-day or actively exploited vulnerabilities require an accelerated process.
Define clear remediation SLAs based on severity and asset tier. Track compliance metrics.
| Severity | Tier 1 (Critical Assets) | Tier 2 (Standard) | Tier 3 (Low-Risk) |
|---|---|---|---|
| Critical (9.0+) | 24 hours | 72 hours | 7 days |
| High (7.0–8.9) | 7 days | 14 days | 30 days |
| Medium (4.0–6.9) | 30 days | 60 days | 90 days |
| Low (0.1–3.9) | 90 days | Next cycle | Next cycle |
"Generate a weekly vulnerability status report from our Jira tickets tagged 'vuln-remediation'. Show SLA compliance by severity, overdue items, and top 5 risk contributors."
Remediation without verification is hope-based security. Always confirm the fix.
# Verify a specific CVE is resolved
trivy image --severity CRITICAL myapp:latest | grep CVE-2024-28219
# (no output = vulnerability resolved)
# Check installed package version
dpkg -l | grep openssl
# ii openssl 3.0.13-1~deb12u1 (patched version confirmed)
Combining all the concepts into an end-to-end AI-assisted vulnerability management workflow.
import anthropic, json
client = anthropic.Anthropic()
# 1. Load scan results
with open("trivy_results.json") as f:
scan_data = json.load(f)
with open("asset_inventory.json") as f:
assets = json.load(f)
# 2. AI-assisted triage
response = client.messages.create(
model="claude-sonnet-4-20250514",
max_tokens=4096,
messages=[{
"role": "user",
"content": f"""You are a vulnerability management analyst.
Analyze these Trivy scan results and prioritize remediation.
SCAN DATA:
{json.dumps(scan_data, indent=2)}
ASSET CONTEXT:
{json.dumps(assets, indent=2)}
For each vulnerability:
1. Effective risk (considering asset tier and exposure)
2. Whether a fix is available
3. Recommended remediation action
4. Estimated effort (low/medium/high)
5. SLA deadline based on our policy
Output as a prioritized remediation plan in markdown."""
}]
)
print(response.content[0].text)
Understanding what a CVE record contains helps you make faster triage decisions.
{
"id": "CVE-2024-3094",
"description": "Malicious code was discovered in the upstream tarballs of xz-utils, starting with version 5.6.0. Through a series of complex obfuscations, the liblzma build process extracts a prebuilt object file from a disguised test file in the source code, which is then used to modify specific functions in the liblzma code, producing a modified library used by OpenSSH sshd authentication.",
"published": "2024-03-29T17:15:00",
"cvss_v3": {
"baseScore": 10.0,
"baseSeverity": "CRITICAL",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H"
},
"affected_versions": ["5.6.0", "5.6.1"],
"references": [
"https://www.openwall.com/lists/oss-security/2024/03/29/4",
"https://tukaani.org/xz-backdoor/"
],
"cisa_kev": true,
"epss": 0.93
}
CVSS 10.0 + CISA KEV + EPSS 0.93 = Drop everything, patch NOW. This is a supply chain backdoor in a core library used by SSH.
A good remediation plan is actionable, time-bound, and assigns clear ownership.
## Remediation Plan — Weekly Scan 2024-W14
### IMMEDIATE (24h) — Critical, Exploited in Wild
| # | CVE | Host | Action | Owner | SLA |
|---|----------------|------------|--------------------------------|----------|---------|
| 1 | CVE-2024-3094 | 10.0.2.5 | Downgrade xz to 5.4.x | Ops Team | 24 hrs |
| 2 | CVE-2024-28219 | containers | Rebuild with pillow>=10.3.0 | DevOps | 24 hrs |
### HIGH PRIORITY (7 days)
| # | CVE | Host | Action | Owner | SLA |
|---|----------------|------------|--------------------------------|----------|---------|
| 3 | CVE-2024-2398 | 10.0.1.15 | Update libcurl4 to deb12u5 | SysAdmin | 7 days |
| 4 | CVE-2024-2961 | 10.0.1.15 | Update libc6 to deb12u7 | SysAdmin | 7 days |
| 5 | CVE-2024-26130 | containers | Upgrade cryptography to 42.0.4 | DevOps | 7 days |
### MEDIUM (30 days)
| # | CVE | Host | Action | Owner | SLA |
|---|----------------|------------|--------------------------------|----------|---------|
| 6 | CVE-2024-0727 | 10.0.1.15 | Update openssl to deb12u1 | SysAdmin | 30 days |
| 7 | CVE-2024-22195 | containers | Upgrade jinja2 to 3.1.3 | DevOps | 30 days |
### Accepted Risk
- CVE-2023-45853 (zlib): No fix available from Debian. Mitigated by WAF. Review next month.
Catch vulnerabilities before they reach production by integrating scanning into your pipeline.
# .github/workflows/security-scan.yml
name: Security Scan
on: [push, pull_request]
jobs:
dependency-scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run pip-audit
run: |
pip install pip-audit
pip-audit -r requirements.txt --fail-on-vuln
- name: Run npm audit
run: npm audit --audit-level=high
working-directory: ./frontend
container-scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build image
run: docker build -t myapp:${{ github.sha }} .
- name: Trivy scan
uses: aquasecurity/trivy-action@master
with:
image-ref: myapp:${{ github.sha }}
severity: CRITICAL,HIGH
exit-code: 1 # Fail the build on findings
Set exit-code: 1 or --fail-on-vuln to block merges with critical vulnerabilities. Alerts without enforcement get ignored.
Your organization just completed its weekly vulnerability scan. You have been handed the results and must produce an actionable remediation plan before the morning stand-up.
Correct prioritization of Critical/High items, reasonable SLA assignments, at least one compensating control identified, and a reusable AI prompt for ongoing triage.