Skip to content

Commit fc88341

Browse files
committed
ci: harden dependency supply chain
1 parent bfd6f6e commit fc88341

44 files changed

Lines changed: 259 additions & 134 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/actions/codex-fetch-pr-context/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ runs:
1414
steps:
1515
- name: Gather pull request context
1616
id: fetch
17-
uses: actions/github-script@v7
17+
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7
1818
env:
1919
WRITE_SUMMARY: ${{ inputs.write-summary }}
2020
with:

.github/actions/codex-run/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ JSON
209209
210210
- id: run_comment
211211
if: ${{ inputs.mode == 'comment' && env.GH_TOKEN_CODEX_COMMENT != '' }}
212-
uses: actions/github-script@v7
212+
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7
213213
env:
214214
COMMENT_TOKEN: ${{ env.GH_TOKEN_CODEX_COMMENT }}
215215
with:

.github/actions/codex-update-auth/action.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,10 @@ runs:
4747
fi
4848
4949
echo "::notice::Codex auth.json changed; refreshing CODEX_AUTH secret via GitHub REST API."
50-
python -m pip install --quiet pynacl
5150
read_key_output="$(gh api repos/${GITHUB_REPOSITORY}/actions/secrets/public-key --jq '[.key_id, .key] | @tsv')"
5251
IFS=$'\t' read -r key_id public_key <<<"$read_key_output"
5352
54-
encrypted_value=$(PUBLIC_KEY="$public_key" AUTH_PATH="$CODEX_AUTH_PATH" python - <<'PY'
53+
encrypted_value=$(PUBLIC_KEY="$public_key" AUTH_PATH="$CODEX_AUTH_PATH" uv run --frozen python - <<'PY'
5554
import base64
5655
import os
5756
from pathlib import Path

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ updates:
1010
interval: "weekly"
1111
day: "monday"
1212
time: "09:00"
13+
cooldown:
14+
default-days: 7
1315
open-pull-requests-limit: 5
1416
labels:
1517
- "dependencies"
@@ -29,6 +31,8 @@ updates:
2931
interval: "weekly"
3032
day: "monday"
3133
time: "09:00"
34+
cooldown:
35+
default-days: 7
3236
open-pull-requests-limit: 10
3337
labels:
3438
- "dependencies"

.github/integration-mirror-workflows/release-on-tag.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
release:
3737
runs-on: ubuntu-latest
3838
steps:
39-
- uses: actions/checkout@v7
39+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
4040
with:
4141
# A shallow, ref-only checkout of a tag-push event is not
4242
# guaranteed to bring down the full annotated tag object (only

.github/workflows/_build-and-release.yml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ jobs:
4141

4242
steps:
4343
- name: Checkout code
44-
uses: actions/checkout@v7
44+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
4545
with:
4646
submodules: true
4747

4848
- name: Set up Python
49-
uses: actions/setup-python@v7
49+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
5050
with:
5151
python-version: '3.13'
5252

@@ -57,8 +57,7 @@ jobs:
5757

5858
- name: Create virtual environment and install dependencies
5959
run: |
60-
uv venv .venv
61-
uv pip install -e . pyinstaller
60+
uv sync --frozen --group dev
6261
shell: bash
6362

6463
- name: Activate venv (Unix)
@@ -71,7 +70,7 @@ jobs:
7170
shell: pwsh
7271

7372
- name: Build binary
74-
run: pyinstaller packaging/binary/ha-mcp.spec
73+
run: uv run --frozen pyinstaller packaging/binary/ha-mcp.spec
7574

7675
- name: Test binary (Linux/macOS)
7776
if: runner.os != 'Windows'
@@ -95,7 +94,7 @@ jobs:
9594
mv dist/ha-mcp${{ matrix.binary_ext }} dist/${{ matrix.artifact_name }}${{ matrix.binary_ext }}
9695
9796
- name: Upload binary artifact
98-
uses: actions/upload-artifact@v7
97+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
9998
with:
10099
name: ${{ matrix.artifact_name }}
101100
path: dist/${{ matrix.artifact_name }}${{ matrix.binary_ext }}
@@ -108,21 +107,21 @@ jobs:
108107

109108
steps:
110109
- name: Checkout code
111-
uses: actions/checkout@v7
110+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
112111

113112
- name: Set up Python
114-
uses: actions/setup-python@v7
113+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
115114
with:
116115
python-version: '3.13'
117116

118117
- name: Download Windows binary
119-
uses: actions/download-artifact@v8
118+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
120119
with:
121120
name: ha-mcp-windows
122121
path: mcpb-bundle
123122

124123
- name: Download macOS binary
125-
uses: actions/download-artifact@v8
124+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
126125
with:
127126
name: ha-mcp-macos-arm64
128127
path: mcpb-bundle
@@ -152,7 +151,7 @@ jobs:
152151
unzip -l ha-mcp.mcpb
153152
154153
- name: Upload MCPB artifact
155-
uses: actions/upload-artifact@v7
154+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
156155
with:
157156
name: ha-mcp-mcpb
158157
path: ha-mcp.mcpb
@@ -165,10 +164,10 @@ jobs:
165164

166165
steps:
167166
- name: Checkout code
168-
uses: actions/checkout@v7
167+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
169168

170169
- name: Download all artifacts
171-
uses: actions/download-artifact@v8
170+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
172171
with:
173172
pattern: ha-mcp-*
174173
path: artifacts

.github/workflows/_update-addon-config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
# Generate GitHub App token with bypass permissions
5959
- name: Generate GitHub App token
6060
id: app-token
61-
uses: actions/create-github-app-token@v3
61+
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3
6262
with:
6363
app-id: ${{ secrets.RELEASE_APP_ID }}
6464
private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
@@ -85,7 +85,7 @@ jobs:
8585
# workspace, where any later step could read it. The version-bump push
8686
# below re-authenticates explicitly with the token instead. The public
8787
# repo checkout reads fine with the default token. (#1762)
88-
- uses: actions/checkout@v7
88+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
8989
with:
9090
ref: master
9191
fetch-depth: 1

.github/workflows/addon-publish-dev.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
dev_version: ${{ steps.version.outputs.dev_version }}
5858
short_sha: ${{ steps.version.outputs.short_sha }}
5959
steps:
60-
- uses: actions/checkout@v7
60+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
6161
with:
6262
# Full history: the dev version number is the commit count.
6363
fetch-depth: 0
@@ -100,7 +100,7 @@ jobs:
100100
platform: linux/arm64
101101

102102
steps:
103-
- uses: actions/checkout@v7
103+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
104104
with:
105105
submodules: true
106106

.github/workflows/addon-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
platform: linux/arm64
4040

4141
steps:
42-
- uses: actions/checkout@v7
42+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
4343
with:
4444
submodules: true
4545
# Check out the release tag so uv sync installs the bumped pyproject.toml.

.github/workflows/build-binary.yml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747

4848
steps:
4949
- name: Checkout code
50-
uses: actions/checkout@v7
50+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
5151
with:
5252
# Pull the skills-vendor submodule so PyInstaller's
5353
# `collect_all('ha_mcp')` packages the bundled skill files into
@@ -57,7 +57,7 @@ jobs:
5757
submodules: true
5858

5959
- name: Set up Python
60-
uses: actions/setup-python@v7
60+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
6161
with:
6262
python-version: '3.13'
6363

@@ -68,8 +68,7 @@ jobs:
6868

6969
- name: Create virtual environment and install dependencies
7070
run: |
71-
uv venv .venv
72-
uv pip install -e . pyinstaller
71+
uv sync --frozen --group dev
7372
shell: bash
7473

7574
- name: Activate venv (Unix)
@@ -82,7 +81,7 @@ jobs:
8281
shell: pwsh
8382

8483
- name: Build binary
85-
run: pyinstaller packaging/binary/ha-mcp.spec
84+
run: uv run --frozen pyinstaller packaging/binary/ha-mcp.spec
8685

8786
- name: Run smoke test (Unix)
8887
if: runner.os != 'Windows'
@@ -108,7 +107,7 @@ jobs:
108107
mv dist/ha-mcp${{ matrix.binary_ext }} dist/${{ matrix.artifact_name }}${{ matrix.binary_ext }}
109108
110109
- name: Upload binary artifact
111-
uses: actions/upload-artifact@v7
110+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
112111
with:
113112
name: ${{ matrix.artifact_name }}
114113
path: dist/${{ matrix.artifact_name }}${{ matrix.binary_ext }}
@@ -122,21 +121,21 @@ jobs:
122121

123122
steps:
124123
- name: Checkout code
125-
uses: actions/checkout@v7
124+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
126125

127126
- name: Set up Python
128-
uses: actions/setup-python@v7
127+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
129128
with:
130129
python-version: '3.13'
131130

132131
- name: Download Windows binary
133-
uses: actions/download-artifact@v8
132+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
134133
with:
135134
name: ha-mcp-windows
136135
path: mcpb-bundle
137136

138137
- name: Download macOS binary
139-
uses: actions/download-artifact@v8
138+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
140139
with:
141140
name: ha-mcp-macos-arm64
142141
path: mcpb-bundle
@@ -190,7 +189,7 @@ jobs:
190189
unzip -l ha-mcp.mcpb
191190
192191
- name: Upload mcpb artifact
193-
uses: actions/upload-artifact@v7
192+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
194193
with:
195194
name: ha-mcp-mcpb
196195
path: ha-mcp.mcpb

0 commit comments

Comments
 (0)