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 <msoulanille@google.com>
This commit is contained in:
Alex 2022-09-24 01:06:54 +02:00 committed by GitHub
parent 278eaca0c2
commit af54b76d97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -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