feat: owasp threat dragon threat model import support - #115
Merged
Merged
Conversation
| [DataRow("tm7")] | ||
| public void ThreatDragonImportSurvivesEngineOperations(string formatId) | ||
| { | ||
| byte[] bytes = File.ReadAllBytes(Path.Combine(AppContext.BaseDirectory, "Fixtures", "threat-dragon-v2.json")); |
| StringAssert.Contains(exception.Message, message); | ||
| } | ||
|
|
||
| private static JsonNode Fixture() => JsonNode.Parse(File.ReadAllText(Path.Combine(AppContext.BaseDirectory, "threat-dragon-v2.json"))) |
This was referenced Sep 18, 2026
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.
Summary
Add bounded OWASP Threat Dragon v2 JSON import across the CLI, HTTP API,
MCP, and Studio's API/WASM engines.
This enables users to bring supported existing models into tmforge without
recreating diagrams or losing authored threat treatment. Unsupported
semantics are rejected rather than silently changed.
Changes
threat-dragonprovider with content-baseddetection, explicit version checks, and bounded JSON/graph processing.
boundaries, and directed page-local flows with stable identities.
mitigation, priority, supported treatment states, scope, and provenance.
JSON, engine operations, Studio persistence, and
.tm7exports.the first page during canonical conversion.
new
.tmforge.jsonfilename instead.400 for malformed imports.
No new dependencies or separate threat evaluator are introduced.
Scope and Limitations
rectangles, unknown cell kinds, and unmappable threat states are refused.
analysis. Missing controls are not inferred as present.
refused by this initial implementation.