Skip to content

Commit

Permalink
Use step-security/harden-runner in github workflows (#486)
Browse files Browse the repository at this point in the history
Turning on harden-runner in "audit" mode is the first step in hardening github workflow jobs.
The second step will be to enable "block" mode, which can be seen as the results of the first run:
https://app.stepsecurity.io/github/orcasound/orcasite/actions/runs/9293630393?jobid=25577205636&tab=recommendations

For more details see https://github.com/step-security/harden-runner

Signed-off-by: Dave Thaler <dthaler1968@gmail.com>
  • Loading branch information
dthaler committed Jun 26, 2024
1 parent c8fe23b commit 5f09dd3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit

- name: Checkout code
uses: actions/checkout@v4

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/fast-forward.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ jobs:
issues: write

steps:
- uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit

- name: Fast forwarding
uses: sequoia-pgp/fast-forward@v1
with:
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/heroku.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ jobs:
|| (contains(github.event.comment.body, '/refresh-heroku-status') && github.event.issue.pull_request) }}

steps:
- uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit

# Forward deployment's status to the deployed commit.
- uses: octokit/request-action@v2.x
env:
Expand All @@ -41,6 +45,10 @@ jobs:

# Check that the deployed app returns successful HTTP response.
steps:
- uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit

- id: health_check
uses: jtalk/url-health-check-action@v4
with:
Expand Down

0 comments on commit 5f09dd3

Please sign in to comment.