Skip to content

Commit c66848d

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 c66848d

2 files changed

Lines changed: 25 additions & 1 deletion

File tree

.github/workflows/pr-build.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@ 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+
1626
- name: Checkout
1727
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
1828
with:

.github/workflows/site-build.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,17 @@ 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+
2839
- name: Checkout
2940
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
3041

@@ -82,9 +93,12 @@ jobs:
8293
needs: [build]
8394

8495
steps:
85-
- uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 #
96+
- uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0
8697
with:
8798
egress-policy: audit
99+
allowed-endpoints: >
100+
api.github.com:443
101+
github.com:443
88102
89103
# Convenience wrapper around `actions/download-artifact` and
90104
# `actions/upload-pages-artifact`.

0 commit comments

Comments
 (0)