ci: add minimum GitHub token permissions for workflows (#5072)

Signed-off-by: Ashish Kurmi <akurmi@stepsecurity.io>
This commit is contained in:
Ashish Kurmi 2022-10-03 02:15:23 -07:00 committed by GitHub
parent f4e08aec66
commit b821e436c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 25 additions and 0 deletions

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -13,6 +13,9 @@ env:
# Change to specific Rust release to pin
rust_stable: stable
permissions:
contents: read
jobs:
loom:
name: loom

View File

@ -8,6 +8,9 @@ on:
paths:
- '**/Cargo.toml'
permissions:
contents: read
jobs:
security-audit:
runs-on: ubuntu-latest

View File

@ -11,6 +11,9 @@ env:
# Change to specific Rust release to pin
rust_stable: stable
permissions:
contents: read
jobs:
stress-test:
name: Stress Test