SKY-D368 · Supply chain and agent configuration
MCP server launched from a hidden or temporary folder
An MCP server entry can start a program that lives outside the repository, such as node ~/.dev-utils/server.js. SKY-D368 reports a committed server whose code comes from a hidden folder in the home directory (one whose name starts with a dot, or AppData) or from a temporary folder such as /tmp.
- Languages
- MCP configuration files
- Quality gate
- Full scan: listed, not counted by the gate. Diff scan: fails the gate on its own. A baseline scan treats the rule like a diff scan when the baseline's
rule_coveragelists it. - Finding type
- review
- Catalog name
- MCP server launched from a hidden home-directory path
Why it matters
Nothing in the repository shows what that file does, and malware drops its payload in exactly such places. The SANDWORM_MODE campaign registered rogue MCP servers pointing at ~/.dev-utils/server.js, so every agent session started the attacker's code.
What Skylos flags
{ "mcpServers": { "dev-utils": { "command": "node", "args": ["~/.dev-utils/server.js"] } }}What Skylos leaves alone
{ "mcpServers": { "dev-utils": { "command": "~/.nvm/versions/node/v22.11.0/bin/node", "args": ["tools/mcp/server.js"] } }}Why Skylos leaves it alone
The program is in a hidden home folder, but it is Node from the nvm version manager, which Skylos recognises as a toolchain launcher. The code it runs, tools/mcp/server.js, is in the repository, where reviewers can read it.
How Skylos decides
- Runs with
--danger(and-a). Theca9library reads the same MCP server blocks as SKY-D367:.mcp.json,.cursor/mcp.json,.vscode/mcp.jsonand othermcp.jsonfiles,mcpServersin Claude and Gemini settings, and[mcp_servers.*]in.codex/config.toml. - A path is hidden when it starts with a home directory (
~,$HOME,/Users/<name>,/home/<name>,/root,C:\Users\<name>) followed by a folder whose name starts with a dot or isAppData, or with%APPDATA%. It is temporary when it starts with/tmp,/private/tmp,/var/tmp,/dev/shm,/var/folders,$TMPDIR,%TEMP%or a WindowsTempfolder. - Checks, in order, the program itself (unless it is a known launcher such as
node,python,npxoruvxin a version-manager folder like~/.nvm,~/.pyenvor~/.volta, or in abinfolder under~/.local,~/.cargoand similar), the inner command ofsh -corbash -c, paths in the server'sNODE_OPTIONS,LD_PRELOAD,DYLD_INSERT_LIBRARIESandPYTHONSTARTUP, the script or package path of a local, Git or URL launch, the value after-r,--require,--import,--loader,--fromor--spec, and thecwdof a local orpython -mlaunch. - Reports HIGH on the line of the server's name. Keeps the same files as SKY-D365 (regular files in the scanned folder that Git lists, or every file outside Git).
- In the gate, a full scan lists the finding without counting it. In a diff scan a server is new when its rule, file and a digest of its name and command are not among the merge base's findings, and a new one fails the gate on its own.
How to fix it
Commit the server's code to the repository, or launch a published package at an exact version, so reviewers can see what runs. Remove a server nobody on the team added on purpose.
{ "mcpServers": { "dev-utils": { "command": "node",Removed: "args": ["~/.dev-utils/server.js"]Added: "args": ["tools/mcp/server.js"] } }}When it can be wrong
- A tool you installed on purpose in a hidden folder, such as a script under
~/.configor~/.local/share, is reported: only launchers in known toolchain folders are trusted. - A server that is only a
url, with no command, is never checked.
Seeing a case that isn't listed here? Report the wrong result so the rule can be fixed. Don't paste company code: describe the shape of it.
How to silence it
Skylos reads no inline marker for this rule, even where the file allows comments.
Accept a reviewed server with a baseline:
skylos baseline ., then--baseline. The entry matches the rule, file, server name and command, not the line. In pull-request CI (SKYLOS_POLICY_BASE), the entry must also be in the base commit's.skylos/baseline.json.[tool.skylos] ignore = ["SKY-D368"]turns the rule off for the whole project.