This PR adds explicit [permissions
section](https://docs.github.com/en/actions/using-workflows/workflow-syntax…
to workflows. This is a security best practice because by default workflows run with
[extended set of
permissions](https://docs.github.com/en/actions/security-guides/automatic-t…
(except from `on: pull_request` [from external
forks](https://securitylab.github.com/research/github-actions-preventing-pw…).
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](https://securitylab.github.com/research/github-actions-untrusted… or
compromised third party tool or action) is restricted.
It is recommended to have [most strict permissions on the top
level](https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-per… and
grant write permissions on [job
level](https://docs.github.com/en/actions/using-jobs/assigning-permissions-… case
by case.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3248
-- Commit Summary --
* build: harden main.yml permissions
* build: harden pull_request.yml permissions
-- File Changes --
M .github/workflows/main.yml (2)
M .github/workflows/pull_request.yml (2)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3248.patch
https://github.com/kamailio/kamailio/pull/3248.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3248
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3248(a)github.com>