T08 · Insecure Dependencies
- Location
SKILL.md:46- Finding
Unpinned Global npm Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 44–47
Vulnerability Type: Supply-chain exposure through an unpinned globally installed dependency
Risk Level: MediumAffected code:
markdown ## Prerequisites 1. Install FlyAI CLI: `npm i -g @fly-ai/flyai-cli` 2. Optional richer results: `flyai config set FLYAI_API_KEY "your-key"` (keep secrets out of logs).Technical Analysis
The documented installation command retrieves the current registry-selected version of
@fly-ai/flyai-cliwithout specifying an exact version or verifying package integrity. Consequently, the code installed by two users—or by the same user at different times—can differ from the version considered during this audit.npm installation can execute package lifecycle scripts such as
preinstall,install, andpostinstall. Because the package is installed globally, a compromised future release, compromised publisher account, or registry-level substitution could execute attacker-controlled code during installation and replace the globally availableflyaiexecutable. The audited project does not contain a lockfile, integrity hash, vendored artifact, or signature-verification procedure that constrains this dependency.No evidence in the reviewed files establishes that the named package is currently malicious. The confirmed issue is the unsafe, non-reproducible dependency-installation instruction and its resulting supply-chain exposure.
Attack Path
- An attacker compromises the package publisher, publishing workflow, or another relevant npm supply-chain component.
- The attacker publishes a malicious version under the legitimate
@fly-ai/flyai-clipackage name. - A user follows
SKILL.mdand runsnpm i -g @fly-ai/flyai-cliwithout an exact version. - npm selects and downloads the attacker-controlled release.
- Malicious lifecycle code runs during installation, or the installed global
flyaicommand exe ...[truncated 910 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the CLI to a reviewed exact version, for example:
bash npm install --global @fly-ai/flyai-cli@<reviewed-exact-version> - Record and verify the expected package integrity digest or cryptographic provenance before installation.
- Prefer a project-local dependency with a committed lockfile over a global installation, then invoke it through a controlled local path.
- Review dependency provenance, maintainers, lifecycle scripts, and transitive dependencies whenever updating the pinned version.
- Perform installation and execution as an unprivileged user; do not use
sudoor an administrator shell. - Where operationally feasible, initially install with lifecycle scripts disabled and explicitly review any scripts required by the package:
bash npm install --ignore-scripts --save-exact @fly-ai/flyai-cli@<reviewed-exact-version> - Run the CLI in a sandbox with only the network, filesystem, and credential access required for hotel searches.
- Keep
FLYAI_API_KEYoutside command histories and logs, and provide it to the process through a restricted secret-management mechanism.
- Pin the CLI to a reviewed exact version, for example:
