Skip to content

Commit

Permalink
Merge pull request #911 from Mossaka/issue910
Browse files Browse the repository at this point in the history
ci(all): add read-all permission to all workflows
  • Loading branch information
jprendes authored Mar 6, 2025
2 parents 92545de + 88373b0 commit 412c837
Show file tree
Hide file tree
Showing 13 changed files with 47 additions and 12 deletions.
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 @@ -13,16 +13,16 @@ on:
- 'NOTICE'
- 'art/**'

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 @@ -56,7 +56,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 @@ -93,7 +97,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 @@ -126,7 +134,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

0 comments on commit 412c837

Please sign in to comment.