Skip to content

Commit

Permalink
Restrict permissions in GHA workflows.
Browse files Browse the repository at this point in the history
Signed-off-by: Jean-Christophe Morin <jean_christophe_morin@hotmail.com>
  • Loading branch information
JeanChristopheMorinPerso committed Jun 29, 2024
1 parent 980dd0b commit e5ffdf2
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 0 deletions.
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
3 changes: 3 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 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

0 comments on commit e5ffdf2

Please sign in to comment.