Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: set minimal permissions to workflows #7070

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/auto_author_assign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ on:
types: [opened, reopened]

permissions:
pull-requests: write
contents: read

jobs:
assign-author:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: toshimaru/auto-author-assign@v1.6.2
3 changes: 3 additions & 0 deletions .github/workflows/binder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ on:
pull_request_target:
types: [opened]

permissions:
contents: read

jobs:
binder:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- cron: '0 0 * * *'

permissions:
contents: write
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/buildutils.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true

permissions:
contents: read

jobs:
versioning:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
pull_request:

permissions:
contents: write
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/enforce-label.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Enforce PR label

permissions:
contents: read

on:
pull_request:
types: [labeled, unlabeled, opened, edited, synchronize]
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ on:
- cron: '0 0 * * *'

permissions:
issues: write
pull-requests: write
contents: read

jobs:
lock:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: dessant/lock-threads@v4
with:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/playwright-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ on:
types: [created, edited]

permissions:
contents: write
pull-requests: write
contents: read
diogoteles08 marked this conversation as resolved.
Show resolved Hide resolved

jobs:
update-snapshots:
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, 'update playwright snapshots') }}
runs-on: ubuntu-latest
permissions:
pull-requests: write # Required by actions/update-snapshots
strategy:
fail-fast: false
matrix:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/prep-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ on:
description: 'Use PRs with activity since the last stable git tag'
required: false
type: boolean
permissions:
contents: read
jobs:
prep_release:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ on:
description: 'Comma separated list of steps to skip'
required: false

permissions:
contents: read

jobs:
publish_release:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ui-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true

permissions:
contents: read

jobs:
build:
name: Build
Expand Down
Loading