Make WordPress Core


Ignore:
Timestamp:
05/03/2023 10:15:27 PM (18 months ago)
Author:
johnbillion
Message:

Build/Test Tools: Restrict the permissions granted to jobs on GitHub Actions

The permissions key in a job declares the GitHub permissions that are granted to the token that's used by the job. Restricting the permissions reduces the impact that a vulnerability in the CI system can have.

Props desrosj, johnbillion

See #57865

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/.github/workflows/end-to-end-tests.yml

    r55152 r55715  
    2727  cancel-in-progress: true
    2828
     29# Disable permissions for all available scopes by default.
     30# Any needed permissions should be configured at the job level.
     31permissions: {}
     32
    2933env:
    3034  LOCAL_DIR: build
     
    4953    name: E2E Tests
    5054    runs-on: ubuntu-latest
     55    permissions:
     56      contents: read
    5157    timeout-minutes: 20
    5258    if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
     
    124130    name: Failed workflow tasks
    125131    runs-on: ubuntu-latest
     132    permissions:
     133      actions: write
    126134    needs: [ e2e-tests, slack-notifications ]
    127135    if: |
Note: See TracChangeset for help on using the changeset viewer.