d3fend
Theme
Text size
GitHub Menu

On exhibit · LinkML schema

MITRE D3FEND Knowledge Graph

A LinkML model of MITRE D3FEND, the knowledge graph of cybersecurity countermeasures. It models the graph as a catalogue of records: each kind of entry is a class, each property of the ontology is a slot under its own IRI, and every term of D3FEND 1.6.0 is a record that validates against them.

  • 25classes
  • 1enumeration
  • 309slots
  • 21types

The schema The bundle Architecture Glossary Quick start

Copier Badge

d3fend#

Build and test Licence OpenSSF Scorecard KTL scorecard

MITRE D3FEND Knowledge Graph 1.6.0 (LinkML)

Only want to ask? Install ktl-docent into any agent you use, by a route from the install page, and ask it about this project. It answers from the bundle and says how far each answer has been checked.

Agents: if .lokf/knowledge/index.md exists, read it first. llms.txt says how to weigh it.

Documentation Website#

https://lmodel.github.io/d3fend

What it models#

The schema models MITRE D3FEND, edition 1.6.0 of 31 August 2026, the knowledge graph of cybersecurity countermeasures: what each defensive technique acts on, what each offensive technique touches, and the digital artifacts where the two meet. Each kind of entry is a class, each property of the ontology is a slot under its own IRI, and every term of the edition is a record in src/d3fend/data/d3fend-1.6.0.yaml, under its own IRI too.

upstream/ holds MITRE’s Turtle file, pinned by hash, and scripts/d3fend_to_linkml.py writes the slots and the catalogue from it. tests/test_coverage.py walks the file in both directions, and tests/test_catalogue.py shows that the catalogue validates and projects back to the file’s own triples. A weekly workflow opens an issue when a new edition appears, a pinned file changes, or the Terms of Use change. docs/index.md says how to validate a catalogue, and docs/about.md why terms are records and what stays out.

Mappings#

The schema is the one home for mappings. The hand-kept SSSOM file and the guessed mappings on each class are gone, since no source confirmed them.

  • lmodel/attack: close_mappings on the offensive technique, the mitigation and the data source, and related_mappings on the tactic and on the techniques of other frameworks. tests/test_mappings.py checks each against its released copy.
  • lmodel/stix: related_mappings on attack_id to external_id. tests/test_mappings.py checks it against the released copy.
  • lmodel/cwe: close_mappings on the weakness, and related_mappings on cwe_id, since D3FEND writes the number with a CWE- prefix. tests/test_mappings.py checks both against the released copy.
  • lmodel/capec: related_mappings on capec_id, for the same reason. tests/test_mappings.py checks it against the released copy.
  • lmodel/nist-sp-800-53: related_mappings on the NIST control to the control and the enhancement, since D3FEND names three revisions and the target one. tests/test_mappings.py checks both against the released copy.
  • SKOS, IAO, BFO and the Common Core Ontologies: close_mappings on the ten properties the ontology itself names as rdfs:isDefinedBy, such as related to skos:related and has_participant to BFO:0000057. tests/test_mappings.py reads each from the Turtle.

Repository Structure#

  • docs/: the website’s own pages
  • project/: generated project files (do not edit them)
  • scripts/: the converter from the Turtle and the upstream watch
  • src/d3fend/schema/: the LinkML schema, d3fend.yaml, d3fend_core.yaml and d3fend_entries.yaml, which the converter writes
  • src/d3fend/data/: the catalogue, which the converter writes
  • src/d3fend/datamodel/: the generated Python datamodel
  • tests/: Python tests, with example data in data/ and the neighbours’ adapt copies in neighbours/
  • upstream/: the ontology at the pinned edition and its terms, unchanged
  • website/: the Hugo site built from the README, docs/, the schema’s pages and the knowledge bundle

Developer Tools#

Run just to list the project’s just recipes.

Knowledge Trust Ladder (KTL)#

.lokf/ holds this project’s KTL knowledge bundle. Its domain schema, .lokf/schema/d3fend.yaml, is the copy just lokf-adapt writes from src/d3fend/schema/d3fend.yaml, and just lokf-adapt-check says when it is stale. Edit the source, never the copy. A release carries the copy as schema-<tag>-d3fend.yaml, on the terms CONTRIBUTING.md gives.

The copy roots D3fendEntry and D3fendCatalog on Concept, so a concept may be an entry of any kind. In Obsidian, add the kinds to the Known LOKF types setting of the KTL Registrar and KTL Curator plugins:

D3fendAgent, D3fendAnalyticTechnique, D3fendArtifact, D3fendAttackDataSource, D3fendAttackMitigation, D3fendCciControl, D3fendControlCatalog, D3fendDefensiveTactic, D3fendDefensiveTechnique, D3fendDigitalArtifact, D3fendEvent, D3fendExternalControl, D3fendGoal, D3fendNistControl, D3fendOffensiveTactic, D3fendOffensiveTechnique, D3fendTechnique, D3fendTechniqueReference, D3fendThing, D3fendThreatModelTechnique, D3fendThreatModelThing, D3fendWeakness

The copy drops id, type and rdf_type for LOKF’s id and type. It renames created, definition, description, name, title and version with a d3fend_ prefix, keeping their IRIs, because LOKF has slots of those names. A concept names a D3FEND term in a relation by its CURIE, such as analyzes: [d3f:File].

Every class, enum and type carries the D3fend prefix, so none is a neighbour’s. D3FEND’s properties are ordinary words, so the copy shares a few keys with oscal, attack, stix, nist-nvd, uco, spdx and slsa, under other IRIs, which tests/test_schema_rules.py lists. A composite projects each under one IRI until lokf adapt can rename what a neighbour copy defines (lokf #169).

License#

The schema and the code are under the Apache License 2.0 (LICENSE), and the knowledge bundle in .lokf/knowledge/ is under CC BY 4.0.

D3FEND is under its Terms of Use and its repository’s MIT licence, and upstream/, the catalogue and the slots reproduce MITRE’s designation and licence as those terms ask. D3FEND also carries text of ATT&CK, ATLAS, SPARTA and CWE under their own terms, and abstracts of the sources it cites, which stay their authors’ and which the catalogue leaves out: see NOTICE. This is not a project of MITRE, and its use implies no endorsement by it. MITRE D3FEND is a trademark of The MITRE Corporation.

Contributing and security#

CONTRIBUTING.md is the checklist for pull requests and releases, AI_COVENANT.md sets the rules for AI-assisted work, SECURITY.md says how to report a vulnerability, and CHANGELOG.md records the changes.

Credits#

Built from the linkml-project-copier template (doi:10.5281/zenodo.15163584).