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(all): add read-all permission to all workflows #911

Merged
merged 1 commit into from
Mar 6, 2025
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/action-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ on:
type: string
required: false

permissions: read-all

jobs:
build-sign-upload:
permissions:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/action-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ on:
required: true
type: string

permissions: read-all

jobs:
check:
name: lint on ${{ inputs.os }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/action-test-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ on:
type: string
default: img

permissions: read-all

jobs:
test-image:
name: build test ${{ inputs.image }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/action-test-k3s.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ on:
required: true
type: string

permissions: read-all

jobs:
e2e-k3s:
name: e2e k3s test on ${{ inputs.os }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/action-test-kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ on:
type: string
required: true

permissions: read-all

jobs:
e2e-kind:
name: e2e kind test on ${{ inputs.os }} with ${{ inputs.image }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/action-test-smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ on:
required: true
type: string

permissions: read-all

jobs:
smoke-test:
name: smoke test on ${{ inputs.os }}
Expand Down
30 changes: 21 additions & 9 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ on:
- cron: '0 0 * * *' # Runs daily at midnight
pull_request:

permissions:
# deployments permission to deploy GitHub pages website
deployments: write
# contents permission to update benchmark contents in gh-pages branch
contents: write
permissions: read-all

jobs:
benchmark:
runs-on: ubuntu-latest

permissions:
# deployments permission to deploy GitHub pages website
deployments: write
# contents permission to update benchmark contents in gh-pages branch
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
Expand Down Expand Up @@ -48,7 +48,11 @@ jobs:

benchmark-mem:
runs-on: ubuntu-latest

permissions:
# deployments permission to deploy GitHub pages website
deployments: write
# contents permission to update benchmark contents in gh-pages branch
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
Expand Down Expand Up @@ -85,7 +89,11 @@ jobs:

benchmark-http:
runs-on: ubuntu-latest

permissions:
# deployments permission to deploy GitHub pages website
deployments: write
# contents permission to update benchmark contents in gh-pages branch
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
Expand Down Expand Up @@ -118,7 +126,11 @@ jobs:

benchmark-stress:
runs-on: ubuntu-latest

permissions:
# deployments permission to deploy GitHub pages website
deployments: write
# contents permission to update benchmark contents in gh-pages branch
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ on:
env:
CARGO_TERM_COLOR: always

permissions: read-all

jobs:
dependency-review:
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:
branches: [main]
workflow_dispatch:

permissions: read-all

jobs:
changes:
runs-on: ubuntu-22.04
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release-wasi-demo-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ env:
CARGO_TERM_COLOR: always
IMAGES: "wasi-demo-app wasi-demo-oci wasi-demo-oci-artifact wasi-demo-http"

permissions: read-all

jobs:
release-wasi-demo:
permissions:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ concurrency:
env:
CARGO_TERM_COLOR: always

permissions: read-all

jobs:
pre-release:
name: pre-release checks
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/sbom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ on:
type: string
required: true

permissions: read-all

jobs:
sbom:
name: Generate SBOM, sign and attach them to OCI image
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/sign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ on:
type: string
required: true

permissions: read-all

jobs:
sign:
name: Sign image
permissions:
packages: write
id-token: write

packages: write # needed to authenticate and interact with the GitHub Container Registry
id-token: write # needed for the cosign signing process
runs-on: ubuntu-latest
steps:
- name: Sanitize image name
Expand Down
Loading