@factory/cli@1.0.0
Factory Droid CLI - AI-powered software engineering agent
AI Security Review
scanned 6d ago · by lpm-firewall-aiThe package’s install hook is for obtaining and linking its platform binary, but its NPM_TOKEN check accepts any hostname containing "npmjs.org" and applies to metadata-selected URLs and redirects. This creates a conditional credential disclosure risk, though the source does not show an attacker-controlled destination in the normal npm flow.
Decision evidence
public snapshot- The postinstall hook automatically runs install.js.
- When NPM_TOKEN is set, install.js adds it as a Bearer token whenever the requested hostname contains the string "npmjs.org"; it does not require an exact registry hostname.
- The fallback download takes its tarball URL from npm metadata and passes it to the request helper; redirects are also passed back to that helper.
- The fallback runs when the platform binary is unavailable, so the token-forwarding path can run during installation.
- The script describes its purpose as installing and linking the platform-specific CLI binary.
- The initial metadata request goes to registry.npmjs.org, and the NPM_TOKEN header is intended to bypass registry rate limits.
- The fallback only runs when the optional platform binary is missing; the package declares platform binaries as optional dependencies.
Source & flagged code
7 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.0.0.
See all versions of @factory/cli for other recorded verdicts.
- Review the evidence and your use of @factory/cli@1.0.0 before allowing it. Restrict the permissions described in this report.
- Choose an independently verified alternative or release. This report does not establish that other versions are safe.
Evidence last updated: .
Think this verdict is wrong? Dispute it on GitHub or read how reports are produced.