Skip to content

Commit b3d0afa

Browse files
committed
ci: harden runner
see: loopbackio/security#26 Signed-off-by: Rifa Achrinza <25147899+achrinza@users.noreply.github.com>
1 parent 6607ac9 commit b3d0afa

2 files changed

Lines changed: 27 additions & 1 deletion

File tree

.github/workflows/pr-build.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,17 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16+
- uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0
17+
with:
18+
disable-sudo-and-containers: true
19+
egress-policy: block
20+
allowed-endpoints: >
21+
github.com:443
22+
index.rubygems.org:443
23+
raw.githubusercontent.com:443
24+
registry.npmjs.org:443
25+
rubygems.org:443
26+
1627
- name: Checkout
1728
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
1829
with:

.github/workflows/site-build.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,18 @@ jobs:
2525
contents: write
2626

2727
steps:
28+
- uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0
29+
with:
30+
disable-sudo-and-containers: true
31+
egress-policy: block
32+
allowed-endpoints: >
33+
api.github.com:443
34+
github.com:443
35+
index.rubygems.org:443
36+
raw.githubusercontent.com:443
37+
registry.npmjs.org:443
38+
rubygems.org:443
39+
2840
- name: Checkout
2941
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
3042

@@ -82,9 +94,12 @@ jobs:
8294
needs: [build]
8395

8496
steps:
85-
- uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 #
97+
- uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0
8698
with:
8799
egress-policy: audit
100+
allowed-endpoints: >
101+
api.github.com:443
102+
github.com:443
88103
89104
# Convenience wrapper around `actions/download-artifact` and
90105
# `actions/upload-pages-artifact`.

0 commit comments

Comments
 (0)