Skip to content

Commit 94ba753

Browse files
chore: Set permissions for GitHub actions (#835)
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: naveensrinivasan <[email protected]>
1 parent 71eb7c1 commit 94ba753

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/workflows/pr.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,14 @@ on:
55
- opened
66
- edited
77
- synchronize
8+
permissions:
9+
contents: read
10+
811
jobs:
912
main:
13+
permissions:
14+
pull-requests: read # for amannn/action-semantic-pull-request to analyze PRs
15+
statuses: write # for amannn/action-semantic-pull-request to mark status of analyzed PR
1016
name: Check PR title
1117
runs-on: ubuntu-latest
1218
steps:

0 commit comments

Comments
 (0)