Skip to content

Commit d466042

Browse files
SavioBS629claude
andcommitted
fix(ci): verify mcp-publisher tarball SHA-256 before extracting
Previous install step piped curl output straight to tar — any compromise of the release URL (CDN, account, MITM) would have executed arbitrary code with OIDC write access. Now: download to file, verify SHA-256 against pinned digest, then extract. Workflow aborts on mismatch. Pinned to mcp-publisher v1.3.3 linux_amd64 (digest cross-checked against the official registry_1.3.3_checksums.txt file). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent ce76c82 commit d466042

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

.github/workflows/mcp-registry-publish.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,18 @@ jobs:
3131
run: npm run build --if-present
3232

3333
- name: Install MCP Publisher
34+
# Pinned to v1.3.3 linux_amd64. To upgrade: bump VERSION and SHA256
35+
# (capture via: shasum -a 256 mcp-publisher_linux_amd64.tar.gz, or use
36+
# registry_<ver>_checksums.txt from the release).
37+
env:
38+
VERSION: v1.3.3
39+
SHA256: 1113b9d6bf59b000966c4f17752cf87b51db03dcc5482721421fd843ce3bf048
3440
run: |
35-
curl -L "https://github.com/modelcontextprotocol/registry/releases/download/v1.3.3/mcp-publisher_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz" | tar xz mcp-publisher
41+
curl -fsSL -o mcp-publisher.tar.gz \
42+
"https://github.com/modelcontextprotocol/registry/releases/download/${VERSION}/mcp-publisher_linux_amd64.tar.gz"
43+
echo "${SHA256} mcp-publisher.tar.gz" | sha256sum -c -
44+
tar xzf mcp-publisher.tar.gz mcp-publisher
45+
rm mcp-publisher.tar.gz
3646
3747
- name: Login to MCP Registry
3848
run: ./mcp-publisher login github-oidc

0 commit comments

Comments
 (0)