Skip to content

Commit 881dbd9

Browse files
committed
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]>
1 parent 5b8f731 commit 881dbd9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/workflows/stale.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,14 @@ on:
33
schedule:
44
- cron: "25 * * * *"
55

6+
permissions:
7+
contents: read
8+
69
jobs:
710
stale:
11+
permissions:
12+
issues: write # for actions/stale to close stale issues
13+
pull-requests: write # for actions/stale to close stale PRs
814
runs-on: ubuntu-latest
915
steps:
1016
- uses: actions/stale@v4

0 commit comments

Comments
 (0)