feat(threats): allow editing threat titles, keep category rule-owned - #77
Merged
Conversation
5 tasks
This was referenced Jul 27, 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(threats): allow editing threat titles, keep category rule-owned
What changed
tmforge threats --editand the Studio threats panel can now set a threat'stitle.
--titleworks on any threat;--categoryis accepted only on manuallyauthored threats and is refused with an explanation on generated ones.
--title/--categoryonthreats --edittitle/categoryparams onedit_threatinline text saying why
Why
Rule wording is precise about a class of problem, not about your system.
Reviewers were rewording threats outside the tool and losing the edit on the
next run (THR-001).
Design note: title vs category
These sit on opposite sides of an ownership line, deliberately.
unchanged, and the edit is reversible.
refused, not ignored, in the CLI, the authoring facade, and the UI alike.
Silently dropping it would leave an author believing they had recorded
something.
How to test
dotnet build dirs.proj -p:Platform=x64 -p:BuildStudio=false dotnet test test/dirs.proj -p:Platform=x64 -p:BuildStudio=falseManual, against
examples/webshop.tm7:Risk
GeneratedDefaultTitleis persisted per generated threat, which roughly doublesper-threat title bytes (~5% file growth on a 76-threat model). Accepted for
parity with the existing priority path and because it is what makes an
externally-edited title survive.