Skip to content

Commit c28eb48

Browse files
authored
Merge pull request #376 from step-security-bot/chore/GHA-062334-stepsecurity-remediation
[StepSecurity] Apply security best practices
2 parents 45c87d0 + db26f67 commit c28eb48

File tree

8 files changed

+70
-0
lines changed

8 files changed

+70
-0
lines changed

.github/dependabot.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,8 @@ updates:
1313
npm-updates:
1414
patterns:
1515
- '*'
16+
17+
- package-ecosystem: github-actions
18+
directory: /
19+
schedule:
20+
interval: daily

.github/workflows/actions-dependencies.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
workflow_dispatch:
66
schedule:
77
- cron: '0 0 * * 1' # Weekly
8+
permissions:
9+
contents: read
10+
811
jobs:
912
submit-dependencies:
1013
uses: devops-actions/.github/.github/workflows/actions-dependencies.yml@main

.github/workflows/check-dist.yml

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

2626
steps:
27+
- name: Harden the runner (Audit all outbound calls)
28+
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
29+
with:
30+
egress-policy: audit
31+
2732
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
2833

2934
- name: Set Node.js 20.x

.github/workflows/codeql-analysis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ jobs:
4040
# Learn more about CodeQL language support at https://git.io/codeql-language-support
4141

4242
steps:
43+
- name: Harden the runner (Audit all outbound calls)
44+
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
45+
with:
46+
egress-policy: audit
47+
4348
- name: Checkout repository
4449
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
4550

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Dependency Review Action
2+
#
3+
# This Action will scan dependency manifest files that change as part of a Pull Request,
4+
# surfacing known-vulnerable versions of the packages declared or updated in the PR.
5+
# Once installed, if the workflow run is marked as required,
6+
# PRs introducing known-vulnerable packages will be blocked from merging.
7+
#
8+
# Source repository: https://github.com/actions/dependency-review-action
9+
name: 'Dependency Review'
10+
on: [pull_request]
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
dependency-review:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Harden the runner (Audit all outbound calls)
20+
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
21+
with:
22+
egress-policy: audit
23+
24+
- name: 'Checkout Repository'
25+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
26+
- name: 'Dependency Review'
27+
uses: actions/dependency-review-action@3c4e3dcb1aa7874d2c16be7d79418e9b7efd6261 # v4.8.2

.github/workflows/publishing.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ jobs:
1414
test-local-action:
1515
runs-on: ubuntu-latest
1616
steps:
17+
- name: Harden the runner (Audit all outbound calls)
18+
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
19+
with:
20+
egress-policy: audit
21+
1722
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
1823

1924
- uses: ./
@@ -48,6 +53,11 @@ jobs:
4853
contents: write
4954
steps:
5055

56+
- name: Harden the runner (Audit all outbound calls)
57+
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
58+
with:
59+
egress-policy: audit
60+
5161
- name: Get tag value
5262
id: tag
5363
uses: devops-actions/action-get-tag@19f393df16cb09284484fb49bf678004bf50896a # v1.0.1

.github/workflows/semver-check.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ jobs:
99
semver:
1010
runs-on: ubuntu-latest
1111
steps:
12+
- name: Harden the runner (Audit all outbound calls)
13+
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
14+
with:
15+
egress-policy: audit
16+
1217
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v4
1318
with:
1419
fetch-depth: 0 # needed to get all tags

.github/workflows/test.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ jobs:
1313
build: # make sure build/ci works properly
1414
runs-on: ubuntu-latest
1515
steps:
16+
- name: Harden the runner (Audit all outbound calls)
17+
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
18+
with:
19+
egress-policy: audit
20+
1621
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
1722

1823
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
@@ -28,6 +33,11 @@ jobs:
2833
test: # make sure the action works on a clean machine without building
2934
runs-on: ubuntu-latest
3035
steps:
36+
- name: Harden the runner (Audit all outbound calls)
37+
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
38+
with:
39+
egress-policy: audit
40+
3141
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
3242
- uses: ./
3343
id: store-json

0 commit comments

Comments
 (0)