T08 · Insecure Dependencies
- Location
SKILL.md:30- Finding
Unpinned Third-Party Package Retrieval and Execution
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 30–32
Vulnerability Type: Unpinned third-party dependency execution
Risk Level: MediumVulnerable Code
json { "tool": "exec", "command": "bunx ccusage daily --no-color -z Europe/Paris -o desc --since $(date +%Y%m%d) --until $(date +%Y%m%d)" }The related documentation in
README.md, line 12, confirms that the dependency is retrieved automatically:text No setup required. `ccusage` is fetched automatically via `bunx`.Technical Analysis
The skill instructs the agent to execute
ccusagethroughbunxwithout specifying an exact package version, lockfile, integrity hash, or trusted registry constraint. Consequently, the package resolved and executed during a future invocation may differ from the package available when the skill was audited.This creates a supply-chain trust boundary because
bunxmay retrieve package code from an external package registry and execute it with the privileges of the agent process. If the package, publisher account, registry resolution path, or an upstream dependency is compromised, malicious code could be delivered without any modification to this skill.The audit did not establish that the current
ccusagepackage is malicious. The vulnerability is the mutable and unverified dependency execution mechanism.Attack Path
- An attacker compromises the relevant package publisher, package version, registry resolution path, or upstream dependency.
- The attacker publishes a malicious release that resolves under the unpinned
ccusagepackage name. - A user asks the agent for a Claude Code usage or cost report.
- Following
SKILL.md, the agent invokesbunx ccusage. bunxresolves and retrieves the attacker-controlled package version.- The downloaded package executes locally under the agent process identity.
- The payload can access resources available to that identity, including local session data used to generate the ...[truncated 584 chars]
- Remediation
View remediation
Remediation Suggestions
-
Pin
ccusageto a reviewed exact version, for example:json { "tool": "exec", "command": "bunx ccusage@X.Y.Z daily --no-color -z Europe/Paris -o desc --since $(date +%Y%m%d) --until $(date +%Y%m%d)" } -
Use a lockfile and package-manager integrity verification where supported, and commit the lockfile to the reviewed artifact.
-
Configure an approved registry explicitly rather than relying on ambient package-manager configuration.
-
Verify package provenance, publisher identity, checksums, and signatures before approving version updates.
-
Run the dependency with least privilege in a sandbox that restricts filesystem, environment-variable, and network access.
-
Establish a controlled update process in which dependency changes are reviewed and tested before deployment.
-
Update every command and example consistently so no documented path continues to invoke an unpinned package.
-
