Skip to content

Commit 7abf270

Browse files
[StepSecurity] ci: Harden GitHub Actions (#36)
Signed-off-by: StepSecurity Bot <[email protected]>
1 parent 45b5015 commit 7abf270

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

.github/workflows/deploy.yml

+17-7
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,18 @@ jobs:
2121
runs-on: ubuntu-latest
2222

2323
steps:
24+
- name: Harden the runner (Audit all outbound calls)
25+
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
26+
with:
27+
egress-policy: audit
28+
2429
- name: Git Checkout
25-
uses: actions/checkout@v4
30+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2631
with:
2732
fetch-depth: 2
2833

2934
- name: Set up Node.js
30-
uses: actions/setup-node@v4
35+
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
3136
with:
3237
node-version-file: '.nvmrc'
3338
cache: npm
@@ -36,10 +41,10 @@ jobs:
3641
run: npm ci
3742

3843
- name: Setup GitHub Pages
39-
uses: actions/configure-pages@v5
44+
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0
4045

4146
- name: Restore Cache
42-
uses: actions/cache/restore@v4
47+
uses: actions/cache/restore@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4.2.1
4348
with:
4449
path: .next/cache
4550
key: build-${{ hashFiles('**/package-lock.json') }}
@@ -50,14 +55,14 @@ jobs:
5055
- name: Build Next.js
5156
run: node --run build
5257
- name: Save Cache
53-
uses: actions/cache/save@v4
58+
uses: actions/cache/save@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4.2.1
5459
with:
5560
path: .next/cache
5661
key: build-${{ hashFiles('**/package-lock.json') }}
5762
enableCrossOsArchive: true
5863

5964
- name: Upload Artifact
60-
uses: actions/upload-pages-artifact@v3
65+
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
6166
with:
6267
path: ./out # next.js build output
6368

@@ -71,6 +76,11 @@ jobs:
7176
url: ${{ steps.deployment.outputs.page_url }}
7277

7378
steps:
79+
- name: Harden the runner (Audit all outbound calls)
80+
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
81+
with:
82+
egress-policy: audit
83+
7484
- name: Deploy to GitHub Pages
7585
id: deployment
76-
uses: actions/deploy-pages@v4
86+
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5

0 commit comments

Comments
 (0)