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: add minimum GitHub token permissions for workflows #5072

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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/audit.yml
Expand Up @@ -9,8 +9,15 @@ on:
schedule:
- cron: '0 2 * * *' # run at 2 AM UTC

permissions:
contents: read

jobs:
security-audit:
permissions:
checks: write # for actions-rs/audit-check to create check
contents: read # for actions/checkout to fetch code
issues: write # for actions-rs/audit-check to create issues
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip')"
steps:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Expand Up @@ -27,6 +27,9 @@ defaults:
run:
shell: bash

permissions:
contents: read

jobs:
# Depends on all action sthat are required for a "successful" CI run.
tests-pass:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/labeler.yml
Expand Up @@ -4,8 +4,14 @@ on:

# See .github/labeler.yml file

permissions:
contents: read

jobs:
triage:
permissions:
contents: read # for actions/labeler to determine modified files
pull-requests: write # for actions/labeler to add labels to PRs
runs-on: ubuntu-latest
if: github.repository_owner == 'tokio-rs'
steps:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/loom.yml
Expand Up @@ -13,6 +13,9 @@ env:
# Change to specific Rust release to pin
rust_stable: stable

permissions:
contents: read

jobs:
loom:
name: loom
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/pr-audit.yml
Expand Up @@ -8,6 +8,9 @@ on:
paths:
- '**/Cargo.toml'

permissions:
contents: read

jobs:
security-audit:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/stress-test.yml
Expand Up @@ -11,6 +11,9 @@ env:
# Change to specific Rust release to pin
rust_stable: stable

permissions:
contents: read

jobs:
stress-test:
name: Stress Test
Expand Down