Skip to content
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

Ignore default generated threats in report #261

Open
harsh02 opened this issue Feb 8, 2025 · 4 comments
Open

Ignore default generated threats in report #261

harsh02 opened this issue Feb 8, 2025 · 4 comments

Comments

@harsh02
Copy link

harsh02 commented Feb 8, 2025

Hello,

I am building threat models for embedded devices and most of the generated threats by tool are not much relevant. I have my own threats library I have added in threats.json. Is there any simple way to report not show default threats of elements. That way I can show only threats I added.

Thanks!

@izar
Copy link
Collaborator

izar commented Feb 8, 2025

Did you try the --exclude flag? It is probably going to be unwieldy but might be a temporary solution. You can also replace threats.json with your own, and we have been thinking about adding a BYO capability for user libraries. Let me look into that.

@raphaelahrens
Copy link
Contributor

For completenes, you can also exclude threats by adding an Assumption.

pytm/tm.py

Lines 45 to 50 in c8c0875

web.assumptions = [
Assumption(
"This webserver does not use PHP",
exclude=["INP16"],
),
]

But I wonder why you don't create a threat library JSON file with only your threats and then just create a report from it.
Doing it this way only your threats will be in the report.

What could be interesting is to have the ability to use multiple threat files, but this would require some code changes.

@harsh02
Copy link
Author

harsh02 commented Feb 9, 2025

Thanks for your inputs! I am only using threat library that I built now and thats working.

Yes, multiple threat library support would be useful.

@raphaelahrens
Copy link
Contributor

Multiple threat libraries would require some though.
@izar should this be a new issue?

@harsh02 One last question would you be willing to share your threat library?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants