T08 · Insecure Dependencies
- Location
SKILL.md:5- Finding
Unpinned Globally Installed Third-Party MCP Dependency
- Content
View full analysis
/dev/null 2>&1; then echo "PASS: omnifocus-mcp found" else echo "WARN: omnifocus-mcp is not on PATH" echo "INFO: install it with npm install -g omnifocus-mcp" fi ``` `scripts/register_mcp.sh:9-14` ```bash if ! command -v omnifocus-mcp >/dev/null 2>&1; then echo "omnifocus-mcp is not installed or not on PATH" >&2 echo "Install it with: npm install -g omnifocus-mcp" >&2 exit 1 fi openclaw mcp set omnifocus '{"command":"omnifocus-mcp","args":[]}' ``` ### Technical Analysis The project instructs users and its package metadata to install `omnifocus-mcp` from npm without specifying an exact version or integrity digest. The global installation command resolves whichever package release and transitive dependency graph npm serves at installation time. After installation, `register_mcp.sh` registers the resulting PATH-resolved executable as an OpenClaw MCP server. This means the dependency is not merely a build-time component: it is launched as executable code and performs AppleScript-based operations against the user's OmniFocus database. The audited wrapper does not itself contain a malicious payload. The risk arises from trus ...[truncated 2187 chars]- Remediation
View remediation
``` 2. Ensure the metadata package specification uses the same exact version rather than an unconstrained package name. 3. Record and verify the expected npm integrity digest before installation. Where supported, distribute a lockfile or equivalent manifest containing exact transitive versions and integrity values. 4. Prefer a project-local, isolated dependency installation over a global installation. Register the executable using an absolute path inside the controlled installation directory rather than relying on ambient `PATH` resolution. 5. Disable unnecessary npm lifecycle scripts during installation when compatible with the upstream package: ```bash npm install --ignore-scripts --save-exact omnifocus-mcp@ ``` If lifecycle scripts are required, review them and document why they are necessary before enabling them. 6. Verify the selected version against the upstream GitHub release, npm provenance information, publisher identity, and published checksums before registration. 7. Add a setup check that validates the installed package version and resolved executable path. Refuse registration when the version differs from the approved version or when the executable resolves outside the expected directory. 8. Run the MCP server with the least privileges practical and restrict its access to only the resources needed for OmniFocus operations. ]]>
