Skip to content

TMBOM support - #369

Open
izar wants to merge 5 commits into
OWASP:masterfrom
izar:tmbom
Open

izar wants to merge 5 commits into
OWASP:masterfrom
izar:tmbom

Conversation

@izar

@izar izar commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator
  • Output TMBOM JSON with (--tmbom) (validated by loading into precogly)
  • Create Control element
    - needs to add "mitigates" for findings

Co-authored with my good friend Claude.

izar and others added 5 commits October 13, 2026 13:38
Add attributes needed to describe a threat model in richer terms than
pytm could so far:

* Control: a named safeguard that declares the threat SIDs it mitigates
  and the elements it protects, with category, status and effectiveness.
  It is registered with the TM and round-trips through --json.
* Threat/Finding: stride (default "unassigned"), impact, and capec/cwe
  ids parsed from the references.
* Actor.kind: person, organization, system or persona.
* Dataflow.isEncrypted: tri-state, unknown by default.

All new attributes default to "unknown" and do not change existing
findings.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Print the threat model as a CycloneDX 2.0 TM-BOM JSON document on
stdout: a data-flow blueprint (zones, boundaries crossed by flows,
assets, actors, data stores, data sets, flows, assumptions), threats
grouped by threat library SID with CAPEC/CWE links, risks per finding
and the declared controls.

The layout follows the 2.0 draft schema, pinned to a specific commit of
CycloneDX/specification. The schema is not committed: the validation
tests use tests/fetch_cyclonedx_schema.sh to obtain it and are skipped
when it is absent. jsonschema is added as a dev dependency for them.

docs/tmbom.md documents the mapping, caveats and trade-offs.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Expose the declared controls to report templates as "controls" and add a
Controls section to docs/basic_template.md, docs/advanced_template.md
and docs/reveal.md. The section is omitted when no controls are
declared, so reports for existing models are unchanged.

Add a global and a model-element-scoped Control to the sample tm.py.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Flow endpoints in a TM-BOM are assets or actors, but data stores were
only emitted in the dataStores detail section, so flows to and from them
pointed at records that diagram tools do not draw. Tools such as
Precogly dropped the stores and every flow touching them.

Emit each Datastore as an asset of type data-store as well, make flows,
zones, threats, risks and controls reference that asset, and keep the
dataStores record for the storage detail, linked to the asset by a
relationships entry. Data set placements still point at the dataStores
record.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@izar
izar requested review from colesmj and nineinchnick October 13, 2026 22:24
@izar izar self-assigned this Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant