Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
bdcbb5e
chore(docs): configure multi-instance for schema versioning
kji-mitre Oct 1, 2025
1435c62
chore(docs): rename schema docusaurus instance to schemas
kji-mitre Oct 2, 2025
f80b2cf
chore(docs): move schema reference from docs to schemas docusaurus in…
kji-mitre Oct 2, 2025
1be494c
chore(docs): move api reference from docs to api docusaurus instance
kji-mitre Oct 2, 2025
bd2c063
chore(docs): refactor docusaurus pages
kji-mitre Oct 2, 2025
e1c8700
chore(docs): correct broken docusaurus links
kji-mitre Oct 6, 2025
f02a330
chore(docs): fix broken compatibility links
kji-mitre Oct 6, 2025
385c136
chore(docs): fix broken stix-bundle link on schemas page
kji-mitre Oct 6, 2025
249dc1c
chore(docs): fix broken links in tutorials
kji-mitre Oct 6, 2025
9e42979
chore(docs): rename api doccard header
kji-mitre Oct 6, 2025
a8a5ed7
chore(docs): split docusaurus homepage reference doccard
kji-mitre Oct 6, 2025
08f315c
chore(docs): pretend current docs are a cut release
kji-mitre Oct 6, 2025
b51cb1a
chore(docs): only display doc version selector for currently selected…
kji-mitre Oct 6, 2025
7527ab9
chore(docs): cut versions of api and schemas docs
kji-mitre Oct 6, 2025
be2e217
chore(docs): update docusaurus readme
kji-mitre Oct 7, 2025
e355a79
chore(docs): remove commented code
kji-mitre Oct 7, 2025
f604ddf
chore(docs): eliminate category structure in schemas sidebar
kji-mitre Oct 7, 2025
cebd709
docs: update version of docusaurus
jondricek Oct 10, 2025
dc7e873
docs: remove broken link
jondricek Oct 10, 2025
dbb7f0d
docs: remove deprecated docusaurus config item
jondricek Oct 10, 2025
a5accb2
docs: remove generated docs
jondricek Oct 10, 2025
ef606e4
docs: update docusaurus config
jondricek Oct 10, 2025
56b91cf
docs: remove redundant Overview
jondricek Oct 10, 2025
351a949
docs: rename navbar item
jondricek Oct 10, 2025
4e876e5
docs: update documentation homepage
jondricek Oct 10, 2025
2407f7b
docs: update descriptions for technique and matrix fields
jondricek Oct 13, 2025
25356b2
chore: update license
jondricek Oct 13, 2025
8e2db53
docs: refactored SPEC.md into multiple pages
jondricek Oct 13, 2025
2b9cae4
docs: add architecture component
jondricek Oct 14, 2025
b5f35a7
docs: update stix architecture diagram positioning
jondricek Oct 14, 2025
a5065df
docs: don't generate stix bundle schema docs
jondricek Oct 16, 2025
cfdc980
docs: remove unwanted content from API section
jondricek Oct 16, 2025
aae85fa
docs: update version of zod2md
jondricek Oct 16, 2025
961f996
docs: add new detections stix page
jondricek Oct 16, 2025
bb94a28
docs: update 3.3.0 schema changelog with another deprecated field
jondricek Oct 16, 2025
d96a4b5
docs: move descriptions from SPEC.md to schema files
jondricek Oct 16, 2025
144ef21
Merge branch 'main' into doc-cleanup
seansica Oct 17, 2025
85c9634
style: apply formatting
seansica Oct 17, 2025
99aeecd
ci: stop tracking package-lock and use npm install within github actions
seansica Oct 17, 2025
f3f87da
build: replace ts-node with tsx
seansica Oct 17, 2025
09dd20c
chore: update spacing
jondricek Oct 20, 2025
abac73e
fix: add missing dependencies to generate markdown docs
jondricek Oct 20, 2025
32731ba
docs: update docusaurus version
jondricek Oct 20, 2025
3f751d7
docs: add npm script to generate schema markdown files
jondricek Oct 20, 2025
7003818
ci: use updated npm script to generate schema markdown files
jondricek Oct 20, 2025
3c9e8fd
docs: remove old gendocs npm script
jondricek Oct 20, 2025
3b8f901
docs: add missing dev dependency
jondricek Oct 20, 2025
f38351b
docs: generate special markdown page for Software
jondricek Oct 20, 2025
a949d09
docs: update changelog schema changes
jondricek Dec 5, 2025
14a41cc
docs: separate the logic for the Software SDO
jondricek Dec 5, 2025
308cc48
Merge remote-tracking branch 'origin/main' into doc-cleanup
jondricek Dec 5, 2025
6d31835
docs: migrate docusaurus dev instructions to website
kji-mitre Dec 12, 2025
8fe4e44
docs: update doc generation to consolidate malware and tools under so…
kji-mitre Dec 15, 2025
3837306
docs: add description to software schema
kji-mitre Dec 15, 2025
d76a2a4
docs: consoliate malware and tools under software docs
kji-mitre Dec 15, 2025
b98a26f
docs: add missing stixArtifactType import
kji-mitre Dec 16, 2025
304836d
docs: correct docusaurus documentation
kji-mitre Dec 16, 2025
2116543
docs: fix broken doc links
kji-mitre Dec 16, 2025
fbddbaf
docs: move software description to software schema page
kji-mitre Dec 16, 2025
7364acc
docs: revise docusaurus documentation
kji-mitre Dec 16, 2025
09dce44
docs: revise docusaurus documentation
kji-mitre Dec 16, 2025
2fbcad0
docs: remove docusaurus requirements section
kji-mitre Dec 18, 2025
dcf6113
docs: clarify SPEC.md to refer to docusaurus site
kji-mitre Dec 18, 2025
0769cbf
docs: restore h1 header in SPEC.md for GitHub rendering
kji-mitre Dec 18, 2025
7e4f22a
docs: fix SPEC.md rendering
kji-mitre Dec 18, 2025
3123473
docs: move spec and usage markdown files to root
kji-mitre Dec 18, 2025
0a3eeb6
docs: update readme links
kji-mitre Dec 18, 2025
91544ce
Merge branch 'doc-cleanup-software-schemas' into doc-cleanup
kji-mitre Dec 18, 2025
a2bac29
docs: remove all versioned api doc snapshots
kji-mitre Dec 18, 2025
b7224b3
feat(schemas): add ATT&CK metadata registry for tracking STIX field u…
seansica Dec 19, 2025
e8e0d9d
test: add missing SDO types to attack testing data validations
seansica Dec 19, 2025
67b4333
fix(schema/malware): remove os_execution_envs property
seansica Dec 19, 2025
be96589
Merge branch 'main' into doc-cleanup
seansica Dec 19, 2025
306e41d
build: regenerate package-lock.json
seansica Dec 19, 2025
0b7be8a
fix: register malware metadata in global registry instead of custom a…
seansica Dec 19, 2025
405767f
chore: add newline in ci.yml
jondricek Dec 19, 2025
58fc85e
docs: fix GitHub markdown syntax
jondricek Dec 19, 2025
ac42cd3
docs: remove contributor section
jondricek Dec 19, 2025
6e97ff7
docs: clean up markdown table
jondricek Dec 19, 2025
6cf0a2e
fix: update api link
jondricek Dec 19, 2025
5cf8295
chore: autoformat
jondricek Dec 19, 2025
6fff00a
fix: revert to .meta calls instead of .registry
seansica Dec 19, 2025
2736717
style: apply formatting
seansica Dec 19, 2025
6149b0b
refactor: apply formatting and replace .register call with .meta
seansica Dec 19, 2025
d7a9893
docs: create version 3.3.0 of schema docs and remove broken links
jondricek Dec 19, 2025
6f33fe6
docs: remove broken link
jondricek Dec 19, 2025
d0b9aac
chore: autoformat
jondricek Dec 19, 2025
0bf0415
fix(schemas/tool): update error messages and apply formatting
seansica Dec 19, 2025
2f3d6d8
build(npm): add scripts for clearing .cache_stix_data and testing
seansica Dec 19, 2025
18a9a7f
Merge branch 'doc-cleanup' of github.com:mitre-attack/attack-data-mod…
seansica Dec 19, 2025
424d45d
ci: switch back to npm ci
seansica Dec 19, 2025
5dc8192
fix: don't gitignore package-lock.json anymore
jondricek Dec 19, 2025
9641c87
chore: remove old api versions file
jondricek Dec 19, 2025
a768cad
Merge branch 'doc-cleanup' of github.com:mitre-attack/attack-data-mod…
seansica Dec 19, 2025
c06ef8e
Merge pull request #49 from mitre-attack/doc-cleanup
jondricek Dec 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
node-version: '22.x'

- name: Install
run: npm ci --include=dev
run: npm ci

- name: Build
run: npm run build
Expand Down Expand Up @@ -153,15 +153,15 @@ jobs:
node-version: '22.x'

- name: Install schema dependencies
run: npm install
run: npm ci
working-directory: ./

- name: Install docusaurus dependencies
run: npm install
working-directory: ./docusaurus

- name: Generate schema documentation
run: npm run gendocs
run: npm run docs:schemamarkdown
working-directory: ./

- name: Install docusaurus dependencies
run: npm ci
working-directory: ./docusaurus

- name: Build Docusaurus site
Expand All @@ -172,4 +172,4 @@ jobs:
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.DEPLOY_KEY }}
publish_dir: ./docusaurus/build
publish_dir: ./docusaurus/build
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# auto-generated schema documentation
docusaurus/docs/reference/schemas/

# TypeScript artifacts
*.d.ts
*.ts.map
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]
Copyright [2025] [The MITRE Corporation]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
129 changes: 69 additions & 60 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
The ATT&CK Data Model (ADM) provides a type-safe, object-oriented interface for working with MITRE ATT&CK datasets.
Built on STIX 2.1 compliance, it uses Zod schemas and TypeScript types to ensure data integrity while providing intuitive relationship navigation between ATT&CK objects.

**[CLICK HERE](https://mitre-attack.github.io/attack-data-model) <sup>[1](#footnotes)</sup>** to browse the ATT&CK schemas in a user-friendly interface.
**[CLICK HERE](https://mitre-attack.github.io/attack-data-model) <sup>[1](#footnotes)</sup>** to browse the ATT&CK schemas in a user-friendly interface.

## Key Features

Expand Down Expand Up @@ -51,10 +51,10 @@ If you're unsure which version of ATT&CK data you have:
1. **From a STIX bundle file**: Look for the `x_mitre_attack_spec_version` field in the collection object
```json
{
"type": "x-mitre-collection",
"id": "x-mitre-collection--1f5f1533-f617-4ca8-9ab4-6a02367fa019",
"name": "Enterprise ATT&CK",
"x_mitre_attack_spec_version": "3.2.0",
"type": "x-mitre-collection",
"id": "x-mitre-collection--1f5f1533-f617-4ca8-9ab4-6a02367fa019",
"name": "Enterprise ATT&CK",
"x_mitre_attack_spec_version": "3.2.0"
}
```
1. **Check the compatibility matrix**: Check which spec version your STIX bundle or object is supported by in the [Compatibility Guide](./COMPATIBILITY.md)
Expand All @@ -77,37 +77,44 @@ npm install @mitre-attack/attack-data-model@~4.0.0
### Version Mismatch Warnings

The ADM will validate that your data matches the expected ATT&CK Specification version. If there's a mismatch, you may encounter:

- **Validation errors**: When the data structure doesn't match what the ADM expects
- **Missing properties**: When using older data with a newer ADM version
- **Unrecognized fields**: When using newer data with an older ADM version

### Recommended Approach

For most users, we recommend:

1. **Use the latest ADM version** (`npm install @mitre-attack/attack-data-model`)
2. **Load current ATT&CK data** directly from the official repository (the ADM can do this automatically)
3. **Keep both updated** regularly to access new techniques, updates, and features

Example of loading the latest ATT&CK data:

```javascript
import { registerDataSource, loadDataModel, DataSourceRegistration } from '@mitre-attack/attack-data-model';
import {
registerDataSource,
loadDataModel,
DataSourceRegistration,
} from '@mitre-attack/attack-data-model';

const dataSource = new DataSourceRegistration({
source: 'attack',
domain: 'enterprise-attack',
version: '17.1',
parsingMode: 'strict'
source: 'attack',
domain: 'enterprise-attack',
version: '17.1',
parsingMode: 'strict',
});

const dataSource = await registerDataSource(dataSource);
const attackEnterpriseLatest = loadDataModel(dataSource);
```

For more details on version compatibility, see the [Compatibility Guide](./COMPATIBILITY.md).
For more details on version compatibility, see the [Compatibility Guide](https://mitre-attack.github.io/attack-data-model/docs/principles/attack-versioning).

## ATT&CK Specification

The ADM is built upon the [MITRE ATT&CK® Specification](./docs/SPEC.md), which formally defines the structure, properties, and relationships of ATT&CK objects. The ATT&CK Specification serves as the authoritative source for how ATT&CK data should be represented and interacted with.
The ADM is built upon the [MITRE ATT&CK® Specification](https://mitre-attack.github.io/attack-data-model/schemas/), which formally defines the structure, properties, and relationships of ATT&CK objects. The ATT&CK Specification serves as the authoritative source for how ATT&CK data should be represented and interacted with.

The ADM provides a codified expression of the ATT&CK Specification using Zod schemas and TypeScript types. By implementing the specification in code, the ADM ensures that all data parsed and manipulated through the library adheres to the defined standards of the ATT&CK data model. This includes strict validation of object structures, types, and required properties, providing developers with confidence in the integrity and consistency of the data they work with.

Expand All @@ -121,9 +128,9 @@ By maintaining separate versioning, the ADM can evolve as a software library whi

## Documentation

For detailed API documentation and usage examples, please refer to the [ATT&CK Data Model TypeScript API Documentation](docs/USAGE.md).
For detailed API documentation and usage examples, please refer to the [ATT&CK Data Model TypeScript API Documentation](USAGE.md).

For additional context about the ATT&CK specification, please refer to the [ATT&CK Specification Guide](./docs/SPEC.md).
For additional context about the ATT&CK specification, please refer to the [ATT&CK Specification Guide](https://mitre-attack.github.io/attack-data-model/schemas/).

## Basic Usage

Expand All @@ -132,83 +139,85 @@ For additional context about the ATT&CK specification, please refer to the [ATT&
Here's an example script that demonstrates how to use the ADM library to load ATT&CK data from the official MITRE ATT&CK GitHub repository:

```typescript
import { registerDataSource, loadDataModel, DataSourceRegistration } from '@mitre-attack/attack-data-model';
import {
registerDataSource,
loadDataModel,
DataSourceRegistration,
} from '@mitre-attack/attack-data-model';

(async () => {

// Instantiating a DataSourceRegistration object will validate that the data source is accessible and readable
const dataSource = new DataSourceRegistration({
source: 'attack', // Built-in index to retrieve ATT&CK content from the official MITRE ATT&CK STIX 2.1 GitHub repository
domain: 'enterprise-attack',
version: '15.1', // Omitting 'version' will default to the latest version available in the repository
parsingMode: 'relaxed' // 'strict' or 'relaxed' - 'relaxed' mode will attempt to parse and serialize data even if it contains errors or warnings
});

try {
// Register the data source and retrieve the unique ID
const uuid = await registerDataSource(dataSource);
if (uuid) {
// Load the dataset using the unique ID
const attackEnterpriseLatest = loadDataModel(uuid);

// Access ATT&CK objects by type using object properties
const techniques = attackEnterpriseLatest.techniques;
const tactics = attackEnterpriseLatest.tactics;

const technique = techniques[0];

// Type hinting is supported for all object properties
if (technique.x_mitre_is_subtechnique) {

// Access related objects with helpful getter methods
console.log(technique.getParentTechnique());
}
}
} catch (error) {
console.error(error);
// Instantiating a DataSourceRegistration object will validate that the data source is accessible and readable
const dataSource = new DataSourceRegistration({
source: 'attack', // Built-in index to retrieve ATT&CK content from the official MITRE ATT&CK STIX 2.1 GitHub repository
domain: 'enterprise-attack',
version: '15.1', // Omitting 'version' will default to the latest version available in the repository
parsingMode: 'relaxed', // 'strict' or 'relaxed' - 'relaxed' mode will attempt to parse and serialize data even if it contains errors or warnings
});

try {
// Register the data source and retrieve the unique ID
const uuid = await registerDataSource(dataSource);
if (uuid) {
// Load the dataset using the unique ID
const attackEnterpriseLatest = loadDataModel(uuid);

// Access ATT&CK objects by type using object properties
const techniques = attackEnterpriseLatest.techniques;
const tactics = attackEnterpriseLatest.tactics;

const technique = techniques[0];

// Type hinting is supported for all object properties
if (technique.x_mitre_is_subtechnique) {
// Access related objects with helpful getter methods
console.log(technique.getParentTechnique());
}
}
} catch (error) {
console.error(error);
}
})();
```

### Parsing and Validating a Tactic

```typescript
import { tacticSchema } from "@mitre-attack/attack-data-model";
import { tacticSchema } from '@mitre-attack/attack-data-model';

const validTactic = {
id: "x-mitre-tactic--4ca45d45-df4d-4613-8980-bac22d278fa5",
type: "x-mitre-tactic",
name: "Execution",
description: "The adversary is trying to run malicious code.",
x_mitre_shortname: "execution",
id: 'x-mitre-tactic--4ca45d45-df4d-4613-8980-bac22d278fa5',
type: 'x-mitre-tactic',
name: 'Execution',
description: 'The adversary is trying to run malicious code.',
x_mitre_shortname: 'execution',
// ... other required fields
};

try {
const parsedTactic = tacticSchema.parse(validTactic);
console.log("Tactic parsed successfully:", parsedTactic.name);
console.log('Tactic parsed successfully:', parsedTactic.name);
} catch (error) {
console.error("Validation error:", error);
console.error('Validation error:', error);
}
```

### Handling Invalid Data

```typescript
import { tacticSchema } from "@mitre-attack/attack-data-model";
import { z } from "zod";
import { tacticSchema } from '@mitre-attack/attack-data-model';
import { z } from 'zod';

const invalidTactic = {
// Missing required fields
id: "x-mitre-tactic--4ca45d45-df4d-4613-8980-bac22d278fa5",
type: "x-mitre-tactic",
id: 'x-mitre-tactic--4ca45d45-df4d-4613-8980-bac22d278fa5',
type: 'x-mitre-tactic',
};

try {
tacticSchema.parse(invalidTactic);
} catch (error) {
if (error instanceof z.ZodError) {
console.log("Validation errors:", error.errors);
console.log('Validation errors:', error.errors);
}
}
```
Expand All @@ -234,7 +243,7 @@ Our [Compatibility documentation](https://mitre-attack.github.io/attack-data-mod

## Contributing

We welcome contributions! Please see our [CONTRIBUTING.md](./docs/CONTRIBUTING.md) file for details on how to contribute to this project.
We welcome contributions! Please see our contributor guide for more information: <https://mitre-attack.github.io/attack-data-model/docs/contributing/>

## Footnotes

Expand Down
8 changes: 8 additions & 0 deletions SPEC.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
> [!IMPORTANT]
> **Documentation Notice**
>
> This document is **not the source of truth** for the ATT&CK specification. The authoritative source is the **ATT&CK Data Model (ADM) TypeScript library**.
>
> 📖 **Browse ATT&CK schemas:** <https://mitre-attack.github.io/attack-data-model/schemas/>

# The ATT&CK Specification
File renamed without changes.
Loading
Loading