From 59bff4f1d494d0e6cf3cbfd6d9bd0ca7bced070b Mon Sep 17 00:00:00 2001 From: nathannaveen <42319948+nathannaveen@users.noreply.github.com> Date: Wed, 15 Jun 2022 00:59:10 +0000 Subject: [PATCH] chore: Set permissions for GitHub actions MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/) Signed-off-by: nathannaveen <42319948+nathannaveen@users.noreply.github.com> --- .github/workflows/regen.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/regen.yml b/.github/workflows/regen.yml index 33a041f382..47aa736be2 100644 --- a/.github/workflows/regen.yml +++ b/.github/workflows/regen.yml @@ -21,8 +21,13 @@ on: description: Autocommit to branch (y or n) required: false default: 'n' +permissions: + contents: read + jobs: runregen: + permissions: + contents: write # for Git to git push runs-on: ubuntu-latest name: Run Regen services: -- 2.25.1