github_code_scanning_list_alerts
List code scanning alerts with the rule, file, and line that triggered each, then filter by pull request, branch, state, or severity to review security findings.
Instructions
List code scanning alerts, each with the rule that fired and the file and line it fired on. Filter to one pull request with pr, or to a branch with ref. Needs GitHub Advanced Security on a private repository, which answers 403 without it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pr | No | The number of the pull request for the results you want to list. | |
| ref | No | The Git reference for the results you want to list. A branch can be `refs/heads/BRANCH` or simply `BRANCH`. To reference a pull request use `refs/pull/NUMBER/merge`. | |
| page | No | The page number of the results to fetch. Defaults to 1. | |
| repo | Yes | The name of the repository without the `.git` extension. The name is not case sensitive. | |
| sort | No | The property by which to sort the results. GitHub uses `created` when this is absent. | |
| owner | Yes | The account owner of the repository. The name is not case sensitive. | |
| state | No | If specified, only code scanning alerts with this state will be returned. | |
| perPage | No | The number of results per page (max 100). Defaults to 30. | |
| severity | No | If specified, only code scanning alerts with this severity will be returned. | |
| toolGuid | No | The GUID of a code scanning tool. Note that some code scanning tools may not include a GUID in their analysis data. Cannot be combined with `tool_name`. | |
| toolName | No | The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. | |
| assignees | No | Filter alerts by assignees, as a comma-separated list of user handles. Use `*` for at least one assignee or `none` for unassigned. | |
| direction | No | The direction to sort the results by. GitHub uses `desc` when this is absent. |