T08 · Insecure Dependencies
- Location
SKILL.md:26- Finding
Unpinned Third-Party Package Installation and Execution
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 26-35
Vulnerability Type: Unpinned npm dependency execution
Risk Level: MediumVulnerable Code
bash # Global install — `repomix` available everywhere npm install -g repomix-rs # One-off run without global install npx repomix-rs . # Run the MCP server on stdio npx -y repomix-rs --mcpTechnical Analysis
The skill directs users or agents to install and execute
repomix-rswithout specifying an exact, reviewed package version or verifying package integrity and provenance. Consequently, npm resolves the package version available under the registry's current distribution tag at execution time. The effective code can therefore change after this skill has been reviewed.The
npx -ycommand further suppresses the package installation confirmation and immediately starts the downloaded package as an MCP server. A global installation also places or replaces therepomixexecutable in the global npm binary location, potentially affecting later commands outside the current task.Exploitation depends on a malicious or compromised package release, registry/account compromise, or dependency supply-chain compromise. The audited file does not itself contain a malicious payload.
Attack Path
- An attacker compromises the npm package, its publisher account, or a transitive dependency and publishes malicious code under a version selected by the current npm distribution tag.
- A user or agent follows the skill and runs
npm install -g repomix-rs,npx repomix-rs ., ornpx -y repomix-rs --mcp. - npm retrieves the unpinned package and may execute package lifecycle scripts or the package CLI with the invoking user's permissions.
- The malicious code gains access to resources available to that user, including the repository being analyzed, environment variables, writable files, and potentially network services.
- With global installation ...[truncated 740 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the dependency to an exact, reviewed version, for example
npx repomix-rs@2.0.0, rather than relying on a mutable distribution tag. - Verify the selected package version's provenance, publisher identity, integrity metadata, and release artifacts before execution.
- Prefer a project-local installation governed by a committed lockfile and integrity hashes over a global installation.
- Remove
-yfromnpxexamples so users must explicitly approve package retrieval. - Avoid running npm installation or execution commands with administrator or root privileges.
- Execute the package in a sandbox or container with narrowly scoped filesystem and network access.
- Restrict repository access to the minimum directory required and avoid exposing credentials through environment variables.
- Pin and audit transitive dependencies where the package-management workflow permits it.
- For MCP mode, bind the server only to the intended transport, limit exposed capabilities, and terminate it immediately after use.
- Pin the dependency to an exact, reviewed version, for example
