Skip to content

Commit

Permalink
chore: Set permissions for GitHub actions (#1195)
Browse files Browse the repository at this point in the history
* 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鈥檛 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 <42319948+nathannaveen@users.noreply.github.com>

* Update .github/workflows/ci.yml

Co-authored-by: F谩bio Santos <fabiosantosart@gmail.com>

Co-authored-by: F谩bio Santos <fabiosantosart@gmail.com>
  • Loading branch information
nathannaveen and fabiosantoscode committed May 15, 2022
1 parent a47f29a commit b47c3e6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Expand Up @@ -2,6 +2,8 @@ name: CI pipeline

on: [ push, pull_request, workflow_dispatch ]

permissions: read-all

jobs:
build:
name: "Build ${{ matrix.os }} node${{ matrix.node-version }}"
Expand Down

0 comments on commit b47c3e6

Please sign in to comment.