-
Notifications
You must be signed in to change notification settings - Fork 215
Add JSON template and examples to simplify threat model creation #314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
This template complements the existing JSON import functionality by providing an easy starting point for new users. |
|
If useful, I can also add a CLI command (e.g., pytm init) to auto-generate this template |
|
The JSON file seems to be empty, also, how is this supposed to be used? |
Thanks for the feedback! The goal of this template is to provide a simple starting point so users don’t need to write the full Python code when creating an initial threat model. Please let me know if you’d like me to adjust the format or add more examples. |
|
This is a great idea, thanks - but would it be possible for you to use the existing tm.py as the example for the JSON ? It would make things more consistent by offering two views of the same system. Also, be advised: we may be deprecating the JSON functionality in favor of the CycloneDX TMBOM quite soon. |
Thanks a lot for the suggestion, that makes a lot of sense. Yes, I can update the JSON template to mirror the existing tm.py example so that both represent the same system. That should definitely make the usage clearer and more consistent. Thanks also for the heads-up about the potential deprecation of JSON in favor of CycloneDX TMBOM. I’ll keep that in mind while updating the example and try to keep the structure as aligned and future-proof as possible. I’ll push an updated version shortly and would love to get your feedback on it. |
Thanks for the suggestion! I’ve updated the JSON template to mirror the existing tm.py example so that both represent the same system. I kept the JSON version simplified but aligned with the core components and flows from tm.py. Please let me know if you’d like me to include more details from tm.py or adjust the structure further. |
|
Are you sure your addition mirrors the tm.py file ? |
Summary
This PR adds a JSON template and an examples folder to simplify the initial creation of threat models in pytm.
Motivation
Issue #12 mentions that creating a threat model requires a lot of manual typing.
Providing a ready-to-use JSON template helps users quickly bootstrap their threat models with minimal effort.
Changes
examples/template_tm.jsonas a starter template for threat models.Related Issue
Addresses #12