Skip to main content

alerts

Overview

Namealerts
TypeResource
Idgithub.code_scanning.alerts

Fields

NameDatatypeDescription
created_atstringThe time that the alert was created in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
dismissed_atstringThe time that the alert was dismissed in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
dismissed_byobjectA GitHub user.
dismissed_commentstringThe dismissal comment associated with the dismissal of the alert.
dismissed_reasonstringRequired when the state is dismissed. The reason for dismissing or closing the alert.
fixed_atstringThe time that the alert was no longer detected and was considered fixed in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
html_urlstringThe GitHub URL of the alert resource.
instances_urlstringThe REST API URL for fetching the list of instances for an alert.
most_recent_instanceobject
numberintegerThe security alert number.
ruleobject
statestringState of a code scanning alert.
toolobject
updated_atstringThe time that the alert was last updated in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
urlstringThe REST API URL of the alert resource.

Methods

NameAccessible byRequired ParamsDescription
get_alertSELECTalert_number, owner, repoGets a single code scanning alert. You must use an access token with the security_events scope to use this endpoint with private repos, the public_repo scope also grants permission to read security events on public repos only. GitHub Apps must have the security_events read permission to use this endpoint.
update_alertEXECalert_number, owner, repo, data__stateUpdates the status of a single code scanning alert. You must use an access token with the security_events scope to use this endpoint with private repositories. You can also use tokens with the public_repo scope for public repositories only. GitHub Apps must have the security_events write permission to use this endpoint.