jquery/.github
Alex c909d6b1ff
Build: Limit permissions for GitHub workflows
Add explicit permissions section[^1] to workflows. This is a security
best practice because by default workflows run with extended set
of permissions[^2] (except from `on: pull_request` from external forks[^3].
By specifying any permission explicitly all others are set to none. By using
the principle of least privilege the damage a compromised workflow can do
(because of an injection[^4] or compromised third party tool or action) is
restricted. It is recommended to have most strict permissions on the top
level[^5] and grant write permissions on job level[^6] on a case by case
basis.

[^1]: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
[^2]: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token
[^3]: https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
[^4]: https://securitylab.github.com/research/github-actions-untrusted-input/
[^5]: https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions
[^6]: https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs

Closes gh-5119
2022-12-01 14:23:17 +01:00
..
workflows Build: Limit permissions for GitHub workflows 2022-12-01 14:23:17 +01:00
dependabot.yml Build: Add dependabot.yml config (GitHub Actions) 2022-06-27 18:33:41 +02:00
ISSUE_TEMPLATE.md Docs: Update Frequently Reported Issues in the GitHub issue template 2020-06-08 20:25:11 +02:00
lock.yml Misc: Add config for lockbot 2018-06-17 15:49:27 -04:00
PULL_REQUEST_TEMPLATE.md Docs: Remove the CLA checkbox in the pull request template 2021-10-18 18:09:04 +02:00