Skip to content

Commit dc2f156

Browse files
[StepSecurity] Apply security best practices
Signed-off-by: StepSecurity Bot <bot@stepsecurity.io>
1 parent 8780d3d commit dc2f156

File tree

6 files changed

+52
-7
lines changed

6 files changed

+52
-7
lines changed

.github/workflows/actionlint.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ jobs:
1818
contents: read
1919

2020
steps:
21+
- name: Harden the runner (Audit all outbound calls)
22+
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
23+
with:
24+
egress-policy: audit
25+
2126
- name: Check out code
2227
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2328

.github/workflows/boilerplate.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,15 @@ jobs:
3434
language: YAML
3535

3636
steps:
37+
- name: Harden the runner (Audit all outbound calls)
38+
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
39+
with:
40+
egress-policy: audit
41+
3742
- name: Check out code
3843
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3944

40-
- uses: chainguard-dev/actions/boilerplate@main
45+
- uses: chainguard-dev/actions/boilerplate@5363dd9eb48083bbf7674a4bbe62d71c3b230edd # main
4146
with:
4247
extension: ${{ matrix.extension }}
4348
language: ${{ matrix.language }}

.github/workflows/donotsubmit.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,13 @@ jobs:
1818
contents: read
1919

2020
steps:
21+
- name: Harden the runner (Audit all outbound calls)
22+
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
23+
with:
24+
egress-policy: audit
25+
2126
- name: Check out code
2227
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2328

2429
- name: Do Not Submit
25-
uses: chainguard-dev/actions/donotsubmit@main
30+
uses: chainguard-dev/actions/donotsubmit@5363dd9eb48083bbf7674a4bbe62d71c3b230edd # main

.github/workflows/go-test.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ jobs:
1818
permissions:
1919
contents: read
2020
steps:
21+
- name: Harden the runner (Audit all outbound calls)
22+
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
23+
with:
24+
egress-policy: audit
25+
2126
- name: Check out code onto GOPATH
2227
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2328

.github/workflows/style.yaml

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ jobs:
1919
permissions:
2020
contents: read
2121
steps:
22+
- name: Harden the runner (Audit all outbound calls)
23+
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
24+
with:
25+
egress-policy: audit
26+
2227
- name: Check out code
2328
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2429

@@ -28,7 +33,7 @@ jobs:
2833
go-version-file: './go.mod'
2934
check-latest: true
3035

31-
- uses: chainguard-dev/actions/gofmt@main
36+
- uses: chainguard-dev/actions/gofmt@5363dd9eb48083bbf7674a4bbe62d71c3b230edd # main
3237
with:
3338
args: -s
3439

@@ -38,6 +43,11 @@ jobs:
3843
permissions:
3944
contents: read
4045
steps:
46+
- name: Harden the runner (Audit all outbound calls)
47+
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
48+
with:
49+
egress-policy: audit
50+
4151
- name: Check out code
4252
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4353

@@ -47,7 +57,7 @@ jobs:
4757
go-version-file: './go.mod'
4858
check-latest: true
4959

50-
- uses: chainguard-dev/actions/goimports@main
60+
- uses: chainguard-dev/actions/goimports@5363dd9eb48083bbf7674a4bbe62d71c3b230edd # main
5161

5262
golangci-lint:
5363
name: golangci-lint
@@ -56,6 +66,11 @@ jobs:
5666
contents: read
5767

5868
steps:
69+
- name: Harden the runner (Audit all outbound calls)
70+
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
71+
with:
72+
egress-policy: audit
73+
5974
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
6075

6176
- name: Set up Go
@@ -79,6 +94,11 @@ jobs:
7994
contents: read
8095

8196
steps:
97+
- name: Harden the runner (Audit all outbound calls)
98+
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
99+
with:
100+
egress-policy: audit
101+
82102
- name: Check out code
83103
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
84104

@@ -88,10 +108,10 @@ jobs:
88108
go-version-file: './go.mod'
89109
check-latest: true
90110

91-
- uses: chainguard-dev/actions/trailing-space@main
111+
- uses: chainguard-dev/actions/trailing-space@5363dd9eb48083bbf7674a4bbe62d71c3b230edd # main
92112
if: ${{ always() }}
93113

94-
- uses: chainguard-dev/actions/eof-newline@main
114+
- uses: chainguard-dev/actions/eof-newline@5363dd9eb48083bbf7674a4bbe62d71c3b230edd # main
95115
if: ${{ always() }}
96116

97117
- uses: reviewdog/action-tflint@41b4770c9d9e50741c20e431986b33124a07ca52 # v1.24.2

.github/workflows/verify.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ jobs:
2323
GOPATH: ${{ github.workspace }}
2424

2525
steps:
26+
- name: Harden the runner (Audit all outbound calls)
27+
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
28+
with:
29+
egress-policy: audit
30+
2631
- name: Check out code
2732
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2833
with:
@@ -55,7 +60,7 @@ jobs:
5560
./hack/update-codegen.sh
5661
5762
- name: Verify
58-
uses: chainguard-dev/actions/nodiff@main
63+
uses: chainguard-dev/actions/nodiff@5363dd9eb48083bbf7674a4bbe62d71c3b230edd # main
5964
with:
6065
path: ./src/github.com/${{ github.repository }}
6166
fixup-command: "./hack/update-codegen.sh"

0 commit comments

Comments
 (0)