1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Set permissions for GitHub actions

- 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: naveensrinivasan <172697+naveensrinivasan@users.noreply.github.com>
This commit is contained in:
naveensrinivasan 2022-04-06 20:35:46 +00:00
parent 95e982b3f2
commit e0aa749b62
2 changed files with 10 additions and 0 deletions

View file

@ -13,6 +13,11 @@ on:
pull_request: pull_request:
branches: [ master ] branches: [ master ]
permissions:
contents: read
jobs: jobs:
test: test:
permissions:
contents: none
uses: fog/.github/.github/workflows/ruby.yml@v1.1.0 uses: fog/.github/.github/workflows/ruby.yml@v1.1.0

View file

@ -4,6 +4,11 @@ on:
schedule: schedule:
- cron: "30 1 * * *" - cron: "30 1 * * *"
permissions:
contents: read
jobs: jobs:
stale: stale:
permissions:
contents: none
uses: fog/.github/.github/workflows/stale.yml@v1.1.0 uses: fog/.github/.github/workflows/stale.yml@v1.1.0