security_events
scope to use this endpoint with private repos,public_repo
scope also grants permission to read security events on public repos only.security_events
read permission to use this endpoint.curl --location --request GET 'https://api.github.com/repos///code-scanning/alerts//instances'
[
{
"analysis_key": "string",
"category": "string",
"classifications": [
"source"
],
"commit_sha": "string",
"environment": "string",
"html_url": "string",
"location": {
"end_column": 0,
"end_line": 0,
"path": "string",
"start_column": 0,
"start_line": 0
},
"message": {
"text": "string"
},
"ref": "string",
"state": "open"
}
]
number
field in the response from the GET /repos/{owner}/{repo}/code-scanning/alerts
operation.ref
for a branch can be formatted either as refs/heads/<branch name>
or simply <branch name>
. To reference a pull request use refs/pull/<number>/merge
.refs/heads/<branch name>
,refs/pull/<number>/merge
, or refs/pull/<number>/head
.