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

@depot/cli@0.0.1-cli.2.101.74

Depot CLI

AI Security Review

scanned 2h ago · by lpm-firewall-ai

The postinstall hook provisions a platform-specific Depot binary when its optional dependency is missing. It only targets the package's own binary paths and registry package names; no confirmed malicious attack surface is established.

Static reason
One or more suspicious static signals were detected.
Trigger
`npm install` runs `postinstall`; invoking `depot` executes the selected Depot binary.
Impact
Installs or runs the intended platform-specific Depot CLI binary; no source-confirmed unauthorized data access or persistence.
Mechanism
package-aligned platform-binary resolution, fallback retrieval, and execution
Rationale
The suspicious primitives implement a documented native CLI wrapper with package-scoped optional-dependency recovery. Direct inspection found no concrete malicious behavior or unconsented mutation beyond the package's own binary setup.
Evidence
package.jsoninstall.jsbin/depotlib/main.jsREADME.md
Network endpoints1
registry.npmjs.org

Decision evidence

public snapshot
AI called this Clean at 92.0% confidence as Benign with low false-positive risk.
Evidence for block
  • `package.json` runs `install.js` via `postinstall`.
  • `install.js` falls back to npm install or an npm-registry tarball for its own platform package.
  • `install.js` writes and executes the selected Depot binary shim.
Evidence against
  • Fallback downloads only `@depot/cli-*` packages at the matching package version.
  • Network target is the package-aligned `registry.npmjs.org` registry.
  • Environment reads are limited to `DEPOT_BINARY_PATH` and npm/Yarn detection.
  • No credential harvesting, exfiltration, eval/vm, AI-agent config writes, or foreign persistence found.
  • `bin/depot` and `lib/main.js` only resolve and invoke the selected Depot binary.
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