Repository navigation
🤖 fix: start the shown skills CLI command in the home folder - #7168
Conversation
npx prefers a matching skills package in the working folder's node_modules over the registry, so the copied command run inside an attacker's checkout would start the planted copy. The command now changes to the home folder first (cmd.exe: cd /d "%USERPROFILE%"). Refs #7123 (item 35).
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
🟢 e2e stories (Haiku): 8 passed21 agent steps · 7 replayed from cache · 25 model calls · 210.9k tokens (76% cached) All 8 tests in 8 files
e2e 0.20.0 · 2m 36s · web · run artifacts 🟢 e2e Electron stories (Haiku): 3 passed3 agent steps · 3 model calls · 8.1k tokens (32% cached) All 3 tests in 3 files
e2e 0.20.0 · 21.8s · electron · run artifacts 🟢 e2e agent repros (Haiku): no tests selectedSpend: $0.00 of the $1.00 cap (proxy ledger) e2e 0.20.0 · 6.3s · 2 targets (web, phone) · run artifacts |
|
@codex review The Code Review lane for this head has shown Running for several hours with no result. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c783f720c7
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
Xum's Windows terminal prefers Git Bash or PowerShell, where cd /d and %USERPROFILE% (and && in Windows PowerShell) do not work. No single prefix works in every Windows shell, so the Windows command has none and Settings asks the user to run it from the home folder. macOS and Linux keep cd ~ &&.
Summary
The Skills CLI command that Settings → Plugins shows for you to copy starts with
cd ~ &&on macOS and Linux, so npx starts in your home folder. On Windows the command has no prefix, because no single form works in cmd.exe, PowerShell and Git Bash, and Settings tells you to run it from your home folder. npx prefers a matchingskillspackage in the current folder'snode_modulesover the registry. So the copied command, run inside a checkout that someone else controls, could start a planted copy of the CLI.Background
Codex security review raised this on #7132 (P1). The maintainer decided it does not block the stack and asked for this follow-up. Refs #7123 (item 35).
Implementation
skillsCliCommandadds the fixed POSIX prefix, never built from input. It adds no prefix on Windows. The existing check that every argument is safe to show unquoted is unchanged.docs/agents/agent-skills.mdxsay why the command starts in the home folder.Validation
A new test runs the shown command in a real
/bin/sh. It starts from a folder with a plantednode_modules/skillsand uses a stand-innpxthat prints its working folder. The test fails without the prefix and passes with it.Risks
Low. Only the shown text changes. Xum runs nothing.
Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:high• Cost:$114.77