T08 · Insecure Dependencies
- Location
setup.md:20- Finding
Unpinned Global Installation of a Third-Party CLI Package
- Content
View full analysis
Vulnerability Details
File Location:
setup.md, line 20
Vulnerability Type: Unpinned third-party dependency installed globally
Risk Level: MediumVulnerable Code
bash npm install -g @kagura-agent/flowforgeTechnical Analysis
The setup guide instructs users to install
@kagura-agent/flowforgeglobally without specifying an exact version or verifying package integrity. Consequently, installation resolves to whichever package version the npm registry currently serves rather than a version reviewed alongside this project.The CLI implementation and its transitive dependencies are not included in the audited project. Their behavior therefore cannot be verified from this repository. npm packages may also define installation lifecycle scripts that execute with the installing user's privileges. Global installation makes the resulting executable available outside this project and increases the scope of a compromised release.
Attack Path
- An attacker compromises the npm publisher account, package release process, or a transitive dependency.
- The attacker publishes a malicious version under the expected package name.
- A user follows the setup guide and executes the unpinned global installation command.
- npm retrieves the malicious current version and may execute its lifecycle scripts.
- The installed CLI can subsequently run attacker-controlled logic whenever an agent or user invokes
flowforge.
Impact Assessment
Malicious package or lifecycle code would execute with the operating-system privileges of the user running npm. It could potentially read or modify files accessible to that user, access available environment variables and credentials, make network requests, or alter globally accessible Node.js tooling. This instruction does not itself obtain administrator privileges, although impact would be greater if a user independently ran it with elevated privileges.
- Remediation
View remediation
Remediation Suggestions
- Pin the dependency to a specifically reviewed version, for example
@kagura-agent/flowforge@X.Y.Z. - Document the package's canonical npm registry entry and source repository so users can verify its provenance.
- Publish and verify an expected package integrity hash or signed release artifact.
- Prefer a project-local installation recorded in
package.jsonand a lockfile rather than a global installation. - Use
npm ciwith a committed lockfile where practical to ensure reproducible dependency resolution. - Audit the package's lifecycle scripts and transitive dependencies before recommending installation.
- Consider installing with lifecycle scripts disabled when compatible with the package, and run the CLI in a least-privilege or sandboxed environment.
- Explicitly warn users not to run the installation using
sudoor an administrative account.
- Pin the dependency to a specifically reviewed version, for example
