Skip to content

Commit 1afeb6b

Browse files
chore: Set permissions for GitHub actions (#3247)
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: naveen <172697+naveensrinivasan@users.noreply.github.com> Co-authored-by: Glenn <5834289+glennawatson@users.noreply.github.com>
1 parent 7b99921 commit 1afeb6b

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

.github/workflows/build-samples.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,13 @@ on:
99
env:
1010
productNamespacePrefix: "ReactiveUI"
1111

12+
permissions:
13+
contents: read
14+
1215
jobs:
1316
build:
17+
permissions:
18+
contents: none
1419
uses: reactiveui/actions-common/.github/workflows/workflow-common-setup-and-build.yml@main
1520
with:
1621
configuration: Release

.github/workflows/ci-build.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,13 @@ on:
99
env:
1010
productNamespacePrefix: "ReactiveUI"
1111

12+
permissions:
13+
contents: read
14+
1215
jobs:
1316
build:
17+
permissions:
18+
contents: none
1419
uses: reactiveui/actions-common/.github/workflows/workflow-common-setup-and-build.yml@main
1520
with:
1621
configuration: Release

.github/workflows/release.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,13 @@ on:
99
env:
1010
productNamespacePrefix: "Splat"
1111

12+
permissions:
13+
contents: read
14+
1215
jobs:
1316
release:
17+
permissions:
18+
contents: none
1419
uses: reactiveui/actions-common/.github/workflows/workflow-common-release.yml@main
1520
with:
1621
configuration: Release

0 commit comments

Comments
 (0)