Download scripts/ingest/sources.py from continuum-oss/ccrb: direct link, hf CLI and curl.
- Browser
- Download file 4.78 kB
-
https://huggingface.co/datasets/continuum-oss/ccrb/resolve/main/scripts/ingest/sources.py
- Command line
-
hf download hf://datasets/continuum-oss/ccrb/scripts/ingest/sources.py
-
curl -L -o sources.py https://huggingface.co/datasets/continuum-oss/ccrb/resolve/main/scripts/ingest/sources.py
4.78 kB
| """Pinned authoritative cybersecurity source definitions and licenses for CCRB.""" | |
| from __future__ import annotations | |
| from dataclasses import dataclass | |
| class SourceSpec: | |
| """Metadata for a single upstream cybersecurity feed.""" | |
| key: str | |
| url: str | |
| filename: str | |
| license: str | |
| tracks: tuple[str, ...] | |
| description: str | |
| tier: str # "core" (fast/small) or "bulk" (large ecosystem feeds) | |
| SOURCES: dict[str, SourceSpec] = { | |
| "cisa_kev": SourceSpec( | |
| key="cisa_kev", | |
| url="https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json", | |
| filename="cisa_kev.json", | |
| license="Public-Domain-US-Gov", | |
| tracks=("cve", "advisories"), | |
| description="CISA Known Exploited Vulnerabilities (KEV) catalog", | |
| tier="core", | |
| ), | |
| "mitre_cwe": SourceSpec( | |
| key="mitre_cwe", | |
| url="https://cwe.mitre.org/data/xml/cwec_latest.xml.zip", | |
| filename="cwec_latest.xml.zip", | |
| license="MITRE-CWE-TOU", | |
| tracks=("cwe", "remediation"), | |
| description="MITRE Common Weakness Enumeration (CWE) XML catalog", | |
| tier="core", | |
| ), | |
| "mitre_capec": SourceSpec( | |
| key="mitre_capec", | |
| url="https://capec.mitre.org/data/xml/capec_latest.xml", | |
| filename="capec_latest.xml", | |
| license="MITRE-CAPEC-TOU", | |
| tracks=("cwe", "attack"), | |
| description="MITRE Common Attack Pattern Enumeration and Classification (CAPEC) XML", | |
| tier="core", | |
| ), | |
| "mitre_attack_enterprise": SourceSpec( | |
| key="mitre_attack_enterprise", | |
| url="https://raw.githubusercontent.com/mitre-attack/attack-stix-data/master/enterprise-attack/enterprise-attack.json", | |
| filename="enterprise-attack.json", | |
| license="Apache-2.0", | |
| tracks=("attack", "remediation"), | |
| description="MITRE ATT&CK Enterprise STIX 2.1 bundle", | |
| tier="core", | |
| ), | |
| "mitre_attack_ics": SourceSpec( | |
| key="mitre_attack_ics", | |
| url="https://raw.githubusercontent.com/mitre-attack/attack-stix-data/master/ics-attack/ics-attack.json", | |
| filename="ics-attack.json", | |
| license="Apache-2.0", | |
| tracks=("attack", "remediation"), | |
| description="MITRE ATT&CK ICS STIX 2.1 bundle", | |
| tier="core", | |
| ), | |
| "mitre_attack_mobile": SourceSpec( | |
| key="mitre_attack_mobile", | |
| url="https://raw.githubusercontent.com/mitre-attack/attack-stix-data/master/mobile-attack/mobile-attack.json", | |
| filename="mobile-attack.json", | |
| license="Apache-2.0", | |
| tracks=("attack", "remediation"), | |
| description="MITRE ATT&CK Mobile STIX 2.1 bundle", | |
| tier="core", | |
| ), | |
| "osv_pypi": SourceSpec( | |
| key="osv_pypi", | |
| url="https://osv-vulnerabilities.storage.googleapis.com/PyPI/all.zip", | |
| filename="osv_pypi_all.zip", | |
| license="CC-BY-4.0", | |
| tracks=("advisories", "cve"), | |
| description="OSV / PyPA / GHSA advisories for PyPI ecosystem", | |
| tier="bulk", | |
| ), | |
| "osv_go": SourceSpec( | |
| key="osv_go", | |
| url="https://osv-vulnerabilities.storage.googleapis.com/Go/all.zip", | |
| filename="osv_go_all.zip", | |
| license="CC-BY-4.0", | |
| tracks=("advisories", "cve"), | |
| description="OSV / Go Vulnerability Database / GHSA advisories", | |
| tier="bulk", | |
| ), | |
| "osv_crates": SourceSpec( | |
| key="osv_crates", | |
| url="https://osv-vulnerabilities.storage.googleapis.com/crates.io/all.zip", | |
| filename="osv_crates_all.zip", | |
| license="CC-BY-4.0", | |
| tracks=("advisories", "cve"), | |
| description="OSV / RustSec / GHSA advisories for crates.io", | |
| tier="bulk", | |
| ), | |
| "osv_npm": SourceSpec( | |
| key="osv_npm", | |
| url="https://osv-vulnerabilities.storage.googleapis.com/npm/all.zip", | |
| filename="osv_npm_all.zip", | |
| license="CC-BY-4.0", | |
| tracks=("advisories", "cve"), | |
| description="OSV / GHSA advisories for npm ecosystem", | |
| tier="bulk", | |
| ), | |
| "owasp_cheatsheets": SourceSpec( | |
| key="owasp_cheatsheets", | |
| url="https://github.com/OWASP/CheatSheetSeries/archive/refs/heads/master.zip", | |
| filename="owasp_cheatsheets.zip", | |
| license="CC-BY-SA-4.0", | |
| tracks=("remediation", "code"), | |
| description="OWASP CheatSheetSeries defensive guidance and secure code examples", | |
| tier="code_rem", | |
| ), | |
| "sigma_rules": SourceSpec( | |
| key="sigma_rules", | |
| url="https://github.com/SigmaHQ/sigma/archive/refs/heads/master.zip", | |
| filename="sigma_rules.zip", | |
| license="DRL-1.1", | |
| tracks=("code", "attack"), | |
| description="SigmaHQ detection rules mapped to MITRE ATT&CK techniques", | |
| tier="code_rem", | |
| ), | |
| } | |