feat: manual threat authoring and editing - #28
Merged
Merged
Conversation
This was referenced Jul 9, 2026
This was referenced Jul 24, 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.
feat: manual threat authoring and editing
Up to now the tmforge-json overlay could say exactly one thing about a threat: "I accept the risk." Every threat came from a rule, and the only author-owned bit we round-tripped was acceptance. If you actually understood your system and wanted to record a threat the rules don't know about or fix the wording, priority, or mitigation on one they do there was nowhere to put it.
The model is unchanged in spirit: the register stays a regenerable projection of the rules. We do not serialize the whole register to the wire. Instead we widen the existing sparse overlay so it carries two new kinds of author intent besides acceptance:
description, mitigation, justification), and
A manual threat is an overlay entry keyed
manual:{guid}with no TypeId. On read we materialize it into the register; on generate we append it; on export we regenerate the rules and re-apply the overlay on top.