Skip to content

Commit 7de39fe

Browse files
committed
ci: update egress policies, apply zizmor recommendations
Signed-off-by: flakey5 <73616808+flakey5@users.noreply.github.com>
1 parent 6bc834d commit 7de39fe

11 files changed

Lines changed: 112 additions & 16 deletions

.github/dependabot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ updates:
1515
commit-message:
1616
prefix: meta
1717
cooldown:
18-
default-days: 3
18+
default-days: 7
1919
open-pull-requests-limit: 10
2020

2121
- package-ecosystem: npm
@@ -30,7 +30,7 @@ updates:
3030
commit-message:
3131
prefix: meta
3232
cooldown:
33-
default-days: 3
33+
default-days: 7
3434
groups:
3535
orama:
3636
patterns:

.github/workflows/auto-merge.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ jobs:
1818
- name: Harden Runner
1919
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
2020
with:
21-
egress-policy: audit
21+
egress-policy: block
22+
allowed-endpoints: >
23+
api.github.com:443
2224
2325
- uses: nodejs/web-team/actions/auto-merge-prs@b087df186d25f8792fb85cc7794f68718726b8ee
2426
with:

.github/workflows/ci.yml

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,15 @@ jobs:
2121
- name: Harden Runner
2222
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
2323
with:
24-
egress-policy: audit
24+
egress-policy: block
25+
allowed-endpoints: >
26+
github.com:443
27+
registry.npmjs.org:443
2528
2629
- name: Checkout code
2730
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
31+
with:
32+
persist-credentials: false
2833

2934
- name: Setup Node.js
3035
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
@@ -49,10 +54,21 @@ jobs:
4954
- name: Harden Runner
5055
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
5156
with:
52-
egress-policy: audit
57+
egress-policy: block
58+
allowed-endpoints: >
59+
cli.codecov.io:443
60+
github.com:443
61+
ingest.codecov.io:443
62+
keybase.io:443
63+
o26192.ingest.us.sentry.io:443
64+
raw.githubusercontent.com:443
65+
registry.npmjs.org:443
66+
storage.googleapis.com:443
5367
5468
- name: Checkout code
5569
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
70+
with:
71+
persist-credentials: false
5672

5773
- name: Setup Node.js
5874
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
@@ -87,10 +103,25 @@ jobs:
87103
- name: Harden Runner
88104
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
89105
with:
90-
egress-policy: audit
106+
egress-policy: block
107+
allowed-endpoints: >
108+
*.archive.ubuntu.com:80
109+
*.microsoft.com:443
110+
api.github.com:443
111+
cdn.playwright.dev:443
112+
dl.google.com:443
113+
esm.ubuntu.com:443
114+
fonts.googleapis.com:443
115+
fonts.gstatic.com:443
116+
github.com:443
117+
raw.githubusercontent.com:443
118+
registry.npmjs.org:443
119+
storage.googleapis.com:443
91120
92121
- name: Checkout code
93122
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
123+
with:
124+
persist-credentials: false
94125

95126
- name: Setup Node.js
96127
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
@@ -104,6 +135,7 @@ jobs:
104135
- name: Checkout Node.js source
105136
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
106137
with:
138+
persist-credentials: false
107139
repository: nodejs/node
108140
sparse-checkout: doc/api/assert.md
109141
path: node

.github/workflows/codeql.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,17 @@ jobs:
4242
- name: Harden Runner
4343
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
4444
with:
45-
egress-policy: audit
45+
egress-policy: block
46+
allowed-endpoints: >
47+
github.com:443
48+
*.github.com:443
49+
objects.githubusercontent.com:443
50+
release-assets.githubusercontent.com:443
4651
4752
- name: Checkout repository
4853
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
54+
with:
55+
persist-credentials: false
4956

5057
# Initializes the CodeQL tools for scanning.
5158
- name: Initialize CodeQL

.github/workflows/codespell.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,14 @@ jobs:
1111
- name: Harden Runner
1212
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
1313
with:
14-
egress-policy: audit
14+
egress-policy: block
15+
allowed-endpoints: >
16+
github.com:443
1517
1618
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
19+
with:
20+
persist-credentials: false
21+
1722
- uses: codespell-project/actions-codespell@8f01853be192eb0f849a5c7d721450e7a467c579 # v2.2
1823
with:
1924
ignore_words_list: crate,raison

.github/workflows/dependency-review.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
name: Review Dependencies
1010

1111
on:
12-
pull_request_target:
12+
pull_request:
1313
branches:
1414
- main
1515

@@ -23,10 +23,15 @@ jobs:
2323
- name: Harden Runner
2424
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
2525
with:
26-
egress-policy: audit
26+
egress-policy: block
27+
allowed-endpoints: >
28+
github.com:443
29+
api.github.com:443
2730
2831
- name: Git Checkout
2932
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
33+
with:
34+
persist-credentials: false
3035

3136
- name: Review Dependencies
3237
uses: actions/dependency-review-action@2031cfc080254a8a887f58cffee85186f0e49e48 # v4.9.0

.github/workflows/leave-comment.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ jobs:
1818
- name: Harden Runner
1919
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
2020
with:
21-
egress-policy: audit
21+
egress-policy: block
22+
allowed-endpoints: >
23+
api.github.com:443
2224
2325
- name: Download all comparison artifacts
2426
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1

.github/workflows/publish.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ on:
1212

1313
permissions:
1414
contents: read
15-
# For npm OIDC (https://docs.npmjs.com/trusted-publishers)
16-
id-token: write
1715

1816
env:
1917
COMMIT_SHA: ${{ github.sha }}
@@ -28,7 +26,10 @@ jobs:
2826
- name: Harden Runner
2927
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
3028
with:
31-
egress-policy: audit
29+
egress-policy: block
30+
allowed-endpoints: >
31+
github.com:443
32+
api.github.com:443
3233
3334
- name: Verify commit authenticity
3435
env:
@@ -58,6 +59,7 @@ jobs:
5859
- name: Checkout repository
5960
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
6061
with:
62+
persist-credentials: false
6163
fetch-depth: 2 # Need at least 2 commits to detect changes between commits
6264

6365
- name: Check if we should publish
@@ -75,6 +77,9 @@ jobs:
7577
needs: prepare
7678
runs-on: ubuntu-latest
7779
if: needs.prepare.outputs.should_publish == 'true'
80+
permissions:
81+
# For npm OIDC (https://docs.npmjs.com/trusted-publishers)
82+
id-token: write
7883
steps:
7984
- uses: nodejs/web-team/actions/setup-environment@9f3c83af227d721768d9dbb63009a47ed4f4282f
8085
with:

.github/workflows/scorecard.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,14 @@ jobs:
3434
- name: Harden Runner
3535
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
3636
with:
37-
egress-policy: audit
37+
egress-policy: block
38+
allowed-endpoints: >
39+
github.com:443
40+
api.github.com:443
41+
api.scorecard.dev:443
42+
rekor.sigstore.dev:443
43+
tuf-repo-cdn.sigstore.dev:443
44+
fulcio.sigstore.dev:443
3845
3946
- name: Git Checkout
4047
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

.github/workflows/update-type-map.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,16 @@ jobs:
1717
- name: Harden Runner
1818
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
1919
with:
20-
egress-policy: audit
20+
egress-policy: block
21+
allowed-endpoints: >
22+
github.com:443
23+
api.github.com:443
24+
objects.githubusercontent.com:443
2125
2226
- name: Git Checkout
2327
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
28+
with:
29+
persist-credentials: false
2430

2531
- run: node scripts/update-type-map.mjs
2632

0 commit comments

Comments
 (0)