Skip to content

Commit 6bd34a5

Browse files
TomeHirataclaude
andauthored
chore: pin GitHub Actions to commit SHAs for security (#96)
* chore: pin GitHub Actions to commit SHAs for security Pin all GitHub Actions to full commit hashes instead of version tags to prevent supply chain attacks. Also upgrade to latest versions: - actions/checkout: v4 → v4.3.1 - actions/setup-python: v4 → v5.6.0 - astral-sh/setup-uv: v4 → v8.0.0 - peaceiris/actions-gh-pages: v4 → v4.0.0 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Address review comments and add more supply chain protections - Pin uv version to 0.7.13 instead of "latest" in all workflows - Pin pre-commit hooks to commit SHAs for ruff, pre-commit-hooks, and typos - Add github-actions ecosystem to Dependabot for automated updates 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 5977511 commit 6bd34a5

5 files changed

Lines changed: 22 additions & 18 deletions

File tree

.github/dependabot.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55

66
version: 2
77
updates:
8-
- package-ecosystem: "pip" # See documentation for possible values
9-
directory: "/" # Location of package manifests
8+
- package-ecosystem: "pip"
9+
directory: "/"
10+
schedule:
11+
interval: "weekly"
12+
- package-ecosystem: "github-actions"
13+
directory: "/"
1014
schedule:
1115
interval: "weekly"

.github/workflows/build-doc.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ jobs:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13-
- uses: actions/checkout@v4
13+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
1414

1515
- name: Set up Python
16-
uses: actions/setup-python@v4
16+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
1717
with:
1818
python-version: '3.11'
1919

2020
- name: Install uv
21-
uses: astral-sh/setup-uv@v4
21+
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
2222
with:
23-
version: "latest"
23+
version: "0.7.13"
2424

2525
- name: Install dependencies
2626
run: |
@@ -32,7 +32,7 @@ jobs:
3232
uv run make html
3333
3434
- name: Deploy to GitHub Pages
35-
uses: peaceiris/actions-gh-pages@v4
35+
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
3636
with:
3737
github_token: ${{ secrets.GITHUB_TOKEN }}
3838
publish_dir: ./docs/build/html

.github/workflows/build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@ jobs:
1515
runs-on: ${{ matrix.os }}
1616
steps:
1717
- name: Checkout repository
18-
uses: actions/checkout@v4
18+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
1919

2020
- name: Set up Python ${{ matrix.python-version }}
21-
uses: actions/setup-python@v4
21+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
2222
with:
2323
python-version: ${{ matrix.python-version }}
2424

2525
- name: Install uv
26-
uses: astral-sh/setup-uv@v4
26+
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
2727
with:
28-
version: "latest"
28+
version: "0.7.13"
2929

3030
- name: Install dependencies
3131
run: |

.github/workflows/publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ jobs:
1010

1111
steps:
1212
- name: Check out code
13-
uses: actions/checkout@v4
13+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
1414

1515
- name: Set up Python
16-
uses: actions/setup-python@v4
16+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
1717
with:
1818
python-version: '3.11'
1919

2020
- name: Install uv
21-
uses: astral-sh/setup-uv@v4
21+
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
2222
with:
23-
version: "latest"
23+
version: "0.7.13"
2424

2525
- name: Install build dependencies
2626
run: |

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: v0.12.7
3+
rev: 4cbc74d53fe5634e58e0e65db7d28939c9cec3f7 # v0.12.7
44
hooks:
55
- id: ruff
66
name: ruff (linter)
77
args: [--fix]
88
- id: ruff-format
99
name: ruff (formatter)
1010
- repo: https://github.com/pre-commit/pre-commit-hooks
11-
rev: v5.0.0
11+
rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # v5.0.0
1212
hooks:
1313
- id: trailing-whitespace
1414
- id: end-of-file-fixer
1515
- id: check-merge-conflict
1616
- id: check-yaml
1717
- id: check-toml
1818
- repo: https://github.com/crate-ci/typos
19-
rev: v1.28.1
19+
rev: 7735742fe15f92eb88e4660c70ae0184c4a57502 # v1.28.1
2020
hooks:
2121
- id: typos
2222
args: [--write-changes]

0 commit comments

Comments
 (0)