@factory/cli@1.3.0
Factory Droid CLI - AI-powered software engineering agent
AI Security Review
scanned 19h ago · by lpm-firewall-aiThe automatic postinstall fallback can send NPM_TOKEN to a non-npm host because it checks for `npmjs.org` as a substring and follows response redirects through the same helper. The intended binary download is ordinary CLI setup, but this credential disclosure path warrants blocking.
Decision evidence
public snapshot- The postinstall hook runs install.js automatically.
- install.js attaches NPM_TOKEN when the request hostname contains the substring npmjs.org, without checking that it is the actual npm registry host.
- The fallback obtains a tarball URL from npm metadata, then follows redirects by recursively calling the same request helper; a deceptive redirect hostname containing npmjs.org can therefore receive NPM_TOKEN.
- When the optional platform dependency is missing, the install hook automatically invokes the fallback download.
- The intended request destination is the official registry host registry.npmjs.org, and the token is described as helping bypass rate limits.
- The fallback downloads a platform-specific CLI binary and extracts it into the package's bin directory, consistent with the package's stated purpose.
- The script's normal Unix optimization replaces the CLI shim with a link to that binary.
Source & flagged code
9 flaggedPackage defines install-time lifecycle scripts.
package.jsonView on unpkgInstall-time source downloads a native archive from a fixed external host without transport verification, extracts it, and installs an executable payload.
package.jsonView on unpkg · L9Install-time lifecycle script is not statically allowlisted and needs review.
Findings
Affected versions and remediation
This report applies to @factory/cli@1.3.0.
See all versions of @factory/cli for other recorded verdicts.
- Avoid installing @factory/cli@1.3.0. Remove it from direct dependencies and check your lockfile for transitive copies.
- Choose an independently verified alternative or release. This report does not establish that other versions are safe.
- If this version ran, investigate the affected machine and build environment. Rotate credentials it could access and rebuild from a trusted environment.
Evidence last updated: .
Think this verdict is wrong? Dispute it on GitHub or read how reports are produced.