From be386c106864f893afd18f4519712a769f47c76d Mon Sep 17 00:00:00 2001 From: Felix Patschkowski Date: Fri, 15 Dec 2023 12:36:15 +0100 Subject: [PATCH] Added more meta information to the SonarQube rules. Signed-off-by: Felix Patschkowski --- README.md | 2 +- flawfinder.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fc90a37..aa2e068 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/flawfinder.py b/flawfinder.py index 409876a..4db0516 100755 --- a/flawfinder.py +++ b/flawfinder.py @@ -187,6 +187,9 @@ def output_rules(self): str += '\t\t%s\n' % (SONAR_SEVERITIES[self._ruleset[key][1]]) str += '\t\tVULNERABILITY\n' str += '\t\tcwe\n' + str += '\t\tflawfinder\n' + str += '\t\tCONSTANT_ISSUE\n' + str += '\t\t2min\n' str += '\t\n' str += '' return str