Skip to content

Commit d5d097b

Browse files
committed
Harden workflow trust boundaries
1 parent cf837d8 commit d5d097b

14 files changed

Lines changed: 127 additions & 175 deletions

.github/workflows/changelog.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
permissions:
1111
contents: write
1212
steps:
13-
- uses: actions/checkout@v5
13+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
1414
with:
1515
ref: main
1616
token: ${{ secrets.PAT || github.token }}

.github/workflows/cli-docs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,18 @@ jobs:
3535
update-cli-docs:
3636
runs-on: ubuntu-latest
3737
steps:
38-
- uses: actions/checkout@v5
38+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
3939
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository
4040
with:
4141
fetch-depth: 0
42-
- uses: actions/checkout@v5
42+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
4343
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository
4444
with:
4545
fetch-depth: 0
4646
ref: ${{ github.event.pull_request.head.ref || github.ref_name }}
4747
token: ${{ secrets.PAT || github.token }}
4848
- name: Install the latest version of uv
49-
uses: astral-sh/setup-uv@v8.0.0
49+
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
5050
with:
5151
python-version: "3.14"
5252
- name: Install tox

.github/workflows/codeql.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,18 @@ jobs:
2929

3030
steps:
3131
- name: Checkout
32-
uses: actions/checkout@v5
32+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
3333

3434
- name: Initialize CodeQL
35-
uses: github/codeql-action/init@v4
35+
uses: github/codeql-action/init@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4
3636
with:
3737
languages: ${{ matrix.language }}
3838
queries: +security-and-quality
3939

4040
- name: Autobuild
41-
uses: github/codeql-action/autobuild@v4
41+
uses: github/codeql-action/autobuild@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4
4242

4343
- name: Perform CodeQL Analysis
44-
uses: github/codeql-action/analyze@v4
44+
uses: github/codeql-action/analyze@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4
4545
with:
4646
category: /language:${{ matrix.language }}

.github/workflows/codespell.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ jobs:
2020

2121
steps:
2222
- name: Checkout
23-
uses: actions/checkout@v5
23+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
2424
- name: Codespell
25-
uses: codespell-project/actions-codespell@v2
25+
uses: codespell-project/actions-codespell@406322ec52dd7b488e48c1c4b82e2a8b3a1bf630 # v2
2626
with:
2727
skip: CODE_OF_CONDUCT.md,./docs/cli-reference.md,./docs/llms.txt,./docs/llms-full.txt

.github/workflows/codspeed.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
outputs:
1818
enabled: ${{ steps.check.outputs.enabled }}
1919
steps:
20-
- uses: actions/checkout@v5
20+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
2121
- id: check
2222
env:
2323
CODSPEED_TOKEN: ${{ secrets.CODSPEED_TOKEN }}
@@ -41,12 +41,12 @@ jobs:
4141
if: needs.preflight.outputs.enabled == 'true'
4242
runs-on: ubuntu-24.04
4343
steps:
44-
- uses: actions/checkout@v5
45-
- uses: actions/setup-python@v6
44+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
45+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
4646
with:
4747
python-version: "3.14.2"
4848
- name: Install the latest version of uv
49-
uses: astral-sh/setup-uv@v8.0.0
49+
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
5050
- name: Install dependencies
5151
run: uv sync --all-extras --group benchmark
5252
- name: Run benchmarks

.github/workflows/config-types.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
config-types:
1919
runs-on: ubuntu-latest
2020
steps:
21-
- uses: actions/checkout@v5
21+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
2222

2323
- id: preflight
2424
run: |
@@ -28,7 +28,7 @@ jobs:
2828
echo "enabled=false" >> "$GITHUB_OUTPUT"
2929
fi
3030
31-
- uses: astral-sh/setup-uv@v8.0.0
31+
- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
3232
if: steps.preflight.outputs.enabled == 'true'
3333
with:
3434
enable-cache: true

.github/workflows/docs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ jobs:
2020
permissions:
2121
contents: read
2222
steps:
23-
- uses: actions/checkout@v5
23+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
2424
- name: Install the latest version of uv
25-
uses: astral-sh/setup-uv@v8.0.0
25+
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
2626
with:
2727
enable-cache: true
2828
python-version: "3.14"
@@ -89,7 +89,7 @@ jobs:
8989
issues: write
9090
steps:
9191
- name: Comment Preview URL on PR
92-
uses: actions/github-script@v7
92+
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7
9393
with:
9494
script: |
9595
const projectName = '${{ vars.CLOUDFLARE_PAGES_PROJECT || 'fastapi-code-generator' }}';

.github/workflows/llms-txt.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ jobs:
3131
update-llms-txt:
3232
runs-on: ubuntu-latest
3333
steps:
34-
- uses: actions/checkout@v5
34+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
3535
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository
3636
with:
3737
fetch-depth: 0
38-
- uses: actions/checkout@v5
38+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
3939
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository
4040
with:
4141
fetch-depth: 0
@@ -50,7 +50,7 @@ jobs:
5050
fi
5151
- name: Install the latest version of uv
5252
if: steps.preflight.outputs.enabled == 'true'
53-
uses: astral-sh/setup-uv@v8.0.0
53+
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
5454
with:
5555
python-version: "3.14"
5656
- name: Install tox

.github/workflows/publish.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@ jobs:
1313
name: Build Python distributions
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v5
16+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
1717
with:
1818
fetch-depth: 0
1919
- name: Install the latest version of uv
20-
uses: astral-sh/setup-uv@v8.0.0
20+
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
2121
with:
2222
python-version: "3.14"
2323
- name: Build package
2424
run: uv build --python 3.14 --python-preference only-managed --sdist --wheel . --out-dir dist
2525
- name: Store the distribution packages
26-
uses: actions/upload-artifact@v4
26+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
2727
with:
2828
name: ${{ env.dists-artifact-name }}
2929
path: dist/*
@@ -41,11 +41,11 @@ jobs:
4141
id-token: write
4242
steps:
4343
- name: Download all the dists
44-
uses: actions/download-artifact@v4
44+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
4545
with:
4646
name: ${{ env.dists-artifact-name }}
4747
path: dist/
4848
- name: Publish to PyPI
49-
uses: pypa/gh-action-pypi-publish@v1.13.0
49+
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
5050
with:
5151
attestations: true

.github/workflows/readme.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,18 @@ jobs:
3333
update-readme:
3434
runs-on: ubuntu-latest
3535
steps:
36-
- uses: actions/checkout@v5
36+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
3737
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository
3838
with:
3939
fetch-depth: 0
40-
- uses: actions/checkout@v5
40+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
4141
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository
4242
with:
4343
fetch-depth: 0
4444
ref: ${{ github.event.pull_request.head.ref || github.ref_name }}
4545
token: ${{ secrets.PAT || github.token }}
4646
- name: Install the latest version of uv
47-
uses: astral-sh/setup-uv@v8.0.0
47+
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
4848
with:
4949
python-version: "3.14"
5050
- name: Install tox

0 commit comments

Comments
 (0)