T08 · Insecure Dependencies
- Location
SKILL.md:24- Finding
Unpinned Global Installation of a Credential-Handling Third-Party CLI
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 24–28
Vulnerability Type: Unpinned third-party dependency installed globally
Risk Level: MediumVulnerable Code Snippet
markdown If the CLI is not installed, install it: ```bash npm install -g youtube-analytics-clitext ### Technical Analysis The Skill instructs the agent to install the latest available version of `youtube-analytics-cli` globally from the npm registry. The dependency is not pinned to a reviewed version or integrity hash, and its implementation is not included in the audited project. This CLI is subsequently trusted to process sensitive YouTube authentication material, including API keys, OAuth client secrets, and refresh tokens. Because the installed version can change after this Skill has been reviewed, the effective executable payload is not fixed. A compromised maintainer account, registry compromise, malicious release, or package-identity mistake could cause arbitrary package installation or runtime code to execute under the privileges of the user running the agent. Global installation increases the affected scope by modifying the user's shared executable environment. It may also expose later invocations to the compromised version. The documentation alone does not prove that the package is malicious; the vulnerability is the unsafe, unpinned supply-chain trust boundary. The documented credential-file access and communication with Google APIs are otherwise consistent with the Skill's declared YouTube analytics functionality. The requested OAuth scopes are read-only, with monetary-read access presented for revenue reports. No evidence in the audited file establishes transmission of credentials to unrelated endpoints, but the absent CLI implementation prevents verification of its actual secret handling and network destinations. ### Attack Path 1. An attacker compromises the npm package, its publisher account, or its releas ...[truncated 1445 chars]- Remediation
View remediation
Remediation Suggestions
- Pin the dependency to a specifically reviewed version rather than installing the mutable latest release:
bash npm install --global youtube-analytics-cli@<reviewed-version> - Verify the package name, publisher, provenance, signatures where available, and registry source before installation.
- Lock and verify the expected package integrity digest in a controlled installation process.
- Prefer a project-local, isolated installation over a global installation so the package cannot modify the user's shared executable environment.
- Vendor the reviewed CLI implementation into the audited package, or include its locked source and dependency manifest so credential and network behavior can be independently audited.
- Disable npm lifecycle scripts during installation where compatible, then explicitly review any required installation scripts.
- Run the CLI in a sandbox with restricted filesystem and network access, allowing only required Google API endpoints.
- Supply credentials only for the specific invocation, use credential files with restrictive filesystem permissions, and avoid broadly inherited environment variables.
- Grant only the OAuth scopes needed for the requested operation. Do not request the monetary-read scope unless the user explicitly requests revenue reporting.
- Document package verification and upgrade-review procedures so version changes cannot silently alter the executable code trusted with credentials.
- Pin the dependency to a specifically reviewed version rather than installing the mutable latest release:
