T08 · Insecure Dependencies
- Location
SKILL.md:83- Finding
Unpinned Third-Party Package Is Downloaded and Executed Through npx
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 83
Vulnerability Type: Unpinned dependency execution and software supply-chain exposure
Risk Level: MediumVulnerable Code
bash npx @fly-ai/flyai-cli keyword-search --query "马尔代夫 {已验证的岛屿名} 酒店"Technical Analysis
The Skill directs the Agent to execute
@fly-ai/flyai-clithroughnpxwithout specifying a reviewed package version. No lockfile, package integrity hash, trusted registry configuration, or package-signature verification is present.When the package is not already available locally,
npxcan retrieve it from the configured package registry and execute its installation hooks and command-line entry point. The effective code may therefore change after the Skill has been audited. Validating the island name protects against some shell metacharacter injection, but it does not protect against a compromised dependency, maintainer account, registry, or package release.Attack Path
- An attacker compromises the package maintainer account, package registry resolution, or a subsequently published version of
@fly-ai/flyai-cli. - The compromised version includes malicious installation hooks or command-line code.
- A user invokes the island-product lookup workflow.
- The Agent executes the unversioned
npx @fly-ai/flyai-clicommand. npxdownloads and runs the attacker-controlled package code with the privileges and environment of the Agent process.- The malicious dependency can access files, environment variables, network resources, and other capabilities available to that process.
Impact Assessment
Successful exploitation provides arbitrary code execution under the operating-system account running the Agent. The attainable scope includes reading or modifying files accessible to that account, accessing inherited environment variables, making outbound network requests, and tampering with generated reports or other fi ...[truncated 293 chars]
- An attacker compromises the package maintainer account, package registry resolution, or a subsequently published version of
- Remediation
View remediation
Remediation Suggestions
- Pin the dependency to an explicitly reviewed version, for example:
bash npx --yes @fly-ai/flyai-cli@X.Y.Z keyword-search --query "..." - Maintain a lockfile and verify the package tarball with a known integrity hash before execution.
- Configure an explicit trusted registry rather than relying on ambient npm configuration.
- Review the pinned package, its transitive dependencies, command-line entry point, and installation scripts.
- Disable dependency lifecycle scripts where compatible with the package:
bash npm_config_ignore_scripts=true npx --yes @fly-ai/flyai-cli@X.Y.Z ... - Run the CLI in a restricted container or sandbox with minimal filesystem access, no unnecessary credentials, and tightly limited network access.
- Prefer a documented HTTPS API with strict request and response validation over downloading executable package code at runtime.
- Define an approved-version update process so that package upgrades require review and integrity verification.
- Pin the dependency to an explicitly reviewed version, for example:
