Make WordPress Core


Ignore:
Timestamp:
05/03/2023 10:15:27 PM (2 years 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/slack-notifications.yml

    r55152 r55715  
    2626        description: 'The Slack webhook URL for a failed build.'
    2727        required: true
     28
     29# Disable permissions for all available scopes by default.
     30# Any needed permissions should be configured at the job level.
     31permissions: {}
    2832
    2933env:
     
    4549    name: Prepare notifications
    4650    runs-on: ubuntu-latest
     51    permissions:
     52      actions: read
     53      contents: read
    4754    timeout-minutes: 5
    4855    if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event.workflow_run.event != 'pull_request' }}
Note: See TracChangeset for help on using the changeset viewer.