mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-10-01 12:20:39 +00:00
ci: add minimum GitHub token permissions for workflows (#5072)
Signed-off-by: Ashish Kurmi <akurmi@stepsecurity.io>
This commit is contained in:
parent
f4e08aec66
commit
b821e436c5
7
.github/workflows/audit.yml
vendored
7
.github/workflows/audit.yml
vendored
@ -9,8 +9,15 @@ on:
|
|||||||
schedule:
|
schedule:
|
||||||
- cron: '0 2 * * *' # run at 2 AM UTC
|
- cron: '0 2 * * *' # run at 2 AM UTC
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
security-audit:
|
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
|
runs-on: ubuntu-latest
|
||||||
if: "!contains(github.event.head_commit.message, 'ci skip')"
|
if: "!contains(github.event.head_commit.message, 'ci skip')"
|
||||||
steps:
|
steps:
|
||||||
|
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
@ -27,6 +27,9 @@ defaults:
|
|||||||
run:
|
run:
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# Depends on all action sthat are required for a "successful" CI run.
|
# Depends on all action sthat are required for a "successful" CI run.
|
||||||
tests-pass:
|
tests-pass:
|
||||||
|
6
.github/workflows/labeler.yml
vendored
6
.github/workflows/labeler.yml
vendored
@ -4,8 +4,14 @@ on:
|
|||||||
|
|
||||||
# See .github/labeler.yml file
|
# See .github/labeler.yml file
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
triage:
|
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
|
runs-on: ubuntu-latest
|
||||||
if: github.repository_owner == 'tokio-rs'
|
if: github.repository_owner == 'tokio-rs'
|
||||||
steps:
|
steps:
|
||||||
|
3
.github/workflows/loom.yml
vendored
3
.github/workflows/loom.yml
vendored
@ -13,6 +13,9 @@ env:
|
|||||||
# Change to specific Rust release to pin
|
# Change to specific Rust release to pin
|
||||||
rust_stable: stable
|
rust_stable: stable
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
loom:
|
loom:
|
||||||
name: loom
|
name: loom
|
||||||
|
3
.github/workflows/pr-audit.yml
vendored
3
.github/workflows/pr-audit.yml
vendored
@ -8,6 +8,9 @@ on:
|
|||||||
paths:
|
paths:
|
||||||
- '**/Cargo.toml'
|
- '**/Cargo.toml'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
security-audit:
|
security-audit:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
3
.github/workflows/stress-test.yml
vendored
3
.github/workflows/stress-test.yml
vendored
@ -11,6 +11,9 @@ env:
|
|||||||
# Change to specific Rust release to pin
|
# Change to specific Rust release to pin
|
||||||
rust_stable: stable
|
rust_stable: stable
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
stress-test:
|
stress-test:
|
||||||
name: Stress Test
|
name: Stress Test
|
||||||
|
Loading…
x
Reference in New Issue
Block a user