Skip to content

Commit

Permalink
Add runner hardening to all jobs in our workflows
Browse files Browse the repository at this point in the history
This aligns with what was done to the `lint` job of the build.yml
workflow that was inherited from cisagov/skeleton-generic.
  • Loading branch information
mcdonnnj committed Sep 13, 2023
1 parent 465a5a5 commit 41cbf1e
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,11 @@ jobs:
- os: ubuntu-20.04
python-version: "3.6"
steps:
- id: harden-runner
name: Harden the runner
uses: step-security/harden-runner@v2
with:
egress-policy: audit
- uses: actions/checkout@v4
- id: setup-python
uses: actions/setup-python@v4
Expand Down Expand Up @@ -209,6 +214,11 @@ jobs:
- diagnostics
- test
steps:
- id: harden-runner
name: Harden the runner
uses: step-security/harden-runner@v2
with:
egress-policy: audit
- uses: actions/checkout@v4
- id: setup-python
uses: actions/setup-python@v4
Expand Down Expand Up @@ -262,6 +272,11 @@ jobs:
- os: ubuntu-20.04
python-version: "3.6"
steps:
- id: harden-runner
name: Harden the runner
uses: step-security/harden-runner@v2
with:
egress-policy: audit
- uses: actions/checkout@v4
- id: setup-python
uses: actions/setup-python@v4
Expand Down Expand Up @@ -316,6 +331,11 @@ jobs:
- os: ubuntu-20.04
python-version: "3.6"
steps:
- id: harden-runner
name: Harden the runner
uses: step-security/harden-runner@v2
with:
egress-policy: audit
- uses: actions/checkout@v4
- id: setup-python
uses: actions/setup-python@v4
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ jobs:
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection

steps:
- id: harden-runner
name: Harden the runner
uses: step-security/harden-runner@v2
with:
egress-policy: audit

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

Expand Down

0 comments on commit 41cbf1e

Please sign in to comment.