Skip to content

Commit 6e5058c

Browse files
nathannaveenhyangah
authored andcommitted
chore: Set permissions for GitHub actions
Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much. - Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs [Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/) Signed-off-by: nathannaveen <[email protected]> Change-Id: Iade3b8ea1fb01a0635fefe4870c28c80ad0586d7 GitHub-Last-Rev: c96e84f GitHub-Pull-Request: #2277 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/410474 Reviewed-by: Jamal Carvalho <[email protected]> Reviewed-by: Hyang-Ah Hana Kim <[email protected]>
1 parent caee58d commit 6e5058c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.github/workflows/wiki.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,15 @@ on:
88
- 'docs/**'
99

1010
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
11+
permissions:
12+
contents: read
13+
1114
jobs:
1215
# This workflow contains a single job called "build"
1316
publish:
1417
# The type of runner that the job will run on
18+
permissions:
19+
contents: write # for Git to git push
1520
runs-on: ubuntu-latest
1621

1722
# Steps represent a sequence of tasks that will be executed as part of the job

0 commit comments

Comments
 (0)