Skip to content

Commit a8d686b

Browse files
committed
ci: harden Blacksmith workflow credentials
Address CodeRabbit feedback by avoiding persisted checkout credentials in release/cache maintenance jobs, disabling setup-node package-manager caching in the OIDC publish job, and tightening the temporary /nix mount point permission before stickydisk mounts.
1 parent 863e885 commit a8d686b

3 files changed

Lines changed: 6 additions & 1 deletion

File tree

‎.github/actions/setup-nix/action.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ runs:
1515
shell: bash
1616
run: |
1717
sudo mkdir -p /nix/store
18-
sudo chmod -R 777 /nix
18+
sudo chmod 755 /nix
1919
2020
- name: Mount Nix store sticky disk
2121
if: runner.os == 'Linux'

‎.github/workflows/cache-gc.yaml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ jobs:
3131

3232
steps:
3333
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
34+
with:
35+
persist-credentials: false
3436
- uses: ./.github/actions/setup-nix
3537
with:
3638
cache-profile: ${{ matrix.profile }}

‎.github/workflows/release.yaml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ jobs:
4242
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
4343
with:
4444
fetch-depth: 0
45+
persist-credentials: false
4546
- uses: ./.github/actions/setup-nix
4647
if: matrix.platform != 'win32'
4748
- name: Cache Cargo build
@@ -133,10 +134,12 @@ jobs:
133134
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
134135
with:
135136
fetch-depth: 0
137+
persist-credentials: false
136138
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
137139
with:
138140
registry-url: 'https://registry.npmjs.org'
139141
node-version: lts/*
142+
package-manager-cache: false
140143
- run: corepack enable pnpm
141144
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
142145
with:

0 commit comments

Comments
 (0)