-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
🐛 fix semgrep severity logic #11218 #11219
Conversation
DryRun Security SummaryThe pull request focuses on updates to the unit tests and the parser for the Semgrep security analysis tool integrated into the DefectDojo application, improving the handling and presentation of Semgrep security findings without directly impacting the security of the application itself. Expand for full summarySummary: The code changes in this pull request are primarily focused on updates to the unit tests and the parser for the Semgrep security analysis tool, which is integrated into the DefectDojo application. The changes do not directly impact the security of the application itself, but they do provide valuable insights into the team's approach to application security testing and the tools they are using. The changes in the The changes in the Files Changed:
Code AnalysisWe ran Riskiness🟢 Risk threshold not exceeded. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved
Whoops, did that approval a bit early. I'll check back to see if my haste was wasted or not 😉 |
Nope. All's well |
Hi all, I'm the reporter of this bug. Thanks for picking this up. I don't think the logic is correct here in the PR.
So there may be some additional cases to consider, but I think the full logic is something closer to:
Where are the tests for this? I think we should be looking at actual Semgrep reports and reasoning about the formatting of the findings there. I'm happy to work with you on this if you would like help. Thanks again. |
@blakeaowens @cneill @mtesauro @Maffooch this PR is wrong. Is someone willing to acknowledge my comment: |
Hi @bsterne, did you consider the whole method in your comment? https://github.com/DefectDojo/django-DefectDojo/pull/11219/files#diff-6675ec51a8162a810df97675f8c510909e9627872f60ad527c84bd8bd3e5473dR132 |
Yes, I did consider the whole method when I made the comment. I'm referencing the Semgrep docs that say:
In other words, Semgrep INFO maps to "Low" severity, not "Info" severity, as this PR has it. That is for code and secrets findings. For supply chain findings, there are Critical, High, Medium, or Low as possible options. That's according to their docs. I'm currently looking at a set of supply chain findings (see: semgrep-sca-results.json) that have |
I fixed the Info to Low mapping. |
I believe this fix covers both cases and is implicitly context related (i.e. code and secret reports will not have both Info and low severities). @manuel-sommer great work here |
No description provided.