GitHub v3 REST API

code-scanning-analysis-category

string

Identifies the configuration under which the analysis was executed. Used to distinguish between multiple analyses for the same tool and commit, but performed on different languages or different parts of the code.

code-scanning-alert-location

object

Describe a region within a file for the alert.

pathstring
start_lineinteger
end_lineinteger
start_columninteger
end_columninteger
Example

code-scanning-alert-classification

string

A classification of the file. For example to identify it as generated.

Allowed values:sourcegeneratedtestlibrary

code-scanning-alert-instance

object
refstring

The full Git reference, formatted as refs/heads/<branch name>,
refs/pull/<number>/merge, or refs/pull/<number>/head.

analysis_keystring

Identifies the configuration under which the analysis was executed. For example, in GitHub Actions this includes the workflow filename and job name.

environmentstring

Identifies the variable values associated with the environment in which the analysis that generated this alert instance was performed, such as the language that was analyzed.

categorystring

Identifies the configuration under which the analysis was executed. Used to distinguish between multiple analyses for the same tool and commit, but performed on different languages or different parts of the code.

statestring

State of a code scanning alert.

Allowed values:opencloseddismissedfixed

commit_shastring
messageobject
Show Child Parameters
locationobject

Describe a region within a file for the alert.

Show Child Parameters
html_urlstring
classificationsarray[string]

A classification of the file. For example to identify it as generated.

Allowed values:sourcegeneratedtestlibrary

Example

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