From 8446cda5190cfde270df133b0234c2be71baf2a0 Mon Sep 17 00:00:00 2001 From: naveensrinivasan <172697+naveensrinivasan@users.noreply.github.com> Date: Sat, 16 Apr 2022 01:58:38 +0000 Subject: [PATCH] Set permissions for GitHub actions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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/) 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. Signed-off-by: naveensrinivasan <172697+naveensrinivasan@users.noreply.github.com> --- .github/workflows/assets.yml | 3 +++ .github/workflows/coding-standards.yml | 3 +++ .github/workflows/translations.yml | 3 +++ 3 files changed, 9 insertions(+) diff --git a/.github/workflows/assets.yml b/.github/workflows/assets.yml index 132a1d138..eb17b6f19 100644 --- a/.github/workflows/assets.yml +++ b/.github/workflows/assets.yml @@ -7,6 +7,9 @@ on: - master - 2.* +permissions: + contents: read + jobs: js: name: "Building assets" diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml index 309df7383..cc7f030ec 100644 --- a/.github/workflows/coding-standards.yml +++ b/.github/workflows/coding-standards.yml @@ -7,6 +7,9 @@ on: - master - 2.* +permissions: + contents: read + jobs: coding-standards: name: "CS Fixer & PHPStan" diff --git a/.github/workflows/translations.yml b/.github/workflows/translations.yml index 5327fdaca..b5de2b372 100644 --- a/.github/workflows/translations.yml +++ b/.github/workflows/translations.yml @@ -7,6 +7,9 @@ on: - master - 2.* +permissions: + contents: read + jobs: translations: name: "Translations"