How sachinkumarsk/unified_vulnerability_intelligence_platform works
Purpose and entry points
This is a Python 3.11+ vulnerability-intelligence pipeline: it converts heterogeneous scanner reports into a ranked, explainable remediation backlog, optional external tickets, and a Streamlit dashboard. Primary entry points are the batch CLI at Unified_Vulnerability_Intelligence_Platform/scripts/run_pipeline.py, core orchestrator Unified_Vulnerability_Intelligence_Platform/vulnpipe/pipeline.py, and dashboard Unified_Vulnerability_Intelligence_Platform/app/Dashboard.py.
Application isolation and inputs
Applications are discovered as independent data/<app>/<scanner>/ trees; each app is processed and output independently. Discovery is centralized in Unified_Vulnerability_Intelligence_Platform/vulnpipe/apps.py. Scanner-specific adapters parse Nmap, Nikto, ZAP, Nuclei, Trivy, Grype, OSV, and Semgrep reports through the registry and common normalization boundary in:
• Unified_Vulnerability_Intelligence_Platform/vulnpipe/normalizers/__init__.py
• Unified_Vulnerability_Intelligence_Platform/vulnpipe/normalizers/base.py
• Unified_Vulnerability_Intelligence_Platform/vulnpipe/schema.py
Canonical finding pipeline
Finding/asset schema is the contract between all stages. The orchestrator runs: normalize → deduplicate → suppress → enrich → score → graph/tickets → snapshot/persistence. Deduplication preserves scanner consensus as a confidence signal and uses exact, cross-scanner, fuzzy, and TF-IDF matching:
• Unified_Vulnerability_Intelligence_Platform/vulnpipe/pipeline.py
• Unified_Vulnerability_Intelligence_Platform/vulnpipe/dedup.py
• Unified_Vulnerability_Intelligence_Platform/vulnpipe/similarity.py
Noise-control boundary
Suppression is separate from deduplication and is auditable: heuristic rules, signed explicit suppressions/accepted risks with expiry, then an optional FP decision engine. CVE-bearing and multi-scanner findings are protected from heuristic suppression; KEV/exploit findings are safety-net protected in the engine. Configuration is data-driven:
• Unified_Vulnerability_Intelligence_Platform/vulnpipe/suppress.py
• Unified_Vulnerability_Intelligence_Platform/vulnpipe/fp_engine.py
• Unified_Vulnerability_Intelligence_Platform/config/suppressions.yaml
Threat enrichment, prioritization, and graphing
Enrichment adds CISA KEV, FIRST EPSS, Exploit-DB, NVD CVSS, and fix-version context, with caching and graceful offline/rate-limited behavior. Scoring combines severity, exploit likelihood, asset criticality, public exploit availability, and scanner agreement into 0–100 risk and Act/Attend/Track/Monitor decisions. NetworkX then aggregates risk over host/image/component/vulnerability relationships:
• Unified_Vulnerability_Intelligence_Platform/vulnpipe/enrich.py
• Unified_Vulnerability_Intelligence_Platform/vulnpipe/score.py
• Unified_Vulnerability_Intelligence_Platform/vulnpipe/graph.py
Outputs, persistence, and ticketing
Each run writes an out/<app>/latest.json snapshot plus ticket exports. Postgres is optional, with JSON snapshot fallback when unavailable. Ticket creation uses stable keys for idempotent GitHub Issue updates and DefectDojo reimports; GitHub is manually triggered from the dashboard while DefectDojo may run during the pipeline:
• Unified_Vulnerability_Intelligence_Platform/vulnpipe/ticketing.py
• Unified_Vulnerability_Intelligence_Platform/vulnpipe/db.py
• Unified_Vulnerability_Intelligence_Platform/docker-compose.yml
Dashboard and private upload path
The Streamlit UI loads Postgres-first or per-app output snapshots and presents findings, risk graph, tickets, and filtered findings. Browser-uploaded ZIPs are unpacked into session-scoped sessions/<id>/data and processed with DB/operator ticketing disabled; only explicit uploader-supplied credentials can publish tickets. This is a distinct trust boundary from shared data/:
• Unified_Vulnerability_Intelligence_Platform/app/data_access.py
• Unified_Vulnerability_Intelligence_Platform/app/ingest.py
• Unified_Vulnerability_Intelligence_Platform/app/pages/upload_scan.py
Runtime and integrations
Core runtime is one Python process using NumPy, Pandas, NetworkX, Streamlit, Plotly, Requests, PyYAML, and optional SQLAlchemy/PostgreSQL. Docker Compose supports Postgres; scanner scripts run external scanners through Docker. External network dependencies are optional: CISA KEV, FIRST EPSS, NVD, Exploit-DB, GitHub REST API, and DefectDojo REST API. Runtime behavior, scoring, paths, suppression, DB, and per-app ticket routing are centralized in:
• Unified_Vulnerability_Intelligence_Platform/vulnpipe/settings.py
• Unified_Vulnerability_Intelligence_Platform/config/config.yaml
• Unified_Vulnerability_Intelligence_Platform/.env.example
Main entry points: pipeline.py Pipeline orchestrator · enrich.py Threat enrichment · data_access.py Dashboard data access · ticketing.py Ticketing
Components 20
Inputs & isolation
- Batch CLI
Unified_Vulnerability_Intelligence_Platform/scripts/run_pipeline.py - App discovery · Discovers independent data/<app>/<scanner> trees.
Unified_Vulnerability_Intelligence_Platform/vulnpipe/apps.py - Scanner reports · Nmap, Nikto, ZAP, Nuclei, Trivy, Grype, OSV, and Semgrep reports.
Finding pipeline
- Normalizer registry · Adapters convert scanner reports to the canonical schema.
Unified_Vulnerability_Intelligence_Platform/vulnpipe/normalizers/__init__.py - Finding & asset schema · Shared contract between all processing stages.
Unified_Vulnerability_Intelligence_Platform/vulnpipe/schema.py - Pipeline orchestrator · Runs normalization through persistence per application.
Unified_Vulnerability_Intelligence_Platform/vulnpipe/pipeline.py - Deduplication · Uses exact, cross-scanner, fuzzy, and TF-IDF matching.
Unified_Vulnerability_Intelligence_Platform/vulnpipe/dedup.py - Auditable suppression · Applies heuristic and signed expiring suppressions before FP decisions.
Unified_Vulnerability_Intelligence_Platform/vulnpipe/suppress.py - FP decision engine · Protects KEV and exploit findings from suppression.
Unified_Vulnerability_Intelligence_Platform/vulnpipe/fp_engine.py - Threat enrichment · Adds KEV, EPSS, exploits, CVSS, and fix context with caching.
Unified_Vulnerability_Intelligence_Platform/vulnpipe/enrich.py - Risk scoring · Produces 0–100 risk and Act/Attend/Track/Monitor decisions.
Unified_Vulnerability_Intelligence_Platform/vulnpipe/score.py - Risk relationship graph · Aggregates risk across host, image, component, and vulnerability relationships.
Unified_Vulnerability_Intelligence_Platform/vulnpipe/graph.py
Persistence & delivery
- Per-app snapshots · Writes out/<app>/latest.json and ticket exports.
- Postgres · Preferred persistence; JSON snapshots are the fallback.
Unified_Vulnerability_Intelligence_Platform/vulnpipe/db.py - Ticketing · Uses stable keys for idempotent GitHub updates and DefectDojo reimports.
Unified_Vulnerability_Intelligence_Platform/vulnpipe/ticketing.py - Threat & ticket APIs · KEV, EPSS, NVD, Exploit-DB, GitHub, and DefectDojo.
Dashboard & private uploads
- Streamlit dashboard · Displays findings, risk graph, tickets, and filters.
Unified_Vulnerability_Intelligence_Platform/app/Dashboard.py - Dashboard data access · Loads Postgres first, then per-app snapshots.
Unified_Vulnerability_Intelligence_Platform/app/data_access.py - Private ZIP upload · Unpacks to session-scoped data with DB and operator ticketing disabled.
Unified_Vulnerability_Intelligence_Platform/app/ingest.py - Upload scan page · Can publish tickets only with explicit uploader credentials.
Unified_Vulnerability_Intelligence_Platform/app/pages/upload_scan.py
Connections 23
- Batch CLI → Pipeline orchestrator: runs
- App discovery → Scanner reports: locates
- Scanner reports → Normalizer registry: parse
- Normalizer registry → Finding & asset schema: emits
- Finding & asset schema → Pipeline orchestrator: contracts
- Pipeline orchestrator → App discovery: processes per app
- Pipeline orchestrator → Deduplication: normalize → deduplicate
- Deduplication → Auditable suppression: candidate findings
- Auditable suppression → FP decision engine: optional decisions
- FP decision engine → Threat enrichment: retained findings
- Threat enrichment → Risk scoring: threat context
- Risk scoring → Risk relationship graph: ranked findings
- Risk relationship graph → Per-app snapshots: snapshot
- Pipeline orchestrator → Postgres: persist when available
- Pipeline orchestrator → Ticketing: DefectDojo export/import
- Threat enrichment → Threat & ticket APIs: optional lookups
- Ticketing → Threat & ticket APIs: GitHub / DefectDojo
- Streamlit dashboard → Dashboard data access: reads through
- Dashboard data access → Postgres: Postgres first
- Dashboard data access → Per-app snapshots: JSON fallback
- Upload scan page → Private ZIP upload: uploads ZIP
- Private ZIP upload → Pipeline orchestrator: session-scoped processing
- Streamlit dashboard → Ticketing: manual GitHub trigger