Skip to content

Commit 2dfb980

Browse files
[StepSecurity] Apply security best practices
Signed-off-by: StepSecurity Bot <bot@stepsecurity.io>
1 parent 40867b8 commit 2dfb980

2 files changed

Lines changed: 18 additions & 5 deletions

File tree

.github/workflows/release-test.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,22 @@ name: Test
33
on:
44
workflow_call:
55

6+
permissions:
7+
contents: read
8+
69
jobs:
710
test:
811
runs-on: ubuntu-latest
912
steps:
10-
- uses: actions/checkout@v4
13+
- name: Harden the runner (Audit all outbound calls)
14+
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
15+
with:
16+
egress-policy: audit
17+
18+
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
1119

1220
- name: Set up Python 3.10
13-
uses: actions/setup-python@v5
21+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
1422
with:
1523
python-version: '3.10'
1624

.github/workflows/release.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,15 @@ jobs:
3636
needs: release-please
3737
runs-on: ubuntu-latest
3838
steps:
39-
- uses: actions/checkout@v4
39+
- name: Harden the runner (Audit all outbound calls)
40+
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
41+
with:
42+
egress-policy: audit
43+
44+
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
4045

4146
- name: Set up Python
42-
uses: actions/setup-python@v5
47+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
4348
with:
4449
python-version: '3.10'
4550

@@ -61,7 +66,7 @@ jobs:
6166
run: twine upload dist/*
6267

6368
- name: Upload build artifacts for release
64-
uses: actions/upload-artifact@v4
69+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
6570
with:
6671
name: python-package-distributions
6772
path: dist/

0 commit comments

Comments
 (0)