Skip to content

Commit

Permalink
Added more meta information to the SonarQube rules.
Browse files Browse the repository at this point in the history
Signed-off-by: Felix Patschkowski <[email protected]>
  • Loading branch information
Felix Patschkowski committed Dec 16, 2023
1 parent 86173e1 commit be386c1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ SonarQube under "Administration > CXX External Analyers > Other Rule Definitions
by running Flawfinder once using the following options.

~~~~
flawfinder --listrules --sonar
flawfinder --listrules --sonar [...]
~~~~

The in your CI/CD run Flawfinder like this to generate output that SonarQube
Expand Down
3 changes: 3 additions & 0 deletions flawfinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,9 @@ def output_rules(self):
str += '\t\t<severity>%s</severity>\n' % (SONAR_SEVERITIES[self._ruleset[key][1]])
str += '\t\t<type>VULNERABILITY</type>\n'
str += '\t\t<tag>cwe</tag>\n'
str += '\t\t<tag>flawfinder</tag>\n'
str += '\t\t<remediationFunction>CONSTANT_ISSUE</remediationFunction>\n'
str += '\t\t<remediationFunctionBaseEffort>2min</remediationFunctionBaseEffort>\n'
str += '\t</rule>\n'
str += '</rules>'
return str
Expand Down

0 comments on commit be386c1

Please sign in to comment.