Skip to content

Commit 6cc90a4

Browse files
varunsh-coderljharb
authored andcommitted
[actions] add step security runner
1 parent 81fc056 commit 6cc90a4

File tree

7 files changed

+78
-0
lines changed

7 files changed

+78
-0
lines changed

.github/workflows/latest-npm.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ jobs:
88
outputs:
99
latest: ${{ steps.set-matrix.outputs.requireds }}
1010
steps:
11+
- name: Harden Runner
12+
uses: step-security/harden-runner@v1
13+
with:
14+
allowed-endpoints:
15+
iojs.org:443
16+
nodejs.org:443
1117
- uses: ljharb/actions/node/matrix@main
1218
id: set-matrix
1319
with:
@@ -39,6 +45,14 @@ jobs:
3945
- node-version: "0.10"
4046

4147
steps:
48+
- name: Harden Runner
49+
uses: step-security/harden-runner@v1
50+
with:
51+
allowed-endpoints:
52+
github.com:443
53+
iojs.org:443
54+
nodejs.org:443
55+
registry.npmjs.org:443
4256
- uses: actions/checkout@v2
4357
- uses: ljharb/actions/node/install@main
4458
name: 'nvm install-latest-npm'
@@ -55,4 +69,8 @@ jobs:
5569
needs: [nodes]
5670
runs-on: ubuntu-latest
5771
steps:
72+
- name: Harden Runner
73+
uses: step-security/harden-runner@v1
74+
with:
75+
egress-policy: block
5876
- run: 'echo tests completed'

.github/workflows/lint.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ jobs:
88
contents: read
99
runs-on: ubuntu-latest
1010
steps:
11+
- uses: step-security/harden-runner@v1
12+
with:
13+
allowed-endpoints:
14+
github.com:443
15+
nodejs.org:443
16+
registry.npmjs.org:443
1117
- uses: actions/checkout@v2
1218
- uses: ljharb/actions/node/install@main
1319
name: 'nvm install ${{ matrix.node-version }} && npm install'
@@ -20,6 +26,14 @@ jobs:
2026
contents: read
2127
runs-on: ubuntu-latest
2228
steps:
29+
- uses: step-security/harden-runner@v1
30+
with:
31+
allowed-endpoints:
32+
ghcr.io:443
33+
github.com:443
34+
pkg-containers.githubusercontent.com:443
35+
nodejs.org:443
36+
registry.npmjs.org:443
2337
- uses: actions/checkout@v2
2438
- uses: ljharb/actions/node/install@main
2539
name: 'nvm install ${{ matrix.node-version }} && npm install'
@@ -32,6 +46,12 @@ jobs:
3246
contents: read
3347
runs-on: ubuntu-latest
3448
steps:
49+
- uses: step-security/harden-runner@v1
50+
with:
51+
allowed-endpoints:
52+
github.com:443
53+
nodejs.org:443
54+
registry.npmjs.org:443
3555
- uses: actions/checkout@v2
3656
- uses: ljharb/actions/node/install@main
3757
name: 'nvm install ${{ matrix.node-version }} && npm install'
@@ -44,6 +64,10 @@ jobs:
4464
contents: read
4565
runs-on: ubuntu-latest
4666
steps:
67+
- uses: step-security/harden-runner@v1
68+
with:
69+
allowed-endpoints:
70+
github.com:443
4771
- uses: actions/checkout@v2
4872
- name: check tests filenames
4973
run: ./rename_test.sh --check

.github/workflows/rebase.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14+
- name: Harden Runner
15+
uses: step-security/harden-runner@v1
16+
with:
17+
allowed-endpoints:
18+
api.github.com:443
19+
github.com:443
1420
- uses: actions/checkout@v2
1521
- uses: ljharb/rebase@master
1622
env:

.github/workflows/release.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ jobs:
88
contents: read
99
runs-on: ubuntu-latest
1010
steps:
11+
- name: Harden Runner
12+
uses: step-security/harden-runner@v1
13+
with:
14+
allowed-endpoints:
15+
github.com:443
16+
registry.npmjs.org:443
1117
- uses: actions/checkout@v2
1218
- uses: actions/setup-node@v2
1319
with:

.github/workflows/require-allow-edits.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14+
- name: Harden Runner
15+
uses: step-security/harden-runner@v1
16+
with:
17+
allowed-endpoints:
18+
api.github.com:443
1419
- uses: ljharb/require-allow-edits@main
1520
env:
1621
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/shellcheck.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,18 @@ jobs:
2626
file: nvm-exec # only runs in bash
2727

2828
steps:
29+
- name: Harden Runner
30+
uses: step-security/harden-runner@v1
31+
with:
32+
allowed-endpoints:
33+
ghcr.io:443
34+
github.com:443
35+
pkg-containers.githubusercontent.com:443
2936
- uses: actions/checkout@v2
3037
- name: Install shellcheck
3138
run: brew install shellcheck
39+
env:
40+
HOMEBREW_NO_ANALYTICS: 1
3241
- run: "shellcheck --version"
3342
- name: Run shellcheck on ${{ matrix.file }}
3443
run: shellcheck -s ${{ matrix.shell }} ${{ matrix.file }}
@@ -39,4 +48,8 @@ jobs:
3948
needs: [shellcheck_matrix]
4049
runs-on: ubuntu-latest
4150
steps:
51+
- name: Harden Runner
52+
uses: step-security/harden-runner@v1
53+
with:
54+
egress-policy: block
4255
- run: 'echo tests completed'

.github/workflows/toc.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14+
- name: Harden Runner
15+
uses: step-security/harden-runner@v1
16+
with:
17+
allowed-endpoints:
18+
github.com:443
19+
registry.npmjs.org:443
1420
- uses: actions/checkout@v2
1521
with:
1622
# https://github.com/actions/checkout/issues/217#issue-599945005

0 commit comments

Comments
 (0)