Skip to content

Commit 8ed6023

Browse files
sec(ci): improve CI security posture
1 parent a5ff43c commit 8ed6023

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

‎.github/actions/mdbook/action.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ runs:
4343
using: composite
4444
steps:
4545
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
46+
with:
47+
persist-credentials: false
4648

4749
- uses: extractions/setup-just@v2
4850

‎.github/workflows/deploy.yml‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@ on:
2121
description: |
2222
The domain to which to publish (ex. 'component-model.bytecodealliance.org')
2323
24-
permissions:
25-
contents: read
26-
pages: write
27-
id-token: write
24+
permissions: {}
2825

2926
concurrency:
3027
group: "pages"
@@ -33,6 +30,9 @@ concurrency:
3330
jobs:
3431
build:
3532
runs-on: ubuntu-latest
33+
permissions:
34+
contents: read
35+
pages: write
3636
steps:
3737
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3838
with:
@@ -47,6 +47,9 @@ jobs:
4747
deploy:
4848
if: ${{ github.repository_owner == 'bytecodealliance' }}
4949
runs-on: ubuntu-latest
50+
permissions:
51+
pages: write
52+
id-token: write
5053
needs:
5154
- build
5255
environment:

0 commit comments

Comments
 (0)