name | example | route | scope | type |
---|---|---|---|---|
List secret scanning alerts for a repository |
octokit.rest.secretScanning.listAlertsForRepo({ owner, repo }) |
GET /repos/{owner}/{repo}/secret-scanning/alerts |
secretScanning |
API method |
Lists secret scanning alerts for an eligible repository, from newest to oldest.
To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the repo
scope or security_events
scope.
For public repositories, you may instead use the public_repo
scope.
GitHub Apps must have the secret_scanning_alerts
read permission to use this endpoint.
octokit.rest.secretScanning.listAlertsForRepo({
owner,
repo,
});
name | required | description |
---|---|---|
owner | yes |
The account owner of the repository. The name is not case sensitive. |
repo | yes |
The name of the repository. The name is not case sensitive. |
state | no |
Set to |
secret_type | no |
A comma-separated list of secret types to return. By default all secret types are returned. See "Secret scanning patterns" for a complete list of secret types. |
resolution | no |
A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are |
sort | no |
The property to sort the results by. |
direction | no |
The direction to sort the results by. |
page | no |
Page number of the results to fetch. |
per_page | no |
The number of results per page (max 100). |
before | no |
A cursor, as given in the Link header. If specified, the query only searches for events before this cursor. To receive an initial cursor on your first request, include an empty "before" query string. |
after | no |
A cursor, as given in the Link header. If specified, the query only searches for events after this cursor. To receive an initial cursor on your first request, include an empty "after" query string. |
See also: GitHub Developer Guide documentation.