# Issues API does not return security hotspots when passing a severity

**URL:** <https://community.sonarsource.com/t/issues-api-does-not-return-security-hotspots-when-passing-a-severity/23326>\
**Category:** SonarQube Server / Community Build\
**Tags:** security-hotspot, security, web\_api, sonarqube, sonarqube-cloud\
**Created:** [April 20, 2020, 7:16pm UTC](https://community.sonarsource.com/t/issues-api-does-not-return-security-hotspots-when-passing-a-severity/23326 "2020-04-20T19:16:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![fniessink](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/fniessink/32/110_2.png) [@fniessink](https://community.sonarsource.com/u/fniessink)\
**Post date:** [April 20, 2020, 7:16pm UTC](https://community.sonarsource.com/t/issues-api-does-not-return-security-hotspots-when-passing-a-severity/23326/1 "2020-04-20T19:16:59Z")

</div>

Tested with: SonarQube version 7.9.1 (build 27448) and [sonarcloud.io](http://sonarcloud.io).

Error observed: issues API does not return security hotspots when severity parameter is used.

Steps to reproduce:

- Open [https://sonarcloud.io/api/issues/search?componentKeys=nl.ictu:quality-time&resolved=false&ps=500&types=SECURITY\_HOTSPOT,CODE\_SMELL](https://sonarcloud.io/api/issues/search?componentKeys=nl.ictu:quality-time&resolved=false&ps=500&types=SECURITY_HOTSPOT,CODE_SMELL)
- Note that both the two code smells and the five security hotspots are returned
- Open [https://sonarcloud.io/api/issues/search?componentKeys=nl.ictu:quality-time&resolved=false&ps=500&severities=INFO,MINOR,MAJOR,CRITICAL,BLOCKER&types=SECURITY\_HOTSPOT,CODE\_SMELL](https://sonarcloud.io/api/issues/search?componentKeys=nl.ictu:quality-time&resolved=false&ps=500&severities=INFO,MINOR,MAJOR,CRITICAL,BLOCKER&types=SECURITY_HOTSPOT,CODE_SMELL)
- Note that the two code smells are returned, but not the security hotspots

Potential workaround: make multiple calls to the issues API to retrieve security hotspots and other issues separately.

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [April 21, 2020, 3:58pm UTC](https://community.sonarsource.com/t/issues-api-does-not-return-security-hotspots-when-passing-a-severity/23326/2 "2020-04-21T15:58:32Z")

</div>

Hi,

That’s because Hotspots don’t have a severity. I think of them as Schroedinger’s Vulnerabilities - might be a problem, might not; you won’t know until you look. So (to extend the metaphor) just like Schroedinger’s cat is either dead (not Blocker/_really_ dead or Info/a _little_ dead) Hotspots are either problems or they’re not, and severity just isn’t appropriate in this context.

&nbsp;  
HTH,  
Ann

---

<div class="post-metadata">

**Author:** ![fniessink](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/fniessink/32/110_2.png) [@fniessink](https://community.sonarsource.com/u/fniessink)\
**Post date:** [April 21, 2020, 6:49pm UTC](https://community.sonarsource.com/t/issues-api-does-not-return-security-hotspots-when-passing-a-severity/23326/4 "2020-04-21T18:49:55Z")

</div>

Hi Ann,

That makes sense. Maybe this can be added to the API documentation? For example, "Note that if you specify one or more severities, no issues of type ‘security hotspot’ will be returned because security hotspots have no severity.

Thanks, Frank

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/system/32/78532_2.png) [@system](https://community.sonarsource.com/u/system)\
**Post date:** [April 7, 2022, 2:08pm UTC](https://community.sonarsource.com/t/issues-api-does-not-return-security-hotspots-when-passing-a-severity/23326/6 "2022-04-07T14:08:50Z")

</div>

Closed on April 7, 2022, 2:08pm UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
