Skip to content

Commit 40ee83f

Browse files
chore(stepsecurity): update workflows to use custom hosted runners with built-in StepSecurity (#133)
## Summary This PR updates GitHub Actions workflows to use custom hosted runners that have StepSecurity built-in, removing the need for the explicit StepSecurity harden-runner action. ## What Changed - Removed step-security/harden-runner action steps (no longer needed as StepSecurity is built into custom runners) - Removed id-token: write permissions (no longer needed without the StepSecurity action) - Updated runs-on from ubuntu-latest to github-hosted-small (custom runners with built-in StepSecurity) - Converted non-circlefin action versions to commit SHAs with version comments for security pinning (e.g., actions/checkout@abc123 # v3.6.0) - circlefin GitHub actions remain unchanged ## Purpose Our custom hosted runners (github-hosted-small) now have StepSecurity built-in at the runner level, so we no longer need to add it as an explicit step in each workflow. This simplifies our workflows while maintaining the same security posture. ## Testing - All workflow syntax changes have been validated - No functional changes to workflow behavior - StepSecurity protection is maintained via the custom runners - Review the diff to ensure only intended changes occurred
1 parent 357d2fe commit 40ee83f

File tree

3 files changed

+4
-35
lines changed

3 files changed

+4
-35
lines changed

.github/workflows/commit-lint.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,8 @@ permissions:
1010
jobs:
1111
commit_lint:
1212
name: "Lint commit messages"
13-
runs-on: ubuntu-latest
14-
permissions:
15-
id-token: write
13+
runs-on: github-hosted-small
1614
steps:
17-
- name: Harden the runner
18-
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
19-
with:
20-
egress-policy: block
21-
policy: global-allowed-endpoints-policy
22-
2315
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
2416
with:
2517
fetch-depth: 0

.github/workflows/npm-publish.yml

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,12 @@ name: Publish to npm
66
on: [workflow_dispatch, workflow_call]
77

88
permissions:
9-
id-token: write
109
contents: read
1110

1211
jobs:
1312
build:
14-
runs-on: ubuntu-latest
13+
runs-on: github-hosted-small
1514
steps:
16-
- name: Harden the runner
17-
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
18-
with:
19-
egress-policy: block
20-
policy: global-allowed-endpoints-policy
21-
2215
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
2316
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
2417
with:
@@ -28,16 +21,8 @@ jobs:
2821

2922
publish-npm:
3023
needs: build
31-
runs-on: ubuntu-latest
32-
permissions:
33-
id-token: write
24+
runs-on: github-hosted-small
3425
steps:
35-
- name: Harden the runner
36-
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
37-
with:
38-
egress-policy: block
39-
policy: global-allowed-endpoints-policy
40-
4126
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
4227
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
4328
with:

.github/workflows/pull_request_checks.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,8 @@ on:
77
jobs:
88
lint:
99
name: "Lint, Build and Test"
10-
runs-on: ubuntu-latest
11-
permissions:
12-
id-token: write
10+
runs-on: github-hosted-small
1311
steps:
14-
- name: Harden the runner
15-
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
16-
with:
17-
egress-policy: block
18-
policy: global-allowed-endpoints-policy
19-
2012
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
2113
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
2214
- name: Installing dependencies

0 commit comments

Comments
 (0)