Skip to content

Commit

Permalink
GitHub Workflows security hardening (#3081)
Browse files Browse the repository at this point in the history
  • Loading branch information
sashashura committed Apr 17, 2023
1 parent c6f3a35 commit 5b71b8f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/branch-alias.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@ on:
push:
tags: ['*']

permissions: {}
jobs:
branch-alias:
permissions:
contents: write # to create branch (peter-evans/create-pull-request)
pull-requests: write # to create a PR (peter-evans/create-pull-request)

name: Update branch alias
runs-on: ubuntu-22.04

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
- master
pull_request:

permissions:
contents: read # to fetch code (actions/checkout)

jobs:
composer-normalize:
name: Composer Normalize
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
- master
pull_request:

permissions:
contents: read # to clone the repos and get release assets (shivammathur/setup-php)

jobs:
build-lowest-version:
name: Build lowest version
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
- master
pull_request:

permissions:
contents: read # to fetch code (actions/checkout)

jobs:
phpstan:
name: PHPStan
Expand Down

0 comments on commit 5b71b8f

Please sign in to comment.