@@ -133,18 +133,18 @@ namespace {
133133 const picojson::array tags{picojson::value (" security" )};
134134 properties[" tags" ] = picojson::value (tags);
135135 }
136- } else {
137- // For non-security findings, set problem.severity
138- std::string problemSeverity;
139- if (ErrorLogger::isCriticalErrorId (finding.id ) || finding.severity == Severity::error)
140- problemSeverity = " error" ;
141- else if (finding.severity == Severity::warning)
142- problemSeverity = " warning" ;
143- else
144- problemSeverity = " recommendation" ; // style, information, performance, portability
145-
146- properties[" problem.severity" ] = picojson::value (problemSeverity);
147136 }
137+ // Set problem.severity for use with github and other severity systems
138+ std::string problemSeverity;
139+ if (ErrorLogger::isCriticalErrorId (finding.id ) || finding.severity == Severity::error)
140+ problemSeverity = " error" ;
141+ else if (finding.severity == Severity::warning) {
142+ problemSeverity = " warning" ;
143+ }
144+ else {
145+ problemSeverity = " recommendation" ; // style, information, performance, portability
146+ }
147+ properties[" problem.severity" ] = picojson::value (problemSeverity);
148148 rule[" properties" ] = picojson::value (properties);
149149 // rule.defaultConfiguration.level
150150 picojson::object defaultConfiguration;
@@ -283,9 +283,7 @@ namespace {
283283 }
284284
285285 // Fallback for unknown rules
286- return fullDescription
287- ? (" Issue detected by rule: " + ruleId)
288- : (" Issue detected by rule: " + ruleId);
286+ return fullDescription ? ruleId : ruleId;
289287 }
290288
291289 static bool isSecurityRelatedFinding (const std::string& ruleId) {
0 commit comments