T08 · Insecure Dependencies
- Location
SKILL.md:4- Finding
Unpinned Global Installation of a Third-Party CLI Package
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 4, 30, and 46
Vulnerability Type: Unpinned third-party dependency installed globally
Risk Level: MediumVulnerable Code
yaml compatibility: 需要 flyai-cli 已安装 (npm i -g @fly-ai/flyai-cli)markdown - 需要 `flyai-cli` 已安装:`npm i -g @fly-ai/flyai-cli`text npm i -g @fly-ai/flyai-cliTechnical Analysis
The skill repeatedly directs users or agents to install
@fly-ai/flyai-cliglobally without specifying an exact version or verifying package integrity. Consequently, npm resolves the package version from the registry at installation time, and the installed code may differ from the version reviewed when this skill was published.npm packages can define lifecycle scripts such as
preinstall,install, andpostinstall. These scripts execute during installation with the privileges of the account running npm. A global installation also places executable files in a shared system- or user-level npm location, increasing the package's reach beyond this individual skill.This is a supply-chain exposure rather than evidence that the named package is currently malicious. Exploitation depends on a malicious or compromised package release, registry/account compromise, or another upstream dependency compromise. The skill does not automatically execute the installation command, so exploitation also requires a user or agent to follow the documented setup or troubleshooting instructions.
Attack Path
- An attacker compromises the npm publisher account, package release process, or an upstream dependency associated with
@fly-ai/flyai-cli. - The attacker publishes a malicious version under the same package name or causes a malicious transitive dependency to be selected.
- A user or agent follows the setup or troubleshooting instructions and runs:
bash npm i -g @fly-ai/flyai-cli - npm selects the current reg ...[truncated 1282 chars]
- An attacker compromises the npm publisher account, package release process, or an upstream dependency associated with
- Remediation
View remediation
Remediation Suggestions
-
Pin the CLI to a specifically reviewed version:
bash npm install --global @fly-ai/flyai-cli@<reviewed-version> -
Record and verify the expected package integrity digest before installation. Where practical, use a lockfile and an installation method that enforces locked versions and integrity metadata.
-
Prefer a project-local dependency over a global installation:
bash npm install --save-exact @fly-ai/flyai-cli@<reviewed-version>Invoke the local binary through a controlled script or an explicitly pinned package runner.
-
Do not automatically upgrade the CLI as a troubleshooting step. Require review and testing before changing the pinned version.
-
Avoid running npm with administrator or root privileges. Execute installation and the CLI in a restricted account, container, or sandbox with only the filesystem and network access required for train searches.
-
Review the package's lifecycle scripts, published provenance, maintainers, transitive dependencies, and registry source before approving a version.
-
Configure an explicit trusted npm registry and disable lifecycle scripts during installation where compatible:
bash npm install --global --ignore-scripts @fly-ai/flyai-cli@<reviewed-version>If lifecycle scripts are required, inspect them before permitting execution.
-
Validate API responses and restrict booking URLs to an allowlist of expected HTTPS domains before displaying them to users.
-
