Skip to content

Commit cab22da

Browse files
authored
doc: update token permissions documentation
1 parent 5bfdb52 commit cab22da

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

README.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -318,17 +318,19 @@ Tool used to display the defects and fixes in the console output. Currently supp
318318

319319
### token
320320

321-
Token used to upload findings in SARIF format to GitHub.
321+
The token is used to upload findings in SARIF format to GitHub.
322322

323323
* default value: `undefined`
324324
* requirements: `optional`
325325

326-
Token needs to have the following [characteristics](https://docs.github.com/en/rest/code-scanning#upload-an-analysis-as-sarif-data):
326+
The token needs to have the following [characteristics](https://docs.github.com/en/rest/code-scanning#upload-an-analysis-as-sarif-data):
327327

328-
* Token with the `security_events: write` scope to use this endpoint for private repositories.
329-
* Token with the `public_repo` scope for **public repositories only**.
328+
* `security_events: write` scope for **all repositories**.
329+
* `actions: read` and `contents: read` scopes for **private repositories only**.
330330

331-
If the `token` isn't passed, SARIF file can be uploaded manually using [sarif from outputs](#sarif) and [github/codeql-action/upload-sarif](https://docs.github.com/en/code-security/code-scanning/integrating-with-code-scanning/uploading-a-sarif-file-to-github#uploading-a-code-scanning-analysis-with-github-actions) GitHub Action.
331+
> [!TIP]
332+
>
333+
> When the `token` isn't passed, the SARIF file won't be uploaded (the GitHub Security Dashboard won't be updated), but the Action will work as expected. SARIF file can also be uploaded manually using [sarif from outputs](#sarif) and [github/codeql-action/upload-sarif](https://docs.github.com/en/code-security/code-scanning/integrating-with-code-scanning/uploading-a-sarif-file-to-github#uploading-a-code-scanning-analysis-with-github-actions) GitHub Action.
332334

333335
## Outputs
334336

0 commit comments

Comments
 (0)