Skip to content

fix(package): preserve bundled MCP launcher permissions - #678

Merged
kmbroai merged 1 commit into
mainfrom
codex/fix-npm-mcp-launcher-mode
Aug 27, 2026
Merged

kmbroai merged 1 commit into
mainfrom
codex/fix-npm-mcp-launcher-mode

Conversation

@soyeon-oai

@soyeon-oai soyeon-oai commented Aug 27, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

pnpm pack strips the executable bit from the bundled POSIX MCP launcher because it is not an npm bin entry. This prevents the installed plugin from starting its MCP server on Linux and macOS.

Closes #652.

Changes

  • Declare the bundled POSIX MCP launcher in publishConfig.executableFiles.
  • Reject package archives whose CLI or MCP launcher is not executable.
  • Start the installed MCP launcher and complete JSON-RPC initialization in the package smoke test.

Testing

  • pnpm pack --pack-destination <temporary-directory>
  • tar -tvzf <packed-tarball> package/_bundled_plugin/scripts/launch_codex_security_mcp package/bin/codex-security.mjs (both launchers were 0755)
  • node scripts/check-package.mjs <packed-tarball>
  • pnpm run types
  • pnpm exec prettier --check package.json scripts/check-package.mjs scripts/smoke-package.mjs
  • Confirmed the updated package checker rejects a pre-fix archive with npm package MCP launcher is not executable.

Risk and rollout

The change affects npm archive metadata and package verification only. Windows continues to use the existing .cmd launcher. A new npm release is required for users to receive the corrected file mode.

Public disclosure review

  • No customer, partner, prospect, or user identities, data, or identifying details are included.
  • No credentials, personal data, private source, scan findings, or nonpublic links or tickets are included.
  • I reviewed the branch name, title, description, commits, changes, comments, logs, screenshots, attachments, and links for public disclosure.

Change impact

The package now preserves the launcher's POSIX mode and proves the installed MCP server can start.

flowchart LR
  subgraph column_0["Package input"]
    direction TB
    node_0["Declare executable launcher<br/><code>publishConfig.executableFiles</code>"]
  end
  subgraph column_1["Packed artifact"]
    direction TB
    node_1["Tarball keeps execute mode<br/><code>npm package</code>"]
  end
  subgraph column_2["Package checks"]
    direction TB
    node_2["Check both launcher modes<br/><code>check-package.mjs</code>"]
    node_3["Start installed launcher<br/><code>smoke-package.mjs</code>"]
  end
  subgraph column_3["Outcome"]
    direction TB
    node_4["Block broken release archive<br/><code>node-release.yml</code>"]
    node_5["MCP initialization succeeds<br/><code>codex-security</code>"]
  end
  node_0 -->|"marks executable"| node_1
  node_1 -->|"checks mode"| node_2
  node_1 -->|"installs"| node_3
  node_2 -->|"runs smoke"| node_3
  node_2 -->|"gates"| node_4
  node_3 -->|"initializes"| node_5
  class node_0 changed
  class node_1 affected
  class node_2 changed
  class node_3 changed
  class node_4 affected
  class node_5 affected
  classDef changed fill:#d7f5e5,stroke:#237a4b,color:#111
  classDef affected fill:#e6f0ff,stroke:#3569a8,color:#111
  classDef context fill:#f2f3f5,stroke:#6e7781,color:#111
Loading

Limits: The exact-head CI matrix was still running when this evidence snapshot was collected. · A new npm release is still required before installed users receive the corrected archive.

Source evidence (6)

@github-actions github-actions Bot added the bug Something isn't working label Aug 27, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-08-27T07:20:00.871146Z 5e02916 PR opened
🔒 Security Review ✅ Completed 2026-08-27T07:20:48.874337Z 5e02916 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@kmbroai
kmbroai merged commit 67bc0b7 into main Aug 27, 2026
40 of 66 checks passed
@kmbroai
kmbroai deleted the codex/fix-npm-mcp-launcher-mode branch August 27, 2026 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

npm package ships bundled MCP launcher as 0644, causing permission denied on POSIX

2 participants