Skip to content

CI: pin mcp-publisher version by direct download (impossible with brew) - #318

Merged
gmegidish merged 5 commits into
mainfrom
fix/pin-mcp-publisher-version
May 1, 2026
Merged

CI: pin mcp-publisher version by direct download (impossible with brew)#318
gmegidish merged 5 commits into
mainfrom
fix/pin-mcp-publisher-version

Conversation

@gmegidish

Copy link
Copy Markdown
Member

No description provided.

@coderabbitai

coderabbitai Bot commented Apr 13, 2026

Copy link
Copy Markdown

Walkthrough

The workflow in .github/workflows/build.yml has been modified in the "Publish on github mcp registry" step. The installation method for mcp-publisher@1.5.0 has changed from using Homebrew (including brew shellenv evaluation and brew install) to directly downloading the mcp-publisher_linux_amd64 tarball from the modelcontextprotocol registry GitHub release, extracting it, and placing the binary in /usr/local/bin. The subsequent authentication, version patching, publishing, and logout steps remain unchanged.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive No pull request description was provided by the author, making it impossible to evaluate whether the description relates to the changeset. Add a pull request description explaining the rationale for switching from Homebrew to direct download for mcp-publisher installation.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: pinning mcp-publisher version by direct download instead of Homebrew, which aligns with the workflow modification.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/pin-mcp-publisher-version

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/build.yml:
- Line 69: Replace the raw curl|tar download of the mcp-publisher binary with a
guarded download-and-verify flow: fetch the release artifact and its checksum or
signature (e.g., mcp-publisher_linux_amd64.tar.gz and
mcp-publisher_linux_amd64.tar.gz.sha256 or .asc) using the same release URL,
verify the downloaded file with sha256sum (or gpg --verify against a trusted
public key) and abort the job if verification fails, then extract and install
mcp-publisher only after a successful checksum/signature validation; update the
step that runs the curl | tar pipeline (the command that downloads
mcp-publisher) to perform these verification checks and exit non‑zero on
mismatch.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b92082c0-d971-4954-a958-aa88c79a2602

📥 Commits

Reviewing files that changed from the base of the PR and between eb1eb6a and af90c20.

📒 Files selected for processing (1)
  • .github/workflows/build.yml

# get homebrew in path
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
brew install mcp-publisher@1.5.0
curl -fsSL https://github.com/modelcontextprotocol/registry/releases/download/v1.5.0/mcp-publisher_linux_amd64.tar.gz | tar xz -C /usr/local/bin mcp-publisher

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Verify whether mcp-publisher is downloaded without an integrity check in workflow.
if rg -n 'mcp-publisher_linux_amd64\.tar\.gz' .github/workflows/build.yml >/dev/null; then
  if ! rg -n 'sha256sum|shasum|cosign|gpg|checksums' .github/workflows/build.yml >/dev/null; then
    echo "FAIL: mcp-publisher artifact is downloaded without integrity verification."
    exit 1
  fi
fi

echo "PASS: Integrity verification marker found."

Repository: mobile-next/mobile-mcp

Length of output: 140


🏁 Script executed:

# Examine the workflow file around line 69 to understand the full context
cat -n .github/workflows/build.yml | sed -n '50,90p'

Repository: mobile-next/mobile-mcp

Length of output: 1023


🏁 Script executed:

# Check if there are any checksums or verification files in the repository
find . -name "*checksum*" -o -name "*sha*" -o -name "*CHECKSUMS*" 2>/dev/null | head -20

Repository: mobile-next/mobile-mcp

Length of output: 80


🏁 Script executed:

# Look for any existing security practices in workflows
rg -n "sha256sum|shasum|cosign|gpg|integrity|verify" .github/workflows/ | head -20

Repository: mobile-next/mobile-mcp

Length of output: 48


Add integrity verification for downloaded mcp-publisher before execution.

Line 69 downloads an external release artifact in a privileged release pipeline and immediately uses it without checksum or signature verification. The binary is then authenticated to GitHub via OIDC (line 70) and used to publish artifacts (line 73), creating a critical supply-chain attack vector.

🔒 Suggested hardening diff
-        curl -fsSL https://github.com/modelcontextprotocol/registry/releases/download/v1.5.0/mcp-publisher_linux_amd64.tar.gz | tar xz -C /usr/local/bin mcp-publisher
+        curl -fsSLo /tmp/mcp-publisher_linux_amd64.tar.gz https://github.com/modelcontextprotocol/registry/releases/download/v1.5.0/mcp-publisher_linux_amd64.tar.gz
+        # Pin this to the official SHA256 published with the v1.5.0 release artifacts.
+        echo "<PINNED_SHA256>  /tmp/mcp-publisher_linux_amd64.tar.gz" | sha256sum -c -
+        tar -xzf /tmp/mcp-publisher_linux_amd64.tar.gz -C /usr/local/bin mcp-publisher
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/build.yml at line 69, Replace the raw curl|tar download of
the mcp-publisher binary with a guarded download-and-verify flow: fetch the
release artifact and its checksum or signature (e.g.,
mcp-publisher_linux_amd64.tar.gz and mcp-publisher_linux_amd64.tar.gz.sha256 or
.asc) using the same release URL, verify the downloaded file with sha256sum (or
gpg --verify against a trusted public key) and abort the job if verification
fails, then extract and install mcp-publisher only after a successful
checksum/signature validation; update the step that runs the curl | tar pipeline
(the command that downloads mcp-publisher) to perform these verification checks
and exit non‑zero on mismatch.

@gmegidish
gmegidish merged commit 73276f7 into main May 1, 2026
5 checks passed
@gmegidish
gmegidish deleted the fix/pin-mcp-publisher-version branch May 1, 2026 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant