|
1 | 1 | {
|
2 | 2 | "openapi": "3.0.3",
|
3 | 3 | "info": {
|
4 |
| - "version": "2.16.2", |
| 4 | + "version": "2.16.3", |
5 | 5 | "title": "GitHub's official OpenAPI spec + Octokit extension",
|
6 | 6 | "description": "OpenAPI specs from https://github.com/github/rest-api-description with the 'x-octokit' extension required by the Octokit SDKs",
|
7 | 7 | "license": { "name": "MIT", "url": "https://spdx.org/licenses/MIT" },
|
|
18503 | 18503 | "/repos/{owner}/{repo}/code-scanning/sarifs": {
|
18504 | 18504 | "post": {
|
18505 | 18505 | "summary": "Upload an analysis as SARIF data",
|
18506 |
| - "description": "Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. You must use an access token with the `security_events` scope to use this endpoint. GitHub Apps must have the `security_events` write permission to use this endpoint.\n\nThere are two places where you can upload code scanning results.\n - If you upload to a pull request, for example `--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](/github/finding-security-vulnerabilities-and-errors-in-your-code/triaging-code-scanning-alerts-in-pull-requests).\"\n - If you upload to a branch, for example `--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](/github/finding-security-vulnerabilities-and-errors-in-your-code/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository).\"\n\nYou must compress the SARIF-formatted analysis data that you want to upload, using `gzip`, and then encode it as a Base64 format string. For example:\n\n```\ngzip -c analysis-data.sarif | base64\n```\n\nSARIF upload supports a maximum of 1000 results per analysis run. Any results over this limit are ignored. Typically, but not necessarily, a SARIF file contains a single run of a single tool. If a code scanning tool generates too many results, you should update the analysis configuration to run only the most important rules or queries.\n\nThe `202 Accepted`, response includes an `id` value.\nYou can use this ID to check the status of the upload by using this for the `/sarifs/{sarif_id}` endpoint.\nFor more information, see \"[Get information about a SARIF upload](/rest/reference/code-scanning#get-information-about-a-sarif-upload).\"", |
| 18506 | + "description": "Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. You must use an access token with the `security_events` scope to use this endpoint. GitHub Apps must have the `security_events` write permission to use this endpoint.\n\nThere are two places where you can upload code scanning results.\n - If you upload to a pull request, for example `--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](/github/finding-security-vulnerabilities-and-errors-in-your-code/triaging-code-scanning-alerts-in-pull-requests).\"\n - If you upload to a branch, for example `--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](/github/finding-security-vulnerabilities-and-errors-in-your-code/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository).\"\n\nYou must compress the SARIF-formatted analysis data that you want to upload, using `gzip`, and then encode it as a Base64 format string. For example:\n\n```\ngzip -c analysis-data.sarif | base64 -w0\n```\n\nSARIF upload supports a maximum of 5000 results per analysis run. Any results over this limit are ignored and any SARIF uploads with more than 25,000 results are rejected. Typically, but not necessarily, a SARIF file contains a single run of a single tool. If a code scanning tool generates too many results, you should update the analysis configuration to run only the most important rules or queries.\n\nThe `202 Accepted`, response includes an `id` value.\nYou can use this ID to check the status of the upload by using this for the `/sarifs/{sarif_id}` endpoint.\nFor more information, see \"[Get information about a SARIF upload](/rest/reference/code-scanning#get-information-about-a-sarif-upload).\"", |
18507 | 18507 | "operationId": "code-scanning/upload-sarif",
|
18508 | 18508 | "tags": ["code-scanning"],
|
18509 | 18509 | "externalDocs": {
|
|
18549 | 18549 | }
|
18550 | 18550 | },
|
18551 | 18551 | "responses": {
|
18552 |
| - "200": { |
18553 |
| - "description": "Response", |
18554 |
| - "content": { "application/json": { "schema": {} } } |
18555 |
| - }, |
18556 | 18552 | "202": {
|
18557 | 18553 | "description": "Response",
|
18558 | 18554 | "content": {
|
|
46782 | 46778 | "tool": {
|
46783 | 46779 | "$ref": "#/components/schemas/code-scanning-analysis-tool"
|
46784 | 46780 | },
|
46785 |
| - "deletable": { "type": "boolean" } |
| 46781 | + "deletable": { "type": "boolean" }, |
| 46782 | + "warning": { |
| 46783 | + "type": "string", |
| 46784 | + "description": "Warning generated when processing the analysis", |
| 46785 | + "example": "123 results were ignored" |
| 46786 | + } |
46786 | 46787 | },
|
46787 | 46788 | "required": [
|
46788 | 46789 | "ref",
|
|
46797 | 46798 | "url",
|
46798 | 46799 | "sarif_id",
|
46799 | 46800 | "tool",
|
46800 |
| - "deletable" |
| 46801 | + "deletable", |
| 46802 | + "warning" |
46801 | 46803 | ]
|
46802 | 46804 | },
|
46803 | 46805 | "code-scanning-analysis-deletion": {
|
|
60662 | 60664 | "url": "https://api.github.com/repos/octocat/hello-world/code-scanning/analyses/201",
|
60663 | 60665 | "sarif_id": "6c81cd8e-b078-4ac3-a3be-1dad7dbd0b53",
|
60664 | 60666 | "tool": { "name": "CodeQL", "guid": null, "version": "2.4.0" },
|
60665 |
| - "deletable": true |
| 60667 | + "deletable": true, |
| 60668 | + "warning": "" |
60666 | 60669 | },
|
60667 | 60670 | {
|
60668 | 60671 | "ref": "refs/heads/my-branch",
|
|
60681 | 60684 | "guid": null,
|
60682 | 60685 | "version": "1.2.0"
|
60683 | 60686 | },
|
60684 |
| - "deletable": true |
| 60687 | + "deletable": true, |
| 60688 | + "warning": "" |
60685 | 60689 | }
|
60686 | 60690 | ]
|
60687 | 60691 | },
|
|
60700 | 60704 | "url": "https://api.github.com/repos/octocat/hello-world/code-scanning/analyses/201",
|
60701 | 60705 | "sarif_id": "47177e22-5596-11eb-80a1-c1e54ef945c6",
|
60702 | 60706 | "tool": { "name": "CodeQL", "guid": null, "version": "2.4.0" },
|
60703 |
| - "deletable": true |
| 60707 | + "deletable": true, |
| 60708 | + "warning": "" |
60704 | 60709 | }
|
60705 | 60710 | },
|
60706 | 60711 | "code-scanning-analysis-deletion": {
|
|
0 commit comments