Skip to content

Commit 1479e69

Browse files
authored
Added permissions for GitHub actions (#3804)
- 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: neilnaveen <[email protected]>
1 parent cc0f7a9 commit 1479e69

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

Diff for: .github/workflows/build.yml

+3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ on:
2626
env:
2727
NODE_VERSION: 14.x
2828

29+
permissions:
30+
contents: read
31+
2932
jobs:
3033
build:
3134
name: Build project

Diff for: .github/workflows/documentation.yml

+3
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ on:
2727
env:
2828
PYTHON_VERSION: 3.x
2929

30+
permissions:
31+
contents: read
32+
3033
jobs:
3134
documentation:
3235
name: Build documentation

Diff for: .github/workflows/publish.yml

+3
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ on:
2727
env:
2828
PYTHON_VERSION: 3.x
2929

30+
permissions:
31+
contents: read
32+
3033
jobs:
3134
publish_pypi:
3235
name: Build and push Python package

0 commit comments

Comments
 (0)