Skip to content

Commit c2577fb

Browse files
chore(stepsecurity): update workflows to use custom hosted runners with built-in StepSecurity (#48)
## 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 Co-authored-by: Sean Liao <sean.liao@circle.com>
1 parent 9dd6b82 commit c2577fb

3 files changed

Lines changed: 8 additions & 9 deletions

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
if: needs.conventional-commit-release.outputs.release_created == 'true'
2828
permissions:
2929
contents: write
30-
runs-on: ubuntu-latest
30+
runs-on: github-hosted-small
3131
env:
3232
GORELEASER_CURRENT_TAG: ${{ needs.conventional-commit-release.outputs.release_tag }}
3333
steps:

.github/workflows/scorecard.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@ permissions: {}
1313
jobs:
1414
analysis:
1515
name: Scorecard analysis
16-
runs-on: ubuntu-latest
16+
runs-on: github-hosted-small
1717
permissions:
1818
security-events: write
19-
id-token: write
2019
contents: read
2120
actions: read
2221
checks: read

.github/workflows/test.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414
jobs:
1515
build:
1616
name: Build
17-
runs-on: ubuntu-latest
17+
runs-on: github-hosted-small
1818
permissions:
1919
contents: read
2020
actions: read
@@ -55,7 +55,7 @@ jobs:
5555

5656
trivy-scan:
5757
name: Trivy Scan
58-
runs-on: ubuntu-latest
58+
runs-on: github-hosted-small
5959
permissions:
6060
security-events: write
6161
actions: read
@@ -78,7 +78,7 @@ jobs:
7878
sarif_file: 'trivy-results.sarif'
7979

8080
generate:
81-
runs-on: ubuntu-latest
81+
runs-on: github-hosted-small
8282
permissions:
8383
contents: read
8484
steps:
@@ -105,7 +105,7 @@ jobs:
105105
test:
106106
name: Terraform Provider Unit Tests
107107
needs: build
108-
runs-on: ubuntu-latest
108+
runs-on: github-hosted-small
109109
timeout-minutes: 5
110110
permissions:
111111
contents: read
@@ -125,7 +125,7 @@ jobs:
125125
if: ${{ github.actor != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == github.repository }}
126126
name: Terraform Provider Acceptance Tests
127127
needs: build
128-
runs-on: ubuntu-latest
128+
runs-on: github-hosted-small
129129
timeout-minutes: 15
130130
strategy:
131131
fail-fast: false
@@ -165,7 +165,7 @@ jobs:
165165
- generate
166166
- test
167167
- acctest
168-
runs-on: ubuntu-latest
168+
runs-on: github-hosted-small
169169
permissions: {}
170170
steps:
171171
- run: exit 1

0 commit comments

Comments
 (0)