T08 · Insecure Dependencies
- Location
SKILL.md:102- Finding
Mandatory Installation of an Unpinned Global Dependency
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 102–118
Vulnerability Type: Supply-chain exposure through automatic installation of a mutable global package
Risk Level: HighVulnerable Code
bash npm install -g @fly-ai/flyai-cli@latest --registry=https://registry.npmjs.orgThe documented permission-error fallback further recommends privileged installation:
bash sudo npm install -g @fly-ai/flyai-cli@latest --registry=https://registry.npmjs.orgTechnical Analysis
The skill requires the agent to install or upgrade
@fly-ai/flyai-clibefore performing searches. The@latesttag is mutable, so the effective package contents may change after the skill has been audited. There is no exact version pin, lockfile, integrity verification, package review, or isolation boundary.Global npm installations can run package lifecycle scripts and modify globally accessible executables and modules. The documented
sudofallback is particularly dangerous because lifecycle scripts may then execute with root privileges. This creates a supply-chain trust boundary in which compromise of the package, its maintainer account, publishing credentials, or a transitive dependency could turn ordinary skill activation into arbitrary code execution.Attack Path
- An attacker compromises the package publisher, release process, or a dependency included in a future
latestrelease. - The attacker publishes a malicious version under the package's existing name and updates the
latestdistribution tag. - A user activates the skill for a hotel-search task.
- The agent follows the mandatory installation instruction and downloads the mutable release.
- Malicious npm lifecycle code executes during installation.
- If the permission-error fallback is used, that code executes under
sudoand may obtain root privileges. - The globally installed executable can subsequently run attacker-controlled behavior whenever the skill invokes
flyai.
...[truncated 620 chars]
- An attacker compromises the package publisher, release process, or a dependency included in a future
- Remediation
View remediation
Remediation Suggestions
- Remove the requirement to install or upgrade the CLI automatically during every skill run.
- Pin the package to a reviewed exact version rather than using
@latest. - Verify package integrity using a lockfile and trusted registry integrity metadata.
- Prefer a project-local, isolated dependency over global installation.
- Run the dependency with the minimum required user privileges and disable unnecessary lifecycle scripts where feasible.
- Remove the recommendation to use
sudo npm install. - Require explicit, informed user approval before installing third-party software.
- Establish a controlled upgrade process that reviews new versions before changing the approved pin.
- Consider distributing a reviewed, reproducible artifact or invoking a constrained API directly instead of installing mutable executable code.
