T08 · Insecure Dependencies
- Location
SKILL.md:315- Finding
Unpinned Global Dependency Installation with Optional Root Privileges
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 315 and 328-329
Vulnerability Type: Unpinned third-party package installation and unsafe privilege guidance
Risk Level: HighVulnerable code snippets:
bash npm install -g @fly-ai/flyai-climarkdown | **Insufficient permissions** | Suggest using `sudo npm install -g @fly-ai/flyai-cli` or managing Node with nvm | | **Network issue** | Suggest checking the network or using the mirror `npm config set registry https://registry.npmmirror.com` |Technical Analysis
The Skill instructs users to install
@fly-ai/flyai-cliglobally without pinning an exact version or verifying an integrity hash. Consequently, the effective code installed and executed may change after the Skill itself has been reviewed.npm packages can execute lifecycle scripts during installation. A compromised package release, dependency, maintainer account, or registry response could therefore execute arbitrary code on the host. Global installation also modifies the user's shared Node.js environment rather than containing the dependency within this project.
The recommended
sudofallback increases the severity: package lifecycle scripts and installation operations may execute with root privileges. The repository provides no lockfile, vendored implementation, checksum, or dependency declaration that would permit reproducible verification of the installed payload.The mirror guidance additionally changes the user's global npm registry configuration. That persistent configuration affects unrelated future npm operations and expands the trust boundary beyond this Skill.
Attack Path
- The Skill checks whether
flyaiis available by runningwhich flyai. - If it is absent, the user is directed to install the latest available
@fly-ai/flyai-clirelease globally. - An attacker compromises the package, one of its transitive dependencies, its publisher account, ...[truncated 1252 chars]
- The Skill checks whether
- Remediation
View remediation
Remediation Suggestions
- Pin
@fly-ai/flyai-clito an exact, reviewed version rather than resolving the latest release. - Record the complete dependency graph in a lockfile and enforce integrity verification during installation.
- Declare the CLI as a project-local dependency and invoke it through a local package runner or explicit local path.
- Do not recommend
sudo npm install; preserve least privilege and fail safely when permissions are insufficient. - Avoid changing the user's global npm registry. If a mirror is necessary, scope it to an isolated command or project configuration and document the associated trust assumptions.
- Audit package lifecycle scripts, transitive dependencies, network endpoints, and data-handling behavior before permitting installation.
- Run the CLI in a sandbox or restricted execution environment with minimal filesystem, network, and environment-variable access.
- Verify package provenance using signed releases, trusted publisher controls, and approved integrity hashes.
- Pin
