Skip to content

Commit

Permalink
results: set the "imp" flag in the list of important findings
Browse files Browse the repository at this point in the history
... rather than clearing it.  If scan results are processed later on,
it is useful to know the original state of the "imp" flag, regardless
of the context (whether we have a list of important findings only,
or an all-in-one list of findings).  A side effect will be that a red
`[important]` tag will appear in the HTML output next to each finding,
which is probably harmless.

Related: https://issues.redhat.com/browse/OSH-343
Related: https://issues.redhat.com/browse/OSH-565
Closes: #159
  • Loading branch information
kdudka committed Apr 29, 2024
1 parent 154cf56 commit ac0af3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion py/common/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ def finalize_results(js_file, results, props):
% (js_file, chk_re, csgrep_args)

# finally take all defects that were tagged important by the scanner already
cmd += " | csgrep --mode=json --set-imp-level=0 --remove-duplicates"
cmd += " | csgrep --mode=json --set-imp-level=1 --remove-duplicates"
cmd += f" <(csgrep --mode=json --imp-level=1 '{js_file}') -"

# write the result into *-imp.js
Expand Down

0 comments on commit ac0af3e

Please sign in to comment.