Skip to content

ci: add minimum GitHub token permissions for workflows #5557

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

Closed
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/check_diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ on:
description: 'Optional comma separated list of rustfmt config options to pass when running the feature branch'
required: false

permissions:
contents: read

jobs:
diff_check:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
- master
pull_request:

permissions:
contents: read

jobs:
integration-tests:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
- master
pull_request:

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
- master
pull_request:

permissions:
contents: read

jobs:
test:
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/virtual-environments-for-github-hosted-runners#supported-runners-and-hardware-resources
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/rustdoc_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
- master
pull_request:

permissions:
contents: read

jobs:
rustdoc_check:
runs-on: ubuntu-latest
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/upload-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@ on:
types: [created]
workflow_dispatch:

permissions:
contents: read

jobs:
build-release:
permissions:
contents: write # for actions/upload-release-asset to upload release asset
name: build-release
strategy:
matrix:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
- master
pull_request:

permissions:
contents: read

jobs:
test:
runs-on: windows-latest
Expand Down