video.js icon indicating copy to clipboard operation
video.js copied to clipboard

chore: Set permissions for GitHub actions

Open nathannaveen opened this issue 3 years ago • 3 comments

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

Signed-off-by: nathannaveen [email protected]

nathannaveen avatar Jun 04 '22 00:06 nathannaveen

💖 Thanks for opening this pull request! 💖

Things that will help get your PR across the finish line:

  • Run npm run lint -- --errors locally to catch formatting errors earlier.
  • Include tests when adding/changing behavior.
  • Include screenshots and animated GIFs whenever possible.

We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can.

welcome[bot] avatar Jun 04 '22 00:06 welcome[bot]

From my understanding, PRs get a more restricted set of permissions by default. Is there a specific benefit to specifying the permissions then?

Is this protecting from the action that we depend on updating and being malicious?

gkatsev avatar Jun 09 '22 18:06 gkatsev

From my understanding, PRs get a more restricted set of permissions by default. Is there a specific benefit to specifying the permissions then?

Is this protecting from the action that we depend on updating and being malicious?

Yes.

nathannaveen avatar Jun 17 '22 14:06 nathannaveen