Skip to content

Commit 5d5f7a3

Browse files
authored
actions: harden ci (#342)
Signed-off-by: flakey5 <[email protected]>
1 parent 7060343 commit 5d5f7a3

File tree

7 files changed

+58
-13
lines changed

7 files changed

+58
-13
lines changed

.github/workflows/codeql.yml

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,20 @@ jobs:
3939
fail-fast: false
4040

4141
steps:
42-
- name: Checkout repository
43-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
44-
45-
- name: Initialize CodeQL
46-
uses: github/codeql-action/init@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3.28.11
47-
with:
48-
languages: javascript-typescript
49-
build-mode: none
50-
51-
- name: Perform CodeQL Analysis
52-
uses: github/codeql-action/analyze@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3.28.11
53-
with:
54-
category: "/language:javascript-typescript"
42+
- uses: step-security/harden-runner@446798f8213ac2e75931c1b0769676d927801858 # v2.10.3
43+
with:
44+
egress-policy: audit
45+
46+
- name: Checkout repository
47+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
48+
49+
- name: Initialize CodeQL
50+
uses: github/codeql-action/init@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3.28.11
51+
with:
52+
languages: javascript-typescript
53+
build-mode: none
54+
55+
- name: Perform CodeQL Analysis
56+
uses: github/codeql-action/analyze@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3.28.11
57+
with:
58+
category: "/language:javascript-typescript"
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: 'Dependency Review'
2+
3+
on:
4+
pull_request:
5+
6+
permissions:
7+
contents: read
8+
9+
jobs:
10+
dependency-review:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: 'Checkout Repository'
14+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
15+
16+
- name: 'Dependency Review'
17+
uses: actions/dependency-review-action@3b139cfc5fae8b618d3eae3675e383bb1769c019 # v4.5.0

.github/workflows/deploy.yml

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

1515
steps:
16+
- uses: step-security/harden-runner@446798f8213ac2e75931c1b0769676d927801858
17+
with:
18+
egress-policy: audit
19+
1620
- name: Git Checkout
1721
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
1822

.github/workflows/format.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ jobs:
1818
if: ${{ github.event.action == 'opened' || github.event.action == 'ready_for_review' || github.event.action == 'synchronize' || (github.event.action == 'labeled' && github.event.label.name == 'force ci') }}
1919

2020
steps:
21+
- uses: step-security/harden-runner@446798f8213ac2e75931c1b0769676d927801858 # v2.10.3
22+
with:
23+
egress-policy: audit
24+
2125
- name: Git Checkout
2226
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
2327

.github/workflows/notify-on-force-push.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ jobs:
1515
github.event.forced
1616
runs-on: ubuntu-latest
1717
steps:
18+
- uses: step-security/harden-runner@446798f8213ac2e75931c1b0769676d927801858 # v2.10.3
19+
with:
20+
egress-policy: audit
21+
1822
- name: Slack Notification
1923
uses: rtCamp/action-slack-notify@c33737706dea87cd7784c687dadc9adf1be59990 # 2.3.2
2024
env:

.github/workflows/test.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ jobs:
1818
if: ${{ github.event.action == 'opened' || github.event.action == 'ready_for_review' || github.event.action == 'synchronize' || (github.event.action == 'labeled' && github.event.label.name == 'force ci') }}
1919

2020
steps:
21+
- uses: step-security/harden-runner@446798f8213ac2e75931c1b0769676d927801858 # v2.10.3
22+
with:
23+
egress-policy: audit
24+
2125
- name: Git Checkout
2226
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
2327

@@ -39,6 +43,10 @@ jobs:
3943
if: ${{ github.event.action == 'opened' || github.event.action == 'ready_for_review' || github.event.action == 'synchronize' || (github.event.action == 'labeled' && github.event.label.name == 'force ci') }}
4044

4145
steps:
46+
- uses: step-security/harden-runner@446798f8213ac2e75931c1b0769676d927801858 # v2.10.3
47+
with:
48+
egress-policy: audit
49+
4250
- name: Git Checkout
4351
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
4452

.github/workflows/update-links.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ jobs:
1515
runs-on: ubuntu-latest
1616

1717
steps:
18+
- uses: step-security/harden-runner@446798f8213ac2e75931c1b0769676d927801858 # v2.10.3
19+
with:
20+
egress-policy: audit
21+
1822
- name: Git Checkout
1923
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
2024

0 commit comments

Comments
 (0)