Sonarqube Web Api Hotspots Security Category

This is an example of a response i get from the API. In the security category the value is auth.
In the UI though in Rules → Security Category is listed as Authentication,
same goes for weak-cryptograph as Weak Cryptography, dos for Denial of Service(DoS),
Insecure Configuration is insecure-conf. My question is: Is there a way for me
to know the security category value that the API will return, so i will be able
to match them with the UI values? For values like SQL injection what’s the equivalent from the API response?

    "key" : "AYpQTDoAhFSlygdOFI13",
    "component" : "js:Server.js",
    "project" : "js",
    "securityCategory" : "auth",
    "vulnerabilityProbability" : "HIGH",
    "status" : "TO_REVIEW",
    "line" : 50,
    "message" : "Review this potentially hardcoded credential.",
    "author" : "",
    "creationDate" : "2023-09-01T10:30:24+0000",
    "updateDate" : "2023-09-01T10:30:24+0000",
    "textRange" : {
      "startLine" : 50,
      "endLine" : 50,
      "startOffset" : 12,
      "endOffset" : 20
    }```

Hey there.

Here is the relevant code:

Thanks a lot!

1 Like