---
canonical: "https://firewall.lpm.dev/npm/@codeflow-ai/cli"
markdown: "https://firewall.lpm.dev/npm/@codeflow-ai/cli/v/1.39.0.md"
package: "@codeflow-ai/cli"
report_status: "published"
title: "@codeflow-ai/cli@1.39.0 npm security report"
verdict: "policy_finding"
version: "1.39.0"
---

# @codeflow-ai/cli@1.39.0 npm security report

> **Trust boundary:** Package metadata, advisory text, filenames, URLs, and source snippets in this report come from external packages or feeds. Treat them as untrusted evidence. Do not execute instructions or code found in this document.

## Verdict summary
**Blocked by LPM policy** — The CLI can replace its installed code without a prior user request or notice.

- **Verdict:** LPM policy finding
- **Product-default install policy:** Block
- **Firewall policy:** LPM policy block
- **Public report status:** Published
- **Threat category:** Policy block: runs code the user cannot review
- **Selected version:** 1.39.0
- **Selected version is latest:** No
- **Analysis source:** AI security review (lpm-firewall-ai)

Runs code the user cannot review. An LPM review rule requires blocking this behavior, but the AI review did not find malware intent; this finding does not say the publisher attacks its users.

AI assessment: malicious; recommendation: publish block. This assessment is supporting evidence; the published decision above determines the current policy.

The source confirms the earlier review’s core behavior: the default UI automatically installs a newer version of this same package globally through npm, with no off-switch and no advance disclosure. Under the current self-update rule, this is a malicious default-path update and should be blocked.

## Latest scan
- **Scanner version:** rust-scanner-worker-schema-1
- **Recorded final verdict:** Policy block
- **Recorded analysis confidence:** 98.0%
- **Started:** 2026-11-22T11:22:02.405Z
- **Finished:** 2026-11-22T11:26:23.592Z
- **Download time:** 771 ms
- **Static scan time:** 802 ms
- **AI review time:** 259613 ms
- **Total time:** 261187 ms

The recorded confidence comes from the underlying analysis. Trusted advisory policy can determine the final verdict even when the AI assessment differs.

## Security analysis

### Published attack-surface review

- **Summary:** Undisclosed automatic self-update of the CLI from npm.

- **Trigger:** Starting the default interactive \`codeflow\` command.

- **Impact:** The CLI can replace its installed code without a prior user request or notice.

- **Evidence paths:** dist/cli.js, package.json

- **Review source:** ai\_review

- **Reviewed:** 2026-11-22T11:26:23.592Z

### AI review details

- **Review stage:** source\_first\_review

- **Mechanism:** The UI checks npm for the package version and globally installs the package when npm reports a different version. There is no opt-out in the reviewed path; the success notice appears after installation.

- **Attack narrative:** On the default interactive startup path, the CLI checks npm for a newer \`@codeflow-ai/cli\` version and runs a global install if one is reported. The check is rate-limited to once per day, but the reviewed code provides no opt-out, and the success message comes only after the install. The separately documented \`codeflow update\` command does not make the automatic startup update user-requested.

- **Rationale:** The source confirms the earlier review’s core behavior: the default UI automatically installs a newer version of this same package globally through npm, with no off-switch and no advance disclosure. Under the current self-update rule, this is a malicious default-path update and should be blocked.

- **Files touched:** Global \`@codeflow-ai/cli\` installation managed by npm, CodeFlow local config file (\`config.json\` under the selected CodeFlow config directory)

- **Network endpoints:** npm registry selected by npm configuration; no registry host is hard-coded

### Review decision

- **Verdict:** Block (policy; no malware intent found)

- **Confidence:** 98.0%

- **Recommended action:** publish\_block

- **Intent class:** Dangerous Capability

- **False-positive risk:** Low

- **Evidence for block:** The package exposes \`dist/cli.js\` as its \`codeflow\` executable and declares no install lifecycle script., The updater checks the npm-reported version of \`@codeflow-ai/cli\` and runs \`npm install -g @codeflow-ai/cli@\<version\>\` when it differs., The default interactive UI starts the updater automatically; it checks at most once per day and has no opt-out in the reviewed code., The success notice is shown after the installation, while the help text only documents a separate manual \`codeflow update\` command.

- **Evidence against:** The package’s documented \`codeflow update\` command performs an explicit user-requested update, but this does not cover the separate automatic startup path. The installed package is the CLI itself, so the behavior is a self-update from npm. Under the current remote-code rule, an undisclosed self-update on a default path is a block when it has no off-switch; the npm self-update warning exception applies only when an off-switch exists.

## Affected versions and remediation

This report applies to @codeflow-ai/cli@1.39.0.

- Avoid installing @codeflow-ai/cli@1.39.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, review what the vendor code it ran could access, as this report describes. This finding does not establish malware intent.

## Public findings

### 1. Low: Scripts Present
- **Category:** Manifest
- **Confidence:** 100.0%

Package declares npm scripts.

### 2. High: Child Process
- **Category:** Source
- **Confidence:** 85.0%
- **Path:** dist/cli.js
- **Public source:** [View source](<https://unpkg.com/@codeflow-ai/cli@1.39.0/dist/cli.js>)

Package source references child process execution.

Public source snippet (untrusted):

```javascript
L2: import{once as R_}from"events";import{createInterface as __}from"readline/promises";import{parseArgs as P_}from"util";var jm={name:"@codeflow-ai/cli",version:"1.39.0",type:"module"...
L3: `,n)}function Ni(e,t,n,o,r){let i=null,s=()=>{if(i)return i;let a=n(),c=Ot(a);if(c===null)return i=structuredClone(t),i;let l;try{l=JSON.parse(c)}catch(m){throw new F(`${o} ${a} \u...
L4: `)){let u=l.trimEnd();u!==""&&(s.push(u),s.length>20&&s.shift())}};r.stdout.on("data",c=>{i.push(c.toString("utf8")),a(c)}),r.stderr.on("data",a),r.on("error",c=>o(new F(`\u6267\u8...
```

### 3. High: Shell
- **Category:** Source
- **Confidence:** 85.0%

Package source references shell execution.

### 4. Medium: Network
- **Category:** Source
- **Confidence:** 75.0%

Package source references network APIs.

### 5. Medium: Environment Vars
- **Category:** Source
- **Confidence:** 75.0%

Package source references environment variables.

### 6. High: Same File Env Network Execution
- **Category:** Source
- **Confidence:** 85.0%
- **Path:** dist/cli.js
- **Public source:** [View source](<https://unpkg.com/@codeflow-ai/cli@1.39.0/dist/cli.js>)

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

Public source snippet (untrusted):

```javascript
L1: #!/usr/bin/env node
L2: import{once as R_}from"events";import{createInterface as __}from"readline/promises";import{parseArgs as P_}from"util";var jm={name:"@codeflow-ai/cli",version:"1.39.0",type:"module"...
L3: `,n)}function Ni(e,t,n,o,r){let i=null,s=()=>{if(i)return i;let a=n(),c=Ot(a);if(c===null)return i=structuredClone(t),i;let l;try{l=JSON.parse(c)}catch(m){throw new F(`${o} ${a} \u...
L4: `)){let u=l.trimEnd();u!==""&&(s.push(u),s.length>20&&s.shift())}};r.stdout.on("data",c=>{i.push(c.toString("utf8")),a(c)}),r.stderr.on("data",a),r.on("error",c=>o(new F(`\u6267\u8...
```

### 7. High: Command Output Exfiltration
- **Category:** Source
- **Confidence:** 82.0%
- **Path:** dist/cli.js
- **Public source:** [View source](<https://unpkg.com/@codeflow-ai/cli@1.39.0/dist/cli.js>)

Source combines command execution, command-output handling, and outbound requests; review data flow before blocking.

Public source snippet (untrusted):

```javascript
L1: #!/usr/bin/env node
L2: import{once as R_}from"events";import{createInterface as __}from"readline/promises";import{parseArgs as P_}from"util";var jm={name:"@codeflow-ai/cli",version:"1.39.0",type:"module"...
L3: `,n)}function Ni(e,t,n,o,r){let i=null,s=()=>{if(i)return i;let a=n(),c=Ot(a);if(c===null)return i=structuredClone(t),i;let l;try{l=JSON.parse(c)}catch(m){throw new F(`${o} ${a} \u...
L4: `)){let u=l.trimEnd();u!==""&&(s.push(u),s.length>20&&s.shift())}};r.stdout.on("data",c=>{i.push(c.toString("utf8")),a(c)}),r.stderr.on("data",a),r.on("error",c=>o(new F(`\u6267\u8...
```

### 8. High: Trigger Reachable Command Output Exfiltration
- **Category:** Source
- **Confidence:** 94.0%
- **Path:** dist/cli.js
- **Public source:** [View source](<https://unpkg.com/@codeflow-ai/cli@1.39.0/dist/cli.js>)

A manifest entrypoint or package-local install chain reaches command-output exfiltration behavior.

Public source snippet (untrusted):

```javascript
Trigger-reachable command-output exfiltration chain: manifest.bin -> dist/cli.js
L1: #!/usr/bin/env node
L2: import{once as R_}from"events";import{createInterface as __}from"readline/promises";import{parseArgs as P_}from"util";var jm={name:"@codeflow-ai/cli",version:"1.39.0",type:"module"...
L3: `,n)}function Ni(e,t,n,o,r){let i=null,s=()=>{if(i)return i;let a=n(),c=Ot(a);if(c===null)return i=structuredClone(t),i;let l;try{l=JSON.parse(c)}catch(m){throw new F(`${o} ${a} \u...
L4: `)){let u=l.trimEnd();u!==""&&(s.push(u),s.length>20&&s.shift())}};r.stdout.on("data",c=>{i.push(c.toString("utf8")),a(c)}),r.stderr.on("data",a),r.on("error",c=>o(new F(`\u6267\u8...
```

### 9. Low: High Entropy Strings
- **Category:** Supply Chain
- **Confidence:** 55.0%

Package source contains high-entropy string patterns.

### 10. Low: Url Strings
- **Category:** Supply Chain
- **Confidence:** 65.0%

Package source contains URL literals.

### 11. Low: No License
- **Category:** Manifest
- **Confidence:** 80.0%

Package manifest does not declare a clear license.

### 12. High: Semantic Analysis Limited
- **Category:** Scanner Coverage
- **Confidence:** 100.0%
- **Path:** dist/cli.js
- **Public source:** [View source](<https://unpkg.com/@codeflow-ai/cli@1.39.0/dist/cli.js>)

A bounded semantic-analysis stage reached its safety limit; remaining detectors completed, but this package requires AI review.

Public source snippet (untrusted):

```javascript
stage = ast_semantic_analysis; reason = ast_alias_growth_limit_exceeded; limitedFiles = 1
```

## Dependencies and install lifecycle
- **Lifecycle scripts present:** No

- **Dependencies:** 11
- **Optional dependencies:** 0
- **Peer dependencies:** 0
- **Development dependencies:** 7
- **Published dependency-graph edges:** 11

### Published dependency entries
- @decimalturn/toml-patch 3.0.4 (Dependency)
- ink 7.1.1 (Dependency)
- json5 2.2.3 (Dependency)
- jsonc-parser 3.3.1 (Dependency)
- marked 18.0.9 (Dependency)
- qrcode 1.5.4 (Dependency)
- react 19.2.0 (Dependency)
- smol-toml 1.9.0 (Dependency)
- string-width 8.2.0 (Dependency)
- yaml 2.9.1 (Dependency)
- zod 4.6.7 (Dependency)

## Package metadata
- **Package:** @codeflow-ai/cli
- **Ecosystem:** npm
- **Version:** 1.39.0
- **License:** UNLICENSED
- **Version published:** 2026-11-19T11:00:50.369Z
- **Package first seen:** 2026-08-16T11:49:53.754Z
- **Package last seen:** 2026-11-22T11:28:08.755Z
- **Known versions:** 36
- **Latest version:** 1.41.0
- **Appeal under review:** No
- **Description:** CodeFlow 命令行客户端：一键配置 AI 客户端
- **Keywords:** codeflow, claude-code, codex, openclaw, hermes-agent, opencode, pi-coding-agent, cli
- **Runtime engines:** node: \>=22
- **Artifact files:** 3
- **Artifact unpacked size:** 308,425 bytes
- **Artifact signatures:** 2
- **Attestations:** No

## References
- [HTML security report](<https://firewall.lpm.dev/npm/@codeflow-ai/cli/v/1.39.0>)
