Skip to content

Commit cc5afdc

Browse files
Merge pull request #1379 from step-security/update-harden-harden-int
Update harden runner version
2 parents 3da1738 + 7bcb807 commit cc5afdc

File tree

12 files changed

+17
-17
lines changed

12 files changed

+17
-17
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ jobs:
190190
191191
steps:
192192
- name: Harden Runner
193-
uses: step-security/harden-runner@v1
193+
uses: step-security/harden-runner@v2
194194
with:
195195
egress-policy: audit
196196

remediation/workflow/hardenrunner/addaction_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ func TestAddAction(t *testing.T) {
2020
wantErr bool
2121
wantUpdated bool
2222
}{
23-
{name: "one job", args: args{inputYaml: "action-issues.yml", action: "step-security/harden-runner@v1"}, want: "action-issues.yml", wantErr: false, wantUpdated: true},
24-
{name: "two jobs", args: args{inputYaml: "2jobs.yml", action: "step-security/harden-runner@v1"}, want: "2jobs.yml", wantErr: false, wantUpdated: true},
25-
{name: "already present", args: args{inputYaml: "alreadypresent.yml", action: "step-security/harden-runner@v1"}, want: "alreadypresent.yml", wantErr: false, wantUpdated: true},
26-
{name: "already present 2", args: args{inputYaml: "alreadypresent_2.yml", action: "step-security/harden-runner@v1"}, want: "alreadypresent_2.yml", wantErr: false, wantUpdated: false},
27-
{name: "reusable job", args: args{inputYaml: "reusablejob.yml", action: "step-security/harden-runner@v1"}, want: "reusablejob.yml", wantErr: false, wantUpdated: false},
23+
{name: "one job", args: args{inputYaml: "action-issues.yml", action: "step-security/harden-runner@v2"}, want: "action-issues.yml", wantErr: false, wantUpdated: true},
24+
{name: "two jobs", args: args{inputYaml: "2jobs.yml", action: "step-security/harden-runner@v2"}, want: "2jobs.yml", wantErr: false, wantUpdated: true},
25+
{name: "already present", args: args{inputYaml: "alreadypresent.yml", action: "step-security/harden-runner@v2"}, want: "alreadypresent.yml", wantErr: false, wantUpdated: true},
26+
{name: "already present 2", args: args{inputYaml: "alreadypresent_2.yml", action: "step-security/harden-runner@v2"}, want: "alreadypresent_2.yml", wantErr: false, wantUpdated: false},
27+
{name: "reusable job", args: args{inputYaml: "reusablejob.yml", action: "step-security/harden-runner@v2"}, want: "reusablejob.yml", wantErr: false, wantUpdated: false},
2828
}
2929
for _, tt := range tests {
3030
t.Run(tt.name, func(t *testing.T) {

remediation/workflow/secureworkflow.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"github.com/step-security/secure-workflows/remediation/workflow/pin"
88
)
99

10-
const HardenRunnerActionPathWithTag = "step-security/harden-runner@v1"
10+
const HardenRunnerActionPathWithTag = "step-security/harden-runner@v2"
1111

1212
func SecureWorkflow(queryStringParams map[string]string, inputYaml string, svc dynamodbiface.DynamoDBAPI) (*permissions.SecureWorkflowReponse, error) {
1313
pinActions, addHardenRunner, addPermissions, addProjectComment := true, true, true, true

remediation/workflow/secureworkflow_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ func TestSecureWorkflow(t *testing.T) {
2020
httpmock.RegisterResponder("GET", "https://api.github.com/repos/actions/checkout/commits/v1",
2121
httpmock.NewStringResponder(200, `544eadc6bf3d226fd7a7a9f0dc5b5bf7ca0675b9`))
2222

23-
httpmock.RegisterResponder("GET", "https://api.github.com/repos/step-security/harden-runner/commits/v1",
23+
httpmock.RegisterResponder("GET", "https://api.github.com/repos/step-security/harden-runner/commits/v2",
2424
httpmock.NewStringResponder(200, `7206db2ec98c5538323a6d70e51f965d55c11c87`))
2525

2626
httpmock.RegisterResponder("GET", "https://api.github.com/repos/github/super-linter/commits/v3",

testfiles/addaction/input/alreadypresent_2.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Harden Runner
14-
uses: step-security/harden-runner@v1
14+
uses: step-security/harden-runner@v2
1515
with:
1616
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
1717

testfiles/addaction/output/2jobs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
runs-on: ubuntu-latest
77
steps:
88
- name: Harden Runner
9-
uses: step-security/harden-runner@v1
9+
uses: step-security/harden-runner@v2
1010
with:
1111
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
1212

@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: Harden Runner
18-
uses: step-security/harden-runner@v1
18+
uses: step-security/harden-runner@v2
1919
with:
2020
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
2121

testfiles/addaction/output/action-issues.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010

1111
steps:
1212
- name: Harden Runner
13-
uses: step-security/harden-runner@v1
13+
uses: step-security/harden-runner@v2
1414
with:
1515
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
1616

testfiles/addaction/output/alreadypresent.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Harden Runner
14-
uses: step-security/harden-runner@v1
14+
uses: step-security/harden-runner@v2
1515
with:
1616
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
1717

testfiles/addaction/output/alreadypresent_2.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Harden Runner
14-
uses: step-security/harden-runner@v1
14+
uses: step-security/harden-runner@v2
1515
with:
1616
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
1717

testfiles/joblevelpermskb/input/duplicate-perms.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
create-pr:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: step-security/harden-runner@v1
10+
- uses: step-security/harden-runner@v2
1111
- uses: actions/checkout@v2
1212
- name: Create commits
1313
run: |

0 commit comments

Comments
 (0)