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

Restrict permissions in GHA workflows #1782

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
3 changes: 3 additions & 0 deletions .github/workflows/benchmark.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
pull_request:
types: [opened, synchronize, reopened, labeled]

permissions:
contents: read

jobs:
run_benchmark:
name: run_benchmark
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/copyright.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ on:
- '!**.md'
workflow_dispatch:

permissions:
contents: read

jobs:
main:
name: Enforce copyright notices
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/flake8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ on:
- '!src/rez/vendor/**'
- '!src/rez/backport/**'

permissions:
contents: read

jobs:
lint:
name: Run Linter
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/installation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ on:
- '!**.md'
workflow_dispatch:

permissions:
contents: read

jobs:
main:
name: ${{ matrix.os }} - ${{ matrix.python-version }} - ${{ matrix.method }}
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ on:
release:
types: [released]

permissions:
contents: read

jobs:
publish:
name: Publish to PyPI
Expand All @@ -11,6 +14,8 @@ jobs:
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
# Not sure if it's needed here since it's defined at the top level.
contents: read

steps:
- name: Checkout
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/release-notice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
# published should cover both 'released' and 'prereleased'
- published

permissions:
contents: read

jobs:
publish:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
core:
name: Tests
Expand Down
Loading