listHotspots
listHotspotsList security hotspots awaiting human review, with optional branch, pull request, path, and status filters. Get rule, vulnerability probability, message, and file location for each hotspot.
Instructions
List project Security Hotspots that need human review. Defaults to TO_REVIEW; supports path and ref filters. Returns rule/category, vulnerability probability, message, and file location. Scope explicitly: omitting both branch and pullRequest uses the configured default (usually main). For non-main or PR work, pass the matching ref explicitly; discover it with listProjectBranches / listProjectPullRequests.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Page size; server default if omitted. | |
| branch | No | Branch name; mutually exclusive with `pullRequest`. Omission uses the configured default (usually main). For non-main work, pass explicitly; use `listProjectBranches`. | |
| offset | No | Offset; default 0. | |
| status | No | `TO_REVIEW` or `REVIEWED`; default `TO_REVIEW` | |
| projectKey | No | Project key; omit only if the server has a default. Discover with `listProjects`. | |
| pullRequest | No | PR key; mutually exclusive with `branch`; no default. For PR work, pass explicitly; use `listProjectPullRequests`. | |
| componentPathPrefix | No | Sonar `componentPath` prefix relative to the project root; an exact file path is also allowed. Uses directory boundaries, so `src` does not match `srcExtra`. For Java/Kotlin packages use slashes. Sonar paths may differ from repository paths; use `listComponents` instead of guessing. If `pathPrefixTruncated=true`, narrow the prefix. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | No | Hotspots in this page. | |
| limit | No | Maximum number of items per page. | |
| total | No | Total number of hotspots matching the query across all pages. | |
| offset | No | Zero-based offset of this page within the full result set. | |
| pathPrefixTruncated | No | True when componentPathPrefix was supplied and the underlying scan hit the configured maximum hotspot count before exhausting Sonar. Tighten the prefix to see the rest. |