Skip to content

Commit 1ad714c

Browse files
[StepSecurity] Apply security best practices (#123)
Signed-off-by: StepSecurity Bot <bot@stepsecurity.io> Co-authored-by: stepsecurity-app[bot] <188008098+stepsecurity-app[bot]@users.noreply.github.com>
1 parent 9b827e7 commit 1ad714c

File tree

3 files changed

+23
-5
lines changed

3 files changed

+23
-5
lines changed

.github/workflows/pr-checks.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ jobs:
3030
checks: write
3131
statuses: write
3232
steps:
33+
- name: Harden the runner (Audit all outbound calls)
34+
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
35+
with:
36+
egress-policy: audit
37+
3338
- name: Check PR Title
3439
uses: step-security/conventional-pr-title-action@8a8989588c2547f23167c4c42f0fb2356479e81b # v3.2.1
3540
env:

.github/workflows/publish.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
tags:
66
- 'v*.*.*'
77

8+
permissions:
9+
contents: read
10+
811
jobs:
912
build-and-publish:
1013
runs-on: ubuntu-latest
@@ -14,10 +17,15 @@ jobs:
1417
permissions:
1518
id-token: write
1619
steps:
17-
- uses: actions/checkout@v4
20+
- name: Harden the runner (Audit all outbound calls)
21+
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
22+
with:
23+
egress-policy: audit
24+
25+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1826

1927
- name: Set up Python
20-
uses: actions/setup-python@v4
28+
uses: actions/setup-python@7f4fc3e22c37d6ff65e88745f38bd3157c663f7c # v4.9.1
2129

2230
- name: Upgrade pip
2331
run: pip install --upgrade pip
@@ -32,4 +40,4 @@ jobs:
3240
run: python -m build
3341

3442
- name: Publish to PyPI
35-
uses: pypa/gh-action-pypi-publish@release/v1
43+
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # release/v1

.github/workflows/test.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,14 @@ jobs:
1111
build-and-test:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v4
14+
- name: Harden the runner (Audit all outbound calls)
15+
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
16+
with:
17+
egress-policy: audit
18+
19+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1520
- name: Install uv
16-
uses: astral-sh/setup-uv@v4
21+
uses: astral-sh/setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a # v4.2.0
1722

1823
- name: Install setuptools wheel
1924
run: pip install --upgrade pip setuptools wheel

0 commit comments

Comments
 (0)