Skip to content

Commit

Permalink
Set permissions for GitHub actions
Browse files Browse the repository at this point in the history
- 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 <42328488+neilnaveen@users.noreply.github.com>
  • Loading branch information
neilnaveen committed Apr 14, 2022
1 parent ab160e4 commit 29dc216
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/docs-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,13 @@ on:
paths:
- docs/**

permissions:
contents: read

jobs:
publish:
permissions:
contents: none
uses: apollographql/docs/.github/workflows/publish.yml@main
secrets:
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
Expand Down

0 comments on commit 29dc216

Please sign in to comment.