-
Notifications
You must be signed in to change notification settings - Fork 176
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
Alternative format for threat lib for better readability and editing #237
Comments
In threats.json the two properties ("prerequisites", "Likelihood Of Attack") are defined, but are not used in the rest of pytm. This commit adds the two properties to the Threat class, so they can be used by other parts of pytm. For me this was relevant, since I started to experiment with a different format for threats mentioned in OWASP#237 . And after exporting threat.json to a markdown format and back into threat.json these two fields where missing.
Another advantage of this approach would be that code elements in the threats, could be marked as code and will not interfere with the formatting in the report. An example of this is in SC04, which includes examples of jjencode ($=[$=[]][(__=!$+$)[_=-~-~-~$]+({}+$)[_/_]+($$=($_=!''+$)[_/_]+$_[+$])])()[__[_/_]+__[_+~$]+$_[_]+$$](_/_) and a bypass via the this['al' + 'ert'](1) When running python3 tm.py --report docs/basic_template.md | pandoc > /dev/null we get the error
For the first line but for <a href="1">'al' + 'ert'</a> |
I have implemented a prototype |
Do you know if this issue is going to be fixed? because I am also facing the same issue. |
@pentestguy what issue do you mean? |
The same issue is below [WARNING] Could not convert TeX math =($=!''+$)[/]+$[+$])])()[[/]+[+~$]+$[]+, rendering as TeX: |
So I looked through the threats recently and again and again I find it difficult to read through the JSON document.
What bothers me the most is the combination of text in details, mitigation, and example with the metadata like id condtion severity and target.
It makes the text hard to read and the metadata difficult to find.
Now I had the idea to have a markdown file for each threat in the style of pandoc with the yaml_metadata_extension.
The result could look similar to this
Of course this file would not be parseable by pytm with the restriction that it should only depend on python stdlib.
But what could be done is that the threats are stored in markdown files from which the threatlib.json could be generated.
What do you think about this idea?
The text was updated successfully, but these errors were encountered: