security_events
scope to use this endpoint. GitHub Apps must have the security_events
write permission to use this endpoint.--ref refs/pull/42/merge
or --ref refs/pull/42/head
, then the results appear as alerts in a pull request check. For more information, see "Triaging code scanning alerts in pull requests."--ref refs/heads/my-branch
, then the results appear in the Security tab for your repository. For more information, see "Managing code scanning alerts for your repository."gzip
, and then encode it as a Base64 format string. For example:gzip -c analysis-data.sarif | base64 -w0
202 Accepted
, response includes an id
value./sarifs/{sarif_id}
endpoint.curl --location --request POST 'https://api.github.com/repos///code-scanning/sarifs' \
--header 'Content-Type: application/json' \
--data-raw '{
"checkout_uri": "file:///github/workspace/",
"commit_sha": "stringstringstringstringstringstringstri",
"ref": "string",
"sarif": "string",
"started_at": "2019-08-24T14:15:22Z",
"tool_name": "string"
}'
{
"id": "6c81cd8e-b078-4ac3-a3be-1dad7dbd0b53",
"url": "http://example.com"
}
Authorization: Bearer ********************
refs/heads/<branch name>
,refs/pull/<number>/merge
, or refs/pull/<number>/head
.gzip
and then translate the contents of the file into a Base64 encoding string. For more information, see "SARIF support for code scanning."YYYY-MM-DDTHH:MM:SSZ
.tool_guid
parameter of operations such as GET /repos/{owner}/{repo}/code-scanning/alerts
.【GitHub】API开发者 微信交流群
用微信扫右侧二维码,加入【GitHub】API开发者 交流群,互助沟通