T08 · Insecure Dependencies
- Location
SKILL.md:84- Finding
Unpinned GitHub Dependency Is Downloaded and Executed with npx
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 84–94
Vulnerability Type: Unpinned remote dependency execution
Risk Level: HighVulnerable Code
bash On OpenClaw releases that expose the `mcp` command group, connect the stdio server with: openclaw mcp add chinavideoai \ --command npx \ --arg -y \ --arg github:gpt-img-2/chinavideoai-prompt-mcp \ --include 'build_video_prompt,plan_reference_shots,diagnose_video_prompt,get_china_video_resources'The alternative installation instruction has the same underlying issue:
text npx -y github:gpt-img-2/chinavideoai-prompt-mcpTechnical Analysis
The skill instructs users to execute a package directly from a mutable GitHub repository reference. No immutable commit hash, signed release, version tag, package lock, or verified integrity digest is specified. The
npx -yoption automatically accepts installation, reducing the opportunity for the user to inspect the downloaded component before execution.Because the repository reference can resolve to different code over time, the component executed by a user may differ from the component reviewed during this audit. A compromise of the repository, maintainer account, dependency chain, or referenced default branch could therefore introduce attacker-controlled code. The process would execute that code under the account running OpenClaw or the setup command.
Attack Path
- An attacker compromises the referenced GitHub repository, a maintainer account, or a transitive dependency used by the MCP package.
- The attacker modifies the repository's default branch or installation lifecycle code with a malicious payload.
- A user follows the instructions in
SKILL.mdand runs the supplied OpenClaw or directnpx -ycommand. npxretrieves the current remote repository contents without verifying an audit-approved immutable revision.- The downloaded package or its insta ...[truncated 929 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the GitHub dependency to a reviewed immutable commit SHA rather than its mutable default branch.
- Prefer a versioned package from a trusted registry with a lockfile and an explicitly verified cryptographic integrity digest.
- Remove
-yso installation requires explicit user confirmation and provides an opportunity to inspect the resolved source. - Review and archive the exact source revision, including its transitive dependencies and installation lifecycle scripts.
- Verify release signatures or attestations where available, and document the expected repository owner, revision, and checksum.
- Run the MCP server in a sandbox with restricted filesystem, credential, environment-variable, and network access.
- Configure dependency monitoring and require security review before updating the pinned revision.
- Present the MCP as an optional external component and warn users that installation executes third-party code under their account.
