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
Refactor scan results and findings to support multiple types #190
Conversation
{% include 'scan/_rule_table_rows.html' with unique_rules=unique_regex_rules %} | ||
{% include 'scan/_rule_table_rows.html' with unique_rules=unique_multiquery_rules %} |
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.
viva reusable templates!!! 🍻
for result in results: | ||
rule = result.rule | ||
|
||
if rule.id not in rule_dict: | ||
rule.finding_count = 0 | ||
rule.findings = [] | ||
rule_dict[rule.id] = rule |
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.
Just an educational note:
If/when we finally get a postgres backend, using distinct()
would be the way to go here.
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.
👍👍
The purpose of this PR is to refactor the scan_run template and associated view to work with multiple finding/result/rule types.