-
Notifications
You must be signed in to change notification settings - Fork 10
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
report semgrep findings and fix findings assertions #739
Conversation
src/codemodder/result.py
Outdated
rule=Rule( | ||
id=rule_id, | ||
name=rule_id, | ||
url=semgrep_url_from_id(rule_id), |
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.
This is specific to Semgrep but it looks like this is being added to a more general SarifResult
class?
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.
yeah do you think this is wrong? while it's a generic sarif result, wouldn't all sarif results have to have findings too?
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.
My concern is specifically about the call to semgrep_url_from_id
, which only applies to Semgrep results, whereas this class appears to be used for multiple SARIF-based tools.
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.
wooops Im an idiot, of course! Good review Dan, will update
Quality Gate passedIssues Measures |
I initially thought asserting findings is not None was sufficient, but in cases when the result of matching findings is
[]
we also want to be aware.I updated some codemods where it was easy to do the matching, but created #738 for that codemod
This fix also brought to light that we weren't reporting semgrep findings so fixed that too