T08 · Insecure Dependencies
- Location
SKILL.md:65- Finding
Unpinned npm Package Is Downloaded and Executed at Runtime
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 65–71
Vulnerability Type: Unpinned third-party dependency execution
Risk Level: HighComplete Code Snippet:
markdown ## Tool invocation format All tools are invoked through the `npx -y @libydic/mall` command: ```text npx -y @libydic/mall <tool-name> --session-key <session-key> [other parameters]text The same unpinned command pattern is subsequently used throughout the tool definitions and workflows. ### Technical Analysis The Skill directs the Agent to run `npx -y @libydic/mall` without specifying an exact package version. When the package is not already available locally, `npx` can retrieve it from the configured npm registry and execute it immediately. The `-y` option suppresses the normal installation confirmation. No lockfile, integrity hash, package signature, vendored implementation, or reviewed version is included in the project. Consequently, the code executed at runtime can differ from the code that existed when the Skill was audited. A compromised publisher account, registry incident, malicious maintainer update, or package takeover could therefore turn otherwise legitimate commerce commands into arbitrary code execution. This package is invoked with sensitive arguments and capabilities, including: - The Agent session key - User phone numbers and verification codes - Recipient names, phone numbers, and delivery addresses - Product and order identifiers - Order-creation requests - Access to account, points, order, and logistics information ### Attack Path 1. An attacker compromises the npm package publisher, the package itself, or its release process. 2. The attacker publishes a malicious version of `@libydic/mall`. 3. A user activates a mall workflow described in `SKILL.md`. 4. The Agent runs `npx -y @libydic/mall ...` without an exact version or integrity constraint. 5. `npx` retrieves and ex ...[truncated 1249 chars]- Remediation
View remediation
Remediation Suggestions
-
Pin
@libydic/mallto a specific, audited version rather than resolving the latest release:text npx -y @libydic/mall@X.Y.Z <tool-name> ... -
Install the dependency during a controlled build process and commit a lockfile containing registry integrity hashes. Invoke the installed binary without allowing runtime package resolution.
-
Verify the package's provenance, maintainers, source repository, release process, transitive dependencies, and published artifact contents before deployment.
-
Use trusted-registry controls, package allowlisting, provenance verification, and continuous dependency monitoring.
-
Disable dependency lifecycle scripts where compatible with the package and deployment process.
-
Run the package in a restricted sandbox with:
- Minimal filesystem permissions
- An explicit network destination allowlist
- No access to unrelated credentials or environment variables
- A dedicated low-privilege operating-system identity
- Resource and execution-time limits
-
Avoid exposing sensitive values through command-line arguments, which may be visible in process listings or logs. Pass secrets through a protected input channel and redact them from telemetry.
-
Scope session keys narrowly, rotate them after authentication-sensitive operations, and prevent the package from receiving data unnecessary for the selected command.
-
Consider replacing the runtime npm executable with a reviewed, versioned API client whose behavior and permitted endpoints are enforced by the host platform.
-
