Repository navigation
TMBOM support - #369
Open
izar wants to merge 5 commits into
Open
TMBOM support#369izar wants to merge 5 commits into
izar wants to merge 5 commits into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
- needs to add "mitigates" for findings
Co-authored with my good friend Claude.