From af54b76d97511ccc8a01156605ffbbf81f010ead Mon Sep 17 00:00:00 2001 From: Alex Date: Sat, 24 Sep 2022 01:06:54 +0200 Subject: [PATCH] Update deploy-benchmark-prod.yml (#6814) This PR adds explicit permissions section to workflows. This is a security best practice because by default workflows run with extended set of permissions (except from on: pull_request from external forks). 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 or compromised third party tool or action) is restricted. It is recommended to have most strict permissions on the top level and grant write permissions on job level case by case Signed-off-by: sashashura <93376818+sashashura@users.noreply.github.com> Signed-off-by: sashashura <93376818+sashashura@users.noreply.github.com> Co-authored-by: Rajeshwar Reddy T <43972606+rthadur@users.noreply.github.com> Co-authored-by: Matthew Soulanille --- .github/workflows/deploy-benchmark-prod.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/deploy-benchmark-prod.yml b/.github/workflows/deploy-benchmark-prod.yml index 0adc80811..e9bf26627 100644 --- a/.github/workflows/deploy-benchmark-prod.yml +++ b/.github/workflows/deploy-benchmark-prod.yml @@ -7,8 +7,13 @@ on: paths: - "e2e/benchmarks/**" +permissions: + contents: read + jobs: deploy_live_website: + permissions: + pull-requests: write # for FirebaseExtended/action-hosting-deploy to comment on PRs runs-on: ubuntu-latest steps: - uses: actions/checkout@v2