Closed mohan-ravichandran closed 1 year ago
hi and thanks for the PR! How is this different from the current json output capability (./tm.py [...] --json JSON_FILE) ?
I just tweaked the script to only show the threats by calling
from pytm.pytm import TM
tm = TM()
tm.resolve() # instead of tm.process()
for finding in tm.findings:
print(finding.to_json())
This way, one can view the findings and the corresponding target instead of the entire model. That is just my opinion 😅
I'm a bit confused perhaps about the use case you have in mind. How would this be different from jq '.findings' on the file generated by --json ?
Hi, @mohan-ravichandran , can this be closed ?
No answer from author.
Added a couple of functions to serialize the Findings class objects as JSON representations.