Skip to content

Commit 559575e

Browse files
Set permissions for GitHub actions (#1540)
- 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/) 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. Signed-off-by: naveensrinivasan <[email protected]>
1 parent b980d72 commit 559575e

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.github/workflows/build-test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
branches:
99
- trunk
1010

11+
permissions:
12+
contents: read
13+
1114
jobs:
1215
build-and-test:
1316
# Skip job based on the commit message, only works in push to branches for now

.github/workflows/test-video.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
branches:
99
- trunk
1010

11+
permissions:
12+
contents: read
13+
1114
jobs:
1215
build-and-test:
1316
# Skip job based on the commit message, only works in push to branches for now

0 commit comments

Comments
 (0)