Skip to main content

alerts

Overview

Namealerts
TypeResource
Idgithub.secret_scanning.alerts

Fields

NameDatatypeDescription
resolved_byobjectSimple User
locations_urlstringThe REST API URL of the code locations for this alert.
statestringSets the state of the secret scanning alert. Can be either open or resolved. You must provide resolution when you set the state to resolved.
secretstringThe secret that was detected.
secret_typestringThe type of secret that secret scanning detected.
resolved_atstringThe time that the alert was resolved in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
numberintegerThe security alert number.
resolutionstringRequired when the state is resolved. The reason for resolving the alert. Can be one of false_positive, wont_fix, revoked, or used_in_tests.
created_atstringThe time that the alert was created in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
html_urlstringThe GitHub URL of the alert resource.
urlstringThe REST API URL of the alert resource.

Methods

NameAccessible byRequired ParamsDescription
get_alertSELECTalert_number, owner, repoGets a single secret scanning alert detected in a private repository. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the repo scope or security_events scope.

GitHub Apps must have the secret_scanning_alerts read permission to use this endpoint.
list_alerts_for_enterpriseSELECTenterpriseLists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest.
To use this endpoint, you must be a member of the enterprise, and you must use an access token with the repo scope or security_events scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a security manager.
list_alerts_for_orgSELECTorgLists secret scanning alerts for eligible repositories in an organization, from newest to oldest.
To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the repo scope or security_events scope.

GitHub Apps must have the secret_scanning_alerts read permission to use this endpoint.
list_alerts_for_repoSELECTowner, repoLists secret scanning alerts for a private repository, from newest to oldest. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the repo scope or security_events scope.

GitHub Apps must have the secret_scanning_alerts read permission to use this endpoint.
update_alertEXECalert_number, owner, repo, data__stateUpdates the status of a secret scanning alert in a private repository. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the repo scope or security_events scope.

GitHub Apps must have the secret_scanning_alerts write permission to use this endpoint.