Sonarqube Rest API NOT return CWE-Number of issue with "type": "VULNERABILITY"

We would like to get CWE-Number of a VULNERABILITY issue through API. However, when calling the API to get issues of a project, we only see CWE tag without CWE-number detail. How could we get CWE-number of an issue if it’s VULNERABILITY issues?

If we don’t support it. Could we have a plant so implement this feature?

https://sonarcloud.io/api/issues/search?id=navikt_fp-kontrakter

Thank you.

Hello! Do you get any answer? I am looking for the same feature

You can’t get the CWE Identifier of a given issue. But you can find all issues corresponding to a CWE Identifier by using api/issues/search and the cwe parameter like this:

https://yourinstance/api/issues/search?cwe=89&types=VULNERABILITY&statuses=OPEN

… to get all the SQL Injection (CWE-89) issues.

1 Like