GitHub v3 REST API

code-scanning-alert-items

object
numberintegerrequiredread-only

The security alert number.

created_atstring(date-time)requiredread-only

The time that the alert was created in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.

urlstring(uri)requiredread-only

The REST API URL of the alert resource.

html_urlstring(uri)requiredread-only

The GitHub URL of the alert resource.

instances_urlstring(uri)requiredread-only

The REST API URL for fetching the list of instances for an alert.

statestringrequired

State of a code scanning alert.

Allowed values:opencloseddismissedfixed

dismissed_byobjectrequired

Simple User

Show Child Parameters
dismissed_atstring(date-time)requiredread-only

The time that the alert was dismissed in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.

dismissed_reasonstringrequired

Required when the state is dismissed. The reason for dismissing or closing the alert. Can be one of: false positive, won't fix, and used in tests.

Allowed values:false positivewon't fixused in tests

ruleobjectrequired
Show Child Parameters
toolobjectrequired
Show Child Parameters
most_recent_instanceobjectrequired
Show Child Parameters
Example

code-scanning-alert-rule

object
idstring

A unique identifier for the rule used to detect the alert.

namestring

The name of the rule used to detect the alert.

severitystring

The severity of the alert.

Allowed values:nonenotewarningerror

descriptionstring

A short description of the rule used to detect the alert.

full_descriptionstring

description of the rule used to detect the alert.

tagsarray[string]

A set of tags applicable for the rule.

helpstring

Detailed documentation for the rule as GitHub Flavored Markdown.

Example

code-scanning-alert

object
numberintegerrequiredread-only

The security alert number.

created_atstring(date-time)requiredread-only

The time that the alert was created in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.

urlstring(uri)requiredread-only

The REST API URL of the alert resource.

html_urlstring(uri)requiredread-only

The GitHub URL of the alert resource.

instances_urlstring(uri)requiredread-only

The REST API URL for fetching the list of instances for an alert.

statestringrequired

State of a code scanning alert.

Allowed values:opencloseddismissedfixed

dismissed_byobjectrequired

Simple User

Show Child Parameters
dismissed_atstring(date-time)requiredread-only

The time that the alert was dismissed in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.

dismissed_reasonstringrequired

Required when the state is dismissed. The reason for dismissing or closing the alert. Can be one of: false positive, won't fix, and used in tests.

Allowed values:false positivewon't fixused in tests

ruleobjectrequired
Show Child Parameters
toolobjectrequired
Show Child Parameters
most_recent_instanceobjectrequired
Show Child Parameters
instancesDEPRECATED
Example

code-scanning-alert-set-state

string

Sets the state of the code scanning alert. Can be one of open or dismissed. You must provide dismissed_reason when you set the state to dismissed.

Allowed values:opendismissed

code-scanning-analysis-sarif-id

string

An identifier for the upload.

Example