Skip to content

Commit

Permalink
[StepSecurity] ci: Harden GitHub Actions (#133)
Browse files Browse the repository at this point in the history
* [StepSecurity] ci: Harden GitHub Actions in ci.yml

* [StepSecurity] ci: Harden GitHub Actions in codeql-analysis.yml
  • Loading branch information
step-security-bot committed Sep 29, 2022
1 parent d544949 commit d6c3e05
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ jobs:
- "pypy-3.8"

steps:
- name: Harden Runner
uses: step-security/harden-runner@v1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
Expand All @@ -56,6 +61,11 @@ jobs:
needs: tests

steps:
- name: Harden Runner
uses: step-security/harden-runner@v1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
Expand Down Expand Up @@ -88,6 +98,11 @@ jobs:
SETUPTOOLS_SCM_PRETEND_VERSION: "" # inconsistency error otherwise

steps:
- name: Harden Runner
uses: step-security/harden-runner@v1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

- uses: actions/checkout@v3
with:
fetch-depth: 0
Expand All @@ -111,6 +126,11 @@ jobs:
SETUPTOOLS_SCM_PRETEND_VERSION: ""

steps:
- name: Harden Runner
uses: step-security/harden-runner@v1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

- uses: actions/checkout@v3
with:
fetch-depth: 0
Expand All @@ -124,6 +144,11 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- name: Harden Runner
uses: step-security/harden-runner@v1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ on:
schedule:
- cron: "24 5 * * 4"

permissions: # added using https://github.com/step-security/secure-workflows
contents: read

jobs:
analyze:
name: Analyze
Expand All @@ -37,6 +40,11 @@ jobs:
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Harden Runner
uses: step-security/harden-runner@v1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

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

Expand Down

0 comments on commit d6c3e05

Please sign in to comment.