CoolFace
Datasetpublic

s0u9ata/security-kg

Security Knowledge Graph Triples Security data from 24 sources represented as Subject-Predicate-Object (SPO) triples in Parquet format, ready for knowledge-graph construction, graph-ML, RAG pipelines, and threat-intelligence analysis. Sources: ATT&CK · CAPEC · CWE · CVE · CPE · D3FEND · ATLAS · CAR · ENGAGE · F3 · EPSS · KEV · Vulnrichment · GHSA · Sigma · ExploitDB · MISP Galaxies · LOLBAS · LOLDrivers · Atomic Red Team · NIST 800-53 · Nuclei · EUVD · OSV Last updated:… See the full description on the dataset page: https://huggingface.co/datasets/s0u9ata/security-kg.

sourceHugging Faceapache-2.0updated 17h agoView on Hugging Face
0likes500downloads
Dataset Card

Security Knowledge Graph Triples

Security data from 24 sources represented as Subject-Predicate-Object (SPO) triples in Parquet format, ready for knowledge-graph construction, graph-ML, RAG pipelines, and threat-intelligence analysis.

Sources: ATT&CK · CAPEC · CWE · CVE · CPE · D3FEND · ATLAS · CAR · ENGAGE · F3 · EPSS · KEV · Vulnrichment · GHSA · Sigma · ExploitDB · MISP Galaxies · LOLBAS · LOLDrivers · Atomic Red Team · NIST 800-53 · Nuclei · EUVD · OSV

Last updated: 2026-09-21T11:59:25Z

Quick Start

python
from datasets import load_dataset

ds = load_dataset("s0u9ata/security-kg", "enterprise")
print(ds["train"][0])
# {'subject': 'T1059.001', 'predicate': 'rdf:type', 'object': 'Technique', 'source': 'attack', 'object_type': 'enum', 'meta': ''}

Configurations

ConfigDescriptionEst. TriplesStatus
enterprise (default)Enterprise ATT&CK44,035Current
mobileMobile ATT&CK5,582Current
icsICS ATT&CK4,264Current
attack-allATT&CK combined (deduplicated)52,199Current
capecCAPEC attack patterns8,114Current
cweCWE weaknesses14,583Current
cveCVE vulnerabilities4,339,118Current
cpeCPE platform enumeration14,119,482Current
d3fendD3FEND defensive techniques8,513Current
atlasATLAS AI/ML techniques1,373Current
carCAR analytics1,617Current
engageENGAGE adversary engagement1,464Current
f3F3 fraud techniques & tactics1,053Current
epssEPSS exploit prediction scores754,476Current
kevKEV known exploited vulns18,815Current
vulnrichmentCISA Vulnrichment (SSVC, CVSS, CWE enrichment)1,793,925Current
ghsaGitHub Security Advisories414,167Current
sigmaSigma detection rules33,498Current
exploitdbExploitDB public exploits347,621Current
misp_galaxyMISP Galaxy threat intelligence clusters221,064Current
lolbasLOLBAS living-off-the-land binaries3,768Current
loldriversLOLDrivers vulnerable/malicious drivers12,762Current
atomicAtomic Red Team test definitions11,442Current
nist_800_53NIST 800-53 → ATT&CK control mappings4,786Current
nucleiNuclei vulnerability detection templates101,867Current
euvdEUVD European vulnerability database5,184Current
osvOSV open-source vulnerabilities (23 ecosystems)8,430,920Current
combinedAll sources merged (deduplicated)30,701,811Current

Knowledge Graph Structure

     Group  Campaign
        \      /
          uses
           |
           v
      TECHNIQUE -----> Tactic
        ^  ^  ^
        |  |  |
        |  |  +-- D3FEND (counters)
        |  |  +-- CAR (detects)
        |  |  +-- Sigma (detects)
        |  |  +-- ENGAGE (engages)
        |  |  +-- F3 (fraud techniques)
        |  |  +-- ATLAS (related)
        |  |  +-- MISP Galaxies (cross-refs)
        |  |  +-- LOLBAS (maps-to)
        |  |  +-- LOLDrivers (maps-to)
        |  |  +-- Atomic Red Team (tests)
        |  |  +-- NIST 800-53 (mitigates)
        |  |
        |  +-- Mitigation (mitigates)
        |  +-- DataComponent (detects)
        |
        +-- maps-to -- CAPEC
                         |
                  related-weakness
                         |
                         v
                        CWE
                         ^
                         |
                  related-weakness
                         |
                        CVE ----> CPE
                         ^
                         |
                   EPSS (score)
                   KEV (exploited)
                   GHSA (advisory)
                   Vulnrichment (SSVC)
                   ExploitDB (exploit)
                   Nuclei (detection template)
                   EUVD (EU advisory)
                   OSV (open-source vuln)

Schema

Each row is an enriched triple with six string columns:

ColumnDescriptionExamples
subjectEntity IDT1059.001, G0016, CAPEC-66, CWE-79, CVE-2024-1234, cpe:2.3:a:apache:httpd:*, D3-FE, AML.T0000, CAR-2024-01-001, EAC0001, GHSA-xxxx-yyyy-zzzz, EDB-16929, Msbuild.exe, EUVD-2025-4893, AC-2, PYSEC-2024-1234
predicateProperty name or relationship typerdf:type, name, uses, mitigates, epss-score, counters, ssvc-exploitation, exploits-cve, detects-technique
objectValue or target entity IDTechnique, PowerShell, T1059, CWE-89, 0.97500, SecurityAdvisory, SigmaRule, Exploit
sourceOriginating datasetattack, cve, cwe, capec, epss, kev, ghsa, sigma, d3fend, atlas, car, engage, f3, cpe, vulnrichment, exploitdb, misp_galaxy, lolbas, loldrivers, atomic, nist_800_53, nuclei, euvd, osv
object_typeValue type of the objectstring, id, enum, date, number, boolean, url
metaSupplemental JSON metadata (empty string if none){"references":["https://..."],"credits":[...]}, {"cvss_vector":"...","cvss_version":"3.1"}

Predicate Reference

ATT&CK Entity Properties

PredicateDescriptionExample object value
rdf:typeEntity typeTechnique, Group, Malware, Tool, Tactic, Mitigation, Campaign, DataSource, DataComponent
nameDisplay namePowerShell
descriptionFull description textAdversaries may abuse PowerShell...
platformApplicable platformWindows, Linux, macOS
domainATT&CK domainenterprise-attack
aliasAlternative nameCozy Bear
is-subtechniqueWhether entity is a sub-techniqueTrue, False
belongs-to-tacticTactic ATT&CK IDTA0002
shortnameTactic shortnamecredential-access
urlATT&CK website URLhttps://attack.mitre.org/techniques/T1059/001
created / modifiedTimestamps2020-01-14 17:18:32...

ATT&CK Relationship Predicates

PredicateTypical subject / objectExample
usesGroup/Campaign/Software / TechniqueG0016 / T1059.001
mitigatesMitigation / TechniqueM1049 / T1059.001
subtechnique-ofSub-technique / Parent techniqueT1059.001 / T1059
detectsDataComponent / TechniqueDC0001 / T1059.001
attributed-toCampaign / GroupC0018 / G0016

CAPEC Predicates

PredicateDescriptionExample object value
rdf:typeAttackPatternAttackPattern
name / descriptionDisplay name / full textSQL Injection
abstraction / statusLevel / statusStandard, Stable
likelihood / severityAttack likelihood / severityHigh
child-ofParent attack patternCAPEC-248
related-weaknessRelated CWECWE-89
maps-to-techniqueMapped ATT&CK techniqueT1190.002

CWE Predicates

PredicateDescriptionExample object value
rdf:typeWeaknessWeakness
name / descriptionDisplay name / full textCross-site Scripting (XSS)
abstraction / statusLevel / statusBase, Stable
likelihood-of-exploitExploitation likelihoodHigh
child-ofParent weaknessCWE-74
related-attack-patternRelated CAPECCAPEC-86
platformApplicable platformJavaScript
consequence-scope / consequence-impactImpactConfidentiality, Read Data
introduction-phaseIntroduction phaseImplementation

CVE Predicates

PredicateDescriptionExample object value
rdf:typeVulnerabilityVulnerability
stateCVE statePUBLISHED
descriptionEnglish descriptionA remote code execution...
date-published / date-updatedTimestamps2024-01-15T00:00:00.000Z
assignerAssigning organizationmicrosoft
vendor / productAffected vendor/productMicrosoft, Windows
affects-cpeAffected CPE stringcpe:2.3:o:microsoft:windows_10:*
platformAffected platformx64
related-weaknessRelated CWECWE-79
cvss-base-score / cvss-severityCVSS metrics9.8, CRITICAL

CPE Predicates

PredicateDescriptionExample object value
rdf:typePlatformPlatform
partCPE part typeapplication, operating_system, hardware
vendor / product / versionComponentsapache, httpd, 2.4.51
titleEnglish display nameApache HTTP Server 2.4.51
created / modifiedTimestamps2021-10-07

D3FEND Predicates

PredicateDescriptionExample object value
rdf:typeDefensiveTechnique or OffensiveTechniqueDefensiveTechnique
name / definitionDisplay name / definitionFile Encryption
synonymAlternative nameDisk Encryption
child-ofParent techniquePlatformHardening
countersCountered offensive techniqueT1059

ATLAS Predicates

PredicateDescriptionExample object value
rdf:typeTactic, Technique, CaseStudy, MitigationTechnique
name / descriptionDisplay name / full textML Supply Chain Compromise
maturityTechnique maturityReviewed
belongs-to-tacticParent tacticAML.TA0001
subtechnique-ofParent techniqueAML.T0000
related-attack-techniqueLinked ATT&CK techniqueT1195
related-attack-tacticLinked ATT&CK tacticTA0001
uses-techniqueCase study techniqueAML.T0000
mitigatesMitigated techniqueAML.T0000

CAR Predicates

PredicateDescriptionExample object value
rdf:typeAnalyticAnalytic
title / descriptionAnalytic name / full textSuspicious PowerShell Commands
platformApplicable platformWindows
information-domainInformation domainHost
analytic-typeType of analyticSituational Awareness
detects-techniqueDetected ATT&CK techniqueT1059
detects-subtechniqueDetected subtechniqueT1059.001
covers-tacticCovered ATT&CK tacticExecution
maps-to-d3fendLinked D3FEND techniqueD3-PSA

ENGAGE Predicates

PredicateDescriptionExample object value
rdf:typeEngagementActivity or AdversaryVulnerabilityEngagementActivity
name / descriptionDisplay name / full textSoftware Manipulation
engages-techniqueEngaged ATT&CK techniqueT1001
vulnerability-ofATT&CK technique this adversary vulnerability applies toT1001
addresses-vulnerabilityAddressed adversary vulnerabilityEAV0001

F3 Predicates

PredicateDescriptionExample object value
rdf:typeTactic or TechniqueTechnique
name / descriptionDisplay name / full textAccount Takeover
shortnameTactic shortnamepositioning, monetization
is-subtechniqueWhether entity is a sub-techniquetrue
belongs-to-tacticParent tacticFA0001
subtechnique-ofParent techniqueF1001
urlF3 website URLhttps://ctid.mitre.org/fraud/techniques/F1001
created / modifiedTimestamps2026-04-02T19:15:57.686Z

EPSS Predicates

PredicateDescriptionExample object value
epss-scoreExploit probability (0-1)0.97500
epss-percentileScore percentile (0-1)0.99900

KEV Predicates

PredicateDescriptionExample object value
rdf:typeKnownExploitedVulnerabilityKnownExploitedVulnerability
kev-vendor / kev-productAffected vendor/productMicrosoft, Windows
kev-name / kev-descriptionVulnerability name/descriptionWindows Privilege Escalation
kev-date-added / kev-due-dateDates2024-01-15
kev-required-actionRequired remediation actionApply updates per vendor instructions.
kev-ransomware-useRansomware campaign useKnown, Unknown
related-weaknessRelated CWECWE-269

Vulnrichment Predicates

PredicateDescriptionExample object value
ssvc-exploitationSSVC exploitation statusactive, poc, none
ssvc-automatableWhether exploitation is automatableyes, no
ssvc-technical-impactTechnical impact leveltotal, partial
adp-cvss-base-scoreCISA-analyzed CVSS base score9.8
adp-cvss-severityCISA-analyzed CVSS severityCRITICAL
adp-related-weaknessCISA-assigned CWECWE-79
adp-affects-cpeCISA-assigned CPEcpe:2.3:o:microsoft:windows_10:*

GHSA Predicates

PredicateDescriptionExample object value
rdf:typeSecurityAdvisorySecurityAdvisory
summaryAdvisory summaryXSS vulnerability in example-package
date-published / date-modifiedTimestamps2024-01-15T00:00:00Z
severitySeverity levelHIGH, MODERATE, LOW, CRITICAL
related-cveAssociated CVECVE-2024-1234
related-weaknessAssociated CWECWE-79
cvss-vectorCVSS v3 vector stringCVSS:3.1/AV:N/AC:L/...
affects-packageAffected package (ecosystem/name)npm/example-package
fixed-inFixed version for package (ecosystem/name@version)npm/example-package@2.0.1

Sigma Predicates

PredicateDescriptionExample object value
rdf:typeSigmaRuleSigmaRule
title / descriptionRule name / full textSuspicious PowerShell Download
statusRule maturitystable, test, experimental
levelDetection severitycritical, high, medium, low, informational
author / dateRule author / creation dateSecurity Researcher, 2024-01-15
logsource-categoryLog source categoryprocess_creation, network_connection
logsource-productLog source productwindows, linux
logsource-serviceLog source servicesshd, sysmon
detects-techniqueDetected ATT&CK techniqueT1059.001
related-cveRelated CVECVE-2024-1234

ExploitDB Predicates

PredicateDescriptionExample object value
rdf:typeExploitExploit
descriptionExploit descriptionApache HTTP Server RCE
date-publishedPublication date2024-01-15
authorExploit authorMetasploit
exploit-typeExploit categoryremote, local, dos, webapps
platformTarget platformlinux, windows, aix
verifiedVerified by OffSecTrue
exploits-cveExploited CVECVE-2024-1234

MISP Galaxy Predicates

PredicateDescriptionExample object value
rdf:typeGalaxy entity typeThreatActor, Ransomware, Botnet, RAT
nameDisplay nameAPT1
descriptionFull description(text)
galaxyGalaxy cluster typethreat-actor, ransomware
synonymAlternative nameComment Crew
countryCountry code (ISO 3166-1)CN
cfr-suspected-state-sponsorSuspected state sponsorChina
targets-countryTargeted countryUnited States
targets-sectorTargeted sectorGovernment
attribution-confidenceConfidence level50
similar-toSimilar/duplicate entitymisp:<uuid>
usesUses technique/toolmisp:<uuid>
used-byUsed by actormisp:<uuid>
variant-ofVariant relationshipmisp:<uuid>
targetsTargets entitymisp:<uuid>
attributed-toAttributed to entitymisp:<uuid>
misp-relatedGeneric relationshipmisp:<uuid>
related-attack-idCross-link to ATT&CKT1059.001, G0006

LOLBAS Predicates

PredicateDescriptionExample object value
rdf:typeLOLBinaryLOLBinary
nameBinary display nameMsbuild.exe
descriptionBinary descriptionUsed to compile and execute code
maps-to-techniqueMapped ATT&CK techniqueT1127.001
categoryUse categoryExecute, Download
usecaseUse case descriptionCompile and run code
privilegesRequired privilegesUser
platformTarget platformWindows
full-pathFile system pathC:\Windows\Microsoft.NET\...

LOLDrivers Predicates

PredicateDescriptionExample object value
rdf:typeLOLDriverLOLDriver
nameDriver nameRTCore64.sys
categoryDriver categoryvulnerable driver, malicious driver
maps-to-techniqueMapped ATT&CK techniqueT1068
usecaseUse case descriptionExploits
privilegesRequired privilegeskernel
platformTarget platformWindows
sha256 / sha1 / md5Sample hashes01...af
vendor / productDriver vendor/productMicro-Star Int'l Co., RTCore64

Atomic Red Team Predicates

PredicateDescriptionExample object value
rdf:typeAtomicTestAtomicTest
nameTest nameMimikatz - Cred Dump
descriptionTest descriptionRuns Mimikatz to dump credentials
tests-techniqueTested ATT&CK techniqueT1003.001
platformSupported platformwindows, linux, macos
executorExecution methodpowershell, sh, command_prompt

NIST 800-53 Predicates

PredicateDescriptionExample object value
rdf:typeSecurityControlSecurityControl
nameControl nameAccount Management
descriptionControl descriptionManage system accounts...
control-familyControl familyAC, SI, AU
mitigates-techniqueMitigated ATT&CK techniqueT1078

Nuclei Predicates

PredicateDescriptionExample object value
rdf:typeNucleiTemplateNucleiTemplate
nameTemplate nameApache Struts2 RCE
descriptionTemplate descriptionDetects Apache Struts2 RCE...
severityDetection severitycritical, high, medium, low, info
authorTemplate authorpdteam
related-weaknessRelated CWECWE-94
related-cveRelated CVECVE-2023-1234
cvss-base-scoreCVSS base score9.8
cvss-vectorCVSS vector stringCVSS:3.1/AV:N/AC:L/...

EUVD Predicates

PredicateDescriptionExample object value
rdf:typeEUVulnerabilityEUVulnerability
descriptionVulnerability descriptionA remote code execution...
date-publishedPublication date2025-01-15
cvss-base-scoreCVSS base score9.8
cvss-vectorCVSS vector stringCVSS:3.1/AV:N/AC:L/...
epss-scoreEPSS score0.95
related-cveRelated CVECVE-2025-1234
vendor / productAffected vendor/productApache, HTTP Server

OSV Predicates

PredicateDescriptionExample object value
rdf:typeOSVulnerabilityOSVulnerability
summaryVulnerability summaryXSS in example-package
date-published / date-modifiedTimestamps2024-01-15T00:00:00Z
related-cveRelated CVECVE-2024-1234
related-weaknessRelated CWECWE-79
affects-packageAffected package (ecosystem/name)PyPI/requests
ecosystemPackage ecosystemPyPI, npm, Go, crates.io
cvss-vectorCVSS vector stringCVSS:3.1/AV:N/AC:L/...

Dataset Creation

Source Data

SourceFeedFormat
ATT&CK`mitre-attack/attack-stix-data`STIX 2.0 JSON
CAPEC`capec_latest.xml`XML
CWE`cwec_latest.xml.zip`XML (ZIP)
CVE`CVEProject/cvelistV5`JSON 5.x (ZIP)
CPE`nvdcpe-2.0.tar.gz`JSON (tar.gz)
D3FEND`d3fend.json`JSON-LD
ATLAS`ATLAS.yaml`YAML
CAR`mitre-attack/car`YAML (ZIP)
ENGAGE`attack_mapping.json`JSON
F3`fight-fraud-framework`STIX 2.1 JSON
EPSS`epss_scores-current.csv.gz`CSV (gzip)
KEV`known_exploited_vulnerabilities.json`JSON
Vulnrichment`cisagov/vulnrichment`JSON 5.x (ZIP)
GHSA`github/advisory-database`OSV JSON (ZIP)
Sigma`SigmaHQ/sigma`YAML (ZIP)
ExploitDB`files_exploits.csv`CSV
MISP Galaxies`MISP/misp-galaxy`JSON (ZIP)
LOLBAS`LOLBAS-Project/LOLBAS`YAML (ZIP)
LOLDrivers`magicsword-io/LOLDrivers`YAML (ZIP)
Atomic Red Team`redcanaryco/atomic-red-team`YAML (ZIP)
NIST 800-53`mappings-explorer`JSON (ZIP)
Nuclei`projectdiscovery/nuclei-templates`YAML (ZIP)
EUVD`euvdservices.enisa.europa.eu`JSON
OSV`osv.dev`JSON (per-ecosystem ZIPs)

Conversion Pipeline

The converter downloads source data, extracts entity property triples and relationship triples, and writes them as Parquet files. The source code and full documentation are at:

[github.com/S0UGATA/security-kg](https://github.com/S0UGATA/security-kg)

To regenerate or update this dataset:

bash
git clone https://github.com/S0UGATA/security-kg.git
cd security-kg
pip install -r requirements.txt
python src/convert.py

This produces fresh Parquet files in output/ from the latest data across all 24 sources.

Visualizer

Explore the Parquet files interactively at security-kg-viz.

Pre-computed neighborhoods (neighborhoods/)

For the most-connected entities in combined.parquet, this dataset ships pre-rendered multi-hop neighborhood JSONs the visualizer can fetch directly, skipping the DuckDB-WASM + Parquet path entirely for hot lookups:

neighborhoods/
  T1059.json              # array of Triple objects (depth=2, limit=500)
  T1059.001.json
  CVE-2024-1234.json
  CAPEC-100.json
  ...
  index.json              # { source, fingerprint, depth, limit, entities: [...] }

Each <entity>.json is the same shape the viz already builds from q.entityNeighborhood() — an array of {subject, predicate, object, source, object_type, object_canonical}. Filenames use a reversible slug (characters outside [A-Za-z0-9._-] are _xx hex-escaped); index.json is the authoritative mapping from entity → filename and includes a parquet fingerprint for cache invalidation. The bundle is regenerated each weekly refresh whenever combined.parquet changes.

Use Cases

  • Knowledge Graph Construction: Load triples into Neo4j, RDFLib, or NetworkX for graph queries
  • Graph ML: Train graph neural networks (GNNs) on security data structure for link prediction
  • RAG / LLM Grounding: Use triples as structured context for retrieval-augmented generation
  • Threat Intelligence: Query relationships between groups, techniques, vulnerabilities, and mitigations
  • Vulnerability Prioritization: Combine SSVC, EPSS, KEV, and ExploitDB data for risk-based triage
  • Defensive Gap Analysis: Find heavily-used ATT&CK techniques with insufficient detection coverage
  • Supply Chain Risk: Score open-source packages by linking GHSA advisories to CVE/EPSS/KEV enrichment
  • Security Automation: Programmatically map detections to techniques to tactics

Cross-Source Analysis Notebook

The repository includes a Jupyter notebook with 16 cross-source analyses and visualizations built on combined.parquet — covering SSVC patch prioritization, defensive gap analysis, kill chain tactic coverage, exploit weaponization timelines, ransomware CWE pipelines, supply chain package risk, and more.

Example Queries

SSVC Patch Prioritization (Vulnrichment + EPSS + KEV)

python
import pandas as pd
from datasets import load_dataset

# Load combined graph for cross-source queries
ds = load_dataset("s0u9ata/security-kg", "combined")
df = ds["train"].to_pandas()

# Build SSVC triage matrix: exploitation status × automatable × EPSS score
ssvc = df[df.predicate == "ssvc-exploitation"][["subject", "object"]].rename(columns={"object": "exploitation"})
auto = df[df.predicate == "ssvc-automatable"][["subject", "object"]].rename(columns={"object": "automatable"})
epss = df[df.predicate == "epss-score"][["subject", "object"]].copy()
epss["epss"] = epss.object.astype(float)

triage = ssvc.merge(auto, on="subject").merge(epss[["subject", "epss"]], on="subject")

# Highest priority: actively exploited + automatable + high EPSS
critical = triage[(triage.exploitation == "active") & (triage.automatable == "yes") & (triage.epss > 0.9)]
print(f"Immediate action: {len(critical)} CVEs")

Defensive Gap Analysis (ATT&CK + Sigma + D3FEND + CAR)

python
# Find ATT&CK techniques heavily used by APT groups but poorly covered by detections
uses = df[(df.predicate == "uses") & df.subject.str.startswith("G")]
group_usage = uses.groupby("object").subject.nunique().rename("groups_using")

# Count detection sources per technique (Sigma + CAR + D3FEND + ENGAGE)
sigma = df[df.predicate == "detects-technique"].groupby("object").subject.nunique().rename("detections")
d3fend = df[df.predicate == "restricts"].groupby("object").subject.nunique().rename("defenses")

coverage = pd.DataFrame(group_usage).join(sigma).join(d3fend).fillna(0)
gaps = coverage[(coverage.groups_using > 10) & (coverage.detections < 5)]
print(f"High-usage, low-detection techniques: {len(gaps)}")

Supply Chain Risk (GHSA + CVE + EPSS + KEV + ExploitDB)

python
# Score open-source packages by aggregating risk from linked CVEs
ghsa_cve = df[df.predicate == "related-cve"][["subject", "object"]].rename(columns={"subject": "ghsa", "object": "cve"})
packages = df[df.predicate == "affects-package"][["subject", "object"]].rename(columns={"subject": "ghsa", "object": "pkg"})

epss_scores = df[df.predicate == "epss-score"][["subject", "object"]].copy()
epss_scores["epss"] = epss_scores.object.astype(float)

kev_cves = set(df[(df.predicate == "rdf:type") & (df.object == "KnownExploitedVulnerability")].subject)
exploit_cves = set(df[df.predicate == "exploits-cve"].object)

# Join package → GHSA → CVE → enrichment
risk = packages.merge(ghsa_cve, on="ghsa").merge(epss_scores[["subject", "epss"]], left_on="cve", right_on="subject")
risk["in_kev"] = risk.cve.isin(kev_cves)
risk["has_exploit"] = risk.cve.isin(exploit_cves)
risk["ecosystem"] = risk.pkg.str.split("/").str[0]

# Top ecosystems by high-risk CVE count
high_risk = risk[(risk.epss > 0.5) | risk.in_kev | risk.has_exploit]
print(high_risk.groupby("ecosystem").cve.nunique().sort_values(ascending=False).head(10))

CAPEC → CWE → CVE (Attack Pattern Chain)

python
capec = load_dataset("s0u9ata/security-kg", "capec")["train"].to_pandas()
cve = load_dataset("s0u9ata/security-kg", "cve")["train"].to_pandas()

# Find CWEs related to SQL Injection (CAPEC-66)
cwe_ids = capec[(capec.subject == "CAPEC-66") & (capec.predicate == "related-weakness")].object.tolist()

# Find CVEs with those CWEs
for cwe_id in cwe_ids:
    related_cves = cve[(cve.predicate == "related-weakness") & (cve.object == cwe_id)].subject.unique()
    print(f"{cwe_id}: {len(related_cves)} CVEs")

D3FEND (Defensive Taxonomy)

python
ds = load_dataset("s0u9ata/security-kg", "d3fend")
df = ds["train"].to_pandas()

# All 497 defensive techniques in the D3FEND taxonomy
defenses = df[(df.predicate == "rdf:type") & (df.object == "DefensiveTechnique")]
print(f"Defensive techniques: {len(defenses)}")

# Find children of a category (e.g., all techniques under Network Traffic Analysis)
children = df[(df.predicate == "child-of") & (df.object == "NetworkTrafficAnalysis")].subject.tolist()

# Get their names
names = df[df.predicate == "name"][["subject", "object"]]
print(names[names.subject.isin(children)].to_string(index=False))

Source Licensing & Attribution

This dataset is published under the Apache 2.0 license. The underlying source data is provided under various licenses as detailed below. By using this dataset, you agree to comply with each source's respective terms.

SourceLicenseAttribution
ATT&CKCustom royalty-free (MITRE)© The MITRE Corporation. Reproduced and distributed with the permission of The MITRE Corporation.
CAPECCustom royalty-free (MITRE)© The MITRE Corporation. Reproduced and distributed with the permission of The MITRE Corporation.
CWECustom royalty-free (MITRE)© The MITRE Corporation. Reproduced and distributed with the permission of The MITRE Corporation.
CVECustom permissive (MITRE)© The MITRE Corporation. CVE® is a registered trademark of The MITRE Corporation.
CPE / NVDPublic domain (NIST)This product uses data from the NVD API but is not endorsed or certified by the NVD.
D3FENDMIT License© The MITRE Corporation. MITRE D3FEND™ is a trademark of The MITRE Corporation.
ATLASApache 2.0© MITRE.
CARApache 2.0© The MITRE Corporation.
ENGAGEApache 2.0 (GitHub repo) / Custom restrictive (website ToU)© The MITRE Corporation. Reproduced and distributed with the permission of The MITRE Corporation. Note: the GitHub repo is licensed Apache 2.0, but the website terms restrict use to internal/non-commercial purposes. Clarification pending with MITRE.
F3Apache 2.0© MITRE Engenuity, Center for Threat-Informed Defense.
EPSSCustom permissive (FIRST)Jacobs, Romanosky, Edwards, Roytman, Adjerid (2021), Exploit Prediction Scoring System, Digital Threats Research and Practice, 2(3). See first.org/epss.
KEVPublic domain (U.S. Gov)Source: CISA Known Exploited Vulnerabilities Catalog.
VulnrichmentCC0 1.0 UniversalSource: CISA Vulnrichment.
GHSACC BY 4.0Source: GitHub Advisory Database. Licensed under CC BY 4.0.
SigmaDetection Rule License 1.1Source: SigmaHQ. Licensed under DRL 1.1. Rule author attribution is preserved in triples.
ExploitDBGPLv2+Source: OffSec ExploitDB. Derived factual metadata (IDs, CVE mappings, dates) extracted under GPLv2+.
MISP GalaxiesCC0 1.0 / BSD 2-ClauseSource: MISP Project. Dual-licensed under CC0 1.0 and BSD 2-Clause.
LOLBASGPLv3Source: LOLBAS Project. Licensed under GPLv3.
LOLDriversApache 2.0Source: LOLDrivers (magicsword.io).
Atomic Red TeamMIT LicenseSource: Red Canary Atomic Red Team. Licensed under MIT.
NIST 800-53 MappingsApache 2.0© MITRE Engenuity, Center for Threat-Informed Defense.
Nuclei TemplatesMIT LicenseSource: ProjectDiscovery Nuclei Templates. Licensed under MIT.
EUVDPublic (ENISA)Source: ENISA European Vulnerability Database. Data published by the European Union Agency for Cybersecurity.
OSVCC BY 4.0Source: OSV (osv.dev). Licensed under CC BY 4.0.

License

Apache 2.0 — see Source Licensing & Attribution for individual source terms.