registry  /  @depot/cli  /  0.0.1-cli.2.101.71

@depot/cli@0.0.1-cli.2.101.71

Depot CLI

AI Security Review

scanned 2h ago · by lpm-firewall-ai

Postinstall prepares a platform-specific Depot executable when its optional dependency is unavailable. The source shows package-local binary setup, not a confirmed malicious attack surface.

Static reason
One or more suspicious static signals were detected.
Trigger
npm postinstall; later explicit `depot` CLI/API invocation.
Impact
Writes or links the Depot executable under this package and executes it only for version validation or user invocation.
Mechanism
package-aligned platform binary resolution with npm-registry fallback download
Rationale
The install hook's child-process, filesystem, and network behavior implements fallback acquisition of the package's declared platform-specific CLI binary from npm. Source inspection found no credential theft, arbitrary remote code-loading chain, destructive action, or foreign control-surface mutation.
Evidence
package.jsoninstall.jsbin/depotlib/main.jsREADME.mdnpm-install/package.jsondownloaded-@depot-cli-*-depot
Network endpoints1
registry.npmjs.org/${pkg}/-/${pkg.replace("@depot/", "")}-${versionFromPackageJSON}.tgz

Decision evidence

public snapshot
AI called this Clean at 91.0% confidence as Benign with low false-positive risk.
Evidence for block
  • `package.json` runs `node install.js` on postinstall.
  • `install.js` can invoke npm and download a platform binary fallback.
  • `install.js` fetches `https://registry.npmjs.org/...` and writes an executable.
Evidence against
  • Fallback is limited to declared `@depot/cli-*` platform packages at the package version.
  • Network access targets the npm registry only; no credential collection or exfiltration is present.
  • Environment reads only select `DEPOT_BINARY_PATH` and package-manager metadata.
  • Runtime wrapper executes the selected Depot binary only when the user invokes the CLI/API.
  • No eval, remote script execution, AI-agent configuration mutation, or persistence beyond package-local binary setup found.
Behavioral surface
Source
ChildProcessDynamicRequireEnvironmentVarsFilesystemNetwork
Supply chain
HighEntropyStringsUrlStrings
ManifestNo manifest risk signals triggered.
scanned 2 file(s), 87.4 KB of source, external domains: nodejs.org, registry.npmjs.org, yarnpkg.com

Source & flagged code

7 flagged · loading source
package.jsonView file
scripts.postinstall = node install.js
High
Install Time Lifecycle Scripts

Package defines install-time lifecycle scripts.

package.jsonView on unpkg
scripts.postinstall = node install.js
Medium
Ambiguous Install Lifecycle Script

Install-time lifecycle script is not statically allowlisted and needs review.

package.jsonView on unpkg
install.jsView file
25// src/install.ts L26: var child_process = __toESM(require("child_process")); L27: var fs = __toESM(require("fs"));
High
Child Process

Package source references child process execution.

install.jsView on unpkg · L25
25// src/install.ts L26: var child_process = __toESM(require("child_process")); L27: var fs = __toESM(require("fs")); L28: var https = __toESM(require("https")); L29: var os2 = __toESM(require("os")); ... L35: var path = __toESM(require("path")); L36: var DEPOT_BINARY_PATH = process.env.DEPOT_BINARY_PATH || DEPOT_BINARY_PATH; L37: var isValidBinaryPath = (x) => !!x;
High
Same File Env Network Execution

A single source file combines environment access, network access, and code or shell execution; review context before blocking.

install.jsView on unpkg · L25
25Cross-file remote execution chain: install.js spawns lib/main.js; helper contains network access plus dynamic code execution. L25: // src/install.ts L26: var child_process = __toESM(require("child_process")); L27: var fs = __toESM(require("fs")); L28: var https = __toESM(require("https")); L29: var os2 = __toESM(require("os")); ... L35: var path = __toESM(require("path")); L36: var DEPOT_BINARY_PATH = process.env.DEPOT_BINARY_PATH || DEPOT_BINARY_PATH; L37: var isValidBinaryPath = (x) => !!x; ... L54: let subpath; L55: let platformKey = `${process.platform} ${os.arch()} ${os.endianness()}`; L56: if (platformKey in knownWindowsPackages) { ... L72: // src/install.ts
High
Cross File Remote Execution Context

Source spawns a local helper that also contains network and dynamic execution context; review data flow before blocking.

install.jsView on unpkg · L25
172fs.writeFileSync(path2.join(installDir, "package.json"), "{}"); L173: child_process.execSync( L174: `npm install --loglevel=error --prefer-offline --no-audit --progress=false ${pkg}@${versionFromPackageJSON}`, L175: { cwd: installDir, stdio: "pipe", env }
High
Runtime Package Install

Package source invokes a package manager install command at runtime.

install.jsView on unpkg · L172
25// src/install.ts L26: var child_process = __toESM(require("child_process")); L27: var fs = __toESM(require("fs"));
Medium
Dynamic Require

Package source references dynamic require/import behavior.

install.jsView on unpkg · L25

Findings

5 High5 Medium4 Low
HighInstall Time Lifecycle Scriptspackage.json
HighChild Processinstall.js
HighSame File Env Network Executioninstall.js
HighCross File Remote Execution Contextinstall.js
HighRuntime Package Installinstall.js
MediumAmbiguous Install Lifecycle Scriptpackage.json
MediumDynamic Requireinstall.js
MediumNetwork
MediumEnvironment Vars
MediumStructural Risk Force Deep Review
LowScripts Present
LowFilesystem
LowHigh Entropy Strings
LowUrl Strings