Architecture Features.md
View source on GitHub ↗
Features
VulnParse-Pin (vpp) v2.1.0 (Apache-2.0) combines streaming multi-scanner ingestion, persistent 14-table DuckDB storage, threat-intelligence enrichment, explainable offline ML (ACI@3.0 + Pre-KEV), dual-track scoring, CISA BOD 26-04 SSVC triage, minimum-patch remediation optimization (Remediation@1.0) with counterfactual simulation, automated assets.yaml compilation and drift auditing, scan-over-scan drift detection, Decision Defense Dossiers, a zero-dependency local browser GUI, an optional Textual TUI, and a read-only-by-default MCP server.
- Multi-Scanner Streaming Ingestion: Ingests and normalizes Nessus (
.nessusXML,.csv), OpenVAS (.xml), Qualys (.xml,.csv), SARIF 2.1.0 (Trivy,Grype,Clair,Semgrep,CodeQL,Bandit), Nuclei JSONL (.jsonl), and Nmap (.xmlhost context) via bounded 64 KB format sniffing (SchemaDetector) and 10,000-row streamingiter_batches()parsers. Experimental JSON parser paths (openvas-json,nessus-json) remain available for legacy compatibility. - Persistent 14-Table DuckDB Workspace (
.vpp.db): Stores normalized runs across a 14-table columnar schema (runs,assets,asset_aliases,findings,finding_evidence,finding_cves,enrichment_snapshots,aci_signals,scores,triage_decisions,remediation_actions,remediation_action_findings,diff_events,ledger_events) with0o600POSIX creation permissions, symlink rejection, and deterministic cross-scanner deduplication (aid_v2_/fid_v2_). - Automated
assets.yamlInventory Compilers, Drift Audit & Shadow Bootstrap (vpp assets): Compiles normalizedassets.yamlrules fromnetbox-json,netbox-csv,aws-ec2,gcp-compute,azure-vm, genericcsv, andnmap-xml(--source auto, repeatable--column-map FIELD=HEADER,--mergepreserving manually pinned fields, honestinternet_facing: nullprivate-only defaults), audits workspace drift (vpp assets audit --fail-on none|shadow|stale-rules|any), and bootstraps Shadow-IT stubs (vpp assets bootstrap). - Pattern
assets.yaml&decisions.yaml: Draft 2020-12 schema-validatedAssetContextMatcher(5-tier precedence:alias/asset_id→ exact IP/FQDN/URI/image → longest-prefix CIDR →fnmatchcaseglob →unmatched_shadowvisibility) andDecisionsRegistry(deferred,accepted,mitigated) with assumption predicates (expires_at,in_kev,max_epss,max_epss_percentile,internet_facing,max_cvss). - Unified Threat-Intelligence Enrichment: Hydrates scan-matched CVEs and PURLs from CISA KEV, FIRST EPSS v5 (
#model_version, raw probability, percentile, and 90-day velocity slopesepss_delta_7d/epss_delta_30d/epss_slope), NVD (CVSS v4.0 / v3.x / v2.0 withNVD > CNA > GHSA > OSV > Scanner-Supplied > Missingprecedence), Exploit-DB, opt-in GHSA (--ghsa, includingghsa_package_indexPURL lookup), and optional offline OSV (--osv), cached in0o600HMAC/SHA-256 verified SQLite indexes. - Dual-Track
Scoring@3.0& Signal Reliability: Vectorized DuckDB scoring across Track A (cve_threat, monotonic EPSS v5 piecewise breakpoints, non-double-counted KEV + verified exploit) and Track B (exposure_weakness), weighted bydetection_modeSignal Reliability (credentialed_host/active_dast1.0,sca_container0.90,uncredentialed_banner0.85,static_sast0.55), with clean-room Apache-2.0 CVSS v2.0/v3.x/v4.0 calculation and fullscore_trace. - Attack Capability Inference (
ACI@2.0/ACI@3.0) & Pre-KEV Breakout Detector (vpp ml): Combines rule-based capability/chain inference with< 2 MBsigned distilled core ML models (aci_v3_core,pre_kev_v1_core,ml.mode: off | shadow | activedefaulting toshadow), top-K signed attributions inscore_trace["ml_aci"], Pre-KEV breakout alerts (pre_kev_threshold: 0.65), optional[ml](onnxruntime) /[ml-train](scikit-learn) extras, andRunManifestml_governancesealing. - Minimum-Patch-Set Optimizer (
Remediation@1.0) & Counterfactual Simulator (vpp simulate): Lazy-greedy weighted set-cover optimizer grouping active findings into rankedupgrade_package,rebuild_image,remediate_service, andfix_code_locationactions. Supports read-only counterfactual simulations by--action-id,--top,--action-type,--target, or--goal(clear-kev|clear-p1|clear-3day|clear-pre-kev|risk-pct), exporting QBR Markdown/JSON and standalone zero-CDNsimulator-html. - CISA BOD 26-04 SSVC &
Triage@2.0: Supports--profile defaultand--profile bod-26-04, mapping findings to SSVC actions (Act,Attend,Track*,Track), priority tiers (P1,P1b,P2,P3,P4), SLA buckets (3-day + Forensic Triage,14-day,60-day,Fix on Upgrade), astatic_sastP1-cap guardrail, anddecisions.yamlreconciliation. - Scan-Over-Scan Diff Engine (
vpp diff): Compares.vpp.dbruns (or two scan files on the fly) to detect newly introduced high-risk findings, threat-intel escalations (KEV additions, Pre-KEV breakouts, EPSS0.04/0.10or percentile90th/95thcrossings, CVSS+1.0jumps,internet_facingflips), verified remediations, shadow-asset deltas, and stale-assumption deferral invalidations (--fail-on p1|p2|kev|pre-kev|stale-assumption|none, exit code2on breach). - Zero-Dependency Local Browser GUI (
vpp gui&vpp demo --gui): Built-in localhost workbench (127.0.0.1:8787, zero Node/Electron/CDN dependencies) sharing the 7-tab HTML interface (Overview,What-If Simulator,Findings & Trace,Assets & Shadow IT,Deferrals & Waivers,Diff & Drift,Exports & Proof). Read-only by default with strict CSP (frame-ancestors 'none') and 256-bitX-VPP-CSRFprotection; opt-in--allow-writelogs hash-chainedGUI_DEFERRAL_RECORDEDandGUI_ASSET_RULE_PROMOTEDledger events. - Agentic MCP Server (
vpp mcp) & SEP-1865 Workbench: Pure-Python JSON-RPC 2.0 MCP server (stdioand hardenedstreamable-httpwith non-loopback--auth-token-envBearer auth andHost/OriginDNS-rebinding defense) opening.vpp.dbread-only by default, exposing 7 read-only tools + 3 opt-in--allow-writetools, the zero-CDN SEP-1865ui://vpp/workbench.htmlHTML UI, and turn-keyplugins/vpp-mcp/. - Dossiers, Roadmaps, Simulator HTML & Exporters (
vpp export): Self-contained offline Jinja2 HTML & Markdown Decision Defense Dossiers, Executive Roadmaps, standalone What-If Simulator HTML (--formatchoices:dossier-md,dossier-html,roadmap-md,roadmap-html,remediation-json,remediation-md,simulator-html,csv,json), PR diff comments (--output-pr-comment), and custom--template-diroverrides. - Interactive Textual TUI (
vpp ui): Optionalvulnparse-pin[ui]terminal workbench over.vpp.dbsupporting instant tier/track/KEV/Pre-KEV/shadow filtering (1–4,t,k,b,u,/), remediation plan view (a), livescore_trace& merged multi-scanner evidence inspection, diff/stale-assumption review (d), one-key dossier export (e/E), and interactive deferral modals (f). - 13-Subcommand CLI & 100% Offline Demo: Purpose-built subcommands (
scan,demo,diff,ui,gui,export,verify,defer,intel,ml,mcp,assets,simulate) with a transparent legacy compatibility shim (-f/--file,--demo,--verify-runmanifest), plus an under-2-second 100% offline multi-scannervpp demo(--guior TUI). - Auditability &
RunManifestv2: Append-only SHA-256 hash-chained decision ledger (ledger_events), ML model governance hashes (ml_governance), chunked SHA-256 hashing of all written artifacts, and strictly read-onlyvpp verify <runmanifest.json>validation (verifying schema, manifest digest, ledger chain, and listed output files). - Scale & Performance: Streaming
lxml.etree.iterparse, chunkedJSONDecoder.raw_decodeSARIF parsing, DuckDBappenderingestion, vectorized scoring, and parameterized SQL queries validated up to700,000multi-scanner findings inbenchmarks/bench_scale.pywith<1.0sUI/summary queries. - Secure-by-Default I/O & Outputs: Fail-closed path policy (
PermFileHandler, symlink rejection on read/write,0o600/0o700POSIX permissions), HTTP smuggling/CSRF/CSP guards onvpp guiandvpp mcp, XXE/Billion-Laughs XML blocking, zip-traversal protection on OSV archives, CSV formula-injection sanitization (--no-csv-sanitizeblocked without--confirm-unsafe-csv), and HMAC-SHA256 signed HTTPS webhooks (--webhook-endpoint). - Nmap Attack-Surface Context (
--nmap): StreamingNmapXMLParser(NmapAdapter@1.0) mapping confirmed open ports to assets for tie-breaking and optionalscoring_port_bonuswithout blocking if omitted. - Permissive Open Source (
Apache-2.0): Released underApache-2.0starting atv2.0.0with zero copyleft Python runtime dependencies, PEP 639 packaging, SLSA provenance, and CycloneDX SBOM generation.