Skip to content

Latest commit

 

History

History
95 lines (66 loc) · 3.12 KB

listAlertsForRepo.md

File metadata and controls

95 lines (66 loc) · 3.12 KB
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

List secret scanning alerts for a repository

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,
});

Parameters

name required description
owneryes

The account owner of the repository. The name is not case sensitive.

repoyes

The name of the repository. The name is not case sensitive.

stateno

Set to open or resolved to only list secret scanning alerts in a specific state.

secret_typeno

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.

resolutionno

A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are false_positive, wont_fix, revoked, pattern_edited, pattern_deleted or used_in_tests.

sortno

The property to sort the results by. created means when the alert was created. updated means when the alert was updated or resolved.

directionno

The direction to sort the results by.

pageno

Page number of the results to fetch.

per_pageno

The number of results per page (max 100).

beforeno

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.

afterno

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.