Hi everyone,
I am working with C++ (Community) Plugin 2.0.7. We have modified it in order to implement a new rules repository and a new parser to scan a third party XML report.
We run SonarScanner to scan this XML report which is generated by a third-party source code analysis tool.
Because a new rules repository is used by the third party tool, I have also included a new XML rule map to create the repository based on this third party rules set.
I am using:
- Sonarqube Community Edition Version 8.9.9
- SonarScanner 4.3.0.2102
- C++ (Community) Plugin 2.0.7 → modified to include my own parser and repository
The new rules repository is included into SonarQube coding rules set as a new repository with the fields properly assigned (e.g. severity, type, …).
A set of rules are “Security Category” related.
Below is an example of the fields which I am set for each rule into XML rules map file:
<rule>
<key>CWE-125-a</key>
<name>Avoid accessing arrays out of bounds</name>
<description>Avoid accessing arrays out of bounds</description>
<tag>cwe</tag>
<internalKey>CWE-125-a</internalKey>
<severity>CRITICAL</severity>
<type>VULNERABILITY</type>
<remediationFunction>LINEAR</remediationFunction>
<remediationFunctionGapMultiplier>5min</remediationFunctionGapMultiplier>
</rule>
My question is how can rules be defined to fall into the “Security Category” tabs, i.e. “OWASP Top 10” or CWE or “SANS Top 25”.
I have reviewed built-in tags defined in this link: Built-in Rule Tags | SonarQube Docs. I have set some tags, such “owasp” via UI web, not by xml file. But it seems it is not working. Rules are fallen on Security Category → Sonar Source tab.
I do not know if another tag must be used or there is another field what I am not using that is used to this behaviour.
Thanks in advance.
David