T08 · Insecure Dependencies
- Location
SKILL.md:7- Finding
Unpinned Globally Installed Third-Party CLI Dependency
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 7-12
Vulnerability Type: Supply-chain exposure through an unpinned global dependency
Risk Level: MediumVulnerable Code Snippet:
yaml requirements: - name: flyai-cli version: "^1.0.0" description: "Optional dependency used to retrieve Fliggy product links" install: "npm install -g @fly-ai/flyai-cli" optional: trueTechnical Analysis
The Skill recommends installing
@fly-ai/flyai-cliglobally while allowing any package version compatible with^1.0.0. The project does not include a lockfile, integrity hash, verified package provenance, or other mechanism that ensures users install the same dependency version that was reviewed.A global npm installation makes the package's executables available system-wide for the current environment. npm package installation may also execute lifecycle scripts unless explicitly disabled. Consequently, an unexpectedly changed or compromised compatible release could execute code during installation with the privileges of the user running npm.
The dependency is explicitly optional, and the Skill does not automatically retrieve and execute a remote payload. The risk arises when a user follows the documented installation instruction.
Attack Path
- An attacker compromises the package publisher, registry account, package distribution channel, or a future compatible release.
- The attacker publishes a malicious version satisfying the
^1.0.0version range. - A user follows the documented
npm install -ginstruction. - npm resolves the compromised compatible release rather than a specifically reviewed version.
- Malicious package code or lifecycle scripts execute with the installing user's privileges.
- The globally installed executable remains available to subsequent invocations.
Impact Assessment
Successful exploitation could provide code execution with the pri ...[truncated 453 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the dependency to an exact reviewed version rather than using a caret range.
- Record and verify the package's integrity hash and trusted registry source.
- Prefer a project-local installation governed by a committed lockfile instead of a global installation.
- Verify package provenance, publisher identity, release signatures, and repository ownership before recommending installation.
- Disable npm lifecycle scripts where the package can operate without them, or review every required lifecycle script.
- Run the CLI in a sandbox or least-privileged environment with access only to resources needed for product searches.
- Document a safe upgrade and re-audit process so new versions are reviewed before the pin is changed.
