---
canonical: "https://firewall.lpm.dev/npm/@maind-dev/cli/v/0.166.0"
markdown: "https://firewall.lpm.dev/npm/@maind-dev/cli/v/0.166.0.md"
package: "@maind-dev/cli"
report_status: "published"
title: "@maind-dev/cli@0.166.0 npm security report"
verdict: "clean"
version: "0.166.0"
---

# @maind-dev/cli@0.166.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
**Allowed — no malicious behavior detected** — 20 low-signal patterns reviewed and cleared.

- **Verdict:** Clean
- **Product-default install policy:** Allow
- **Firewall policy:** No policy match
- **Public report status:** Published
- **Threat category:** None published
- **Selected version:** 0.166.0
- **Selected version is latest:** No
- **Analysis source:** AI security review (lpm-firewall-ai)

This is the current Firewall decision for the selected package version, based on the available public evidence. Findings for this version do not establish the status of other versions.

AI assessment: clean; recommendation: mark clean. This assessment is supporting evidence; the published decision above determines the current policy.

The flagged credential and network behavior fits the CLI’s documented maind service functions. Session uploads occur only through the explicit backfill command and go to maind’s ingest endpoint; no malicious default behavior was found.

## Latest scan
- **Scanner version:** rust-scanner-worker-schema-1
- **Recorded final verdict:** Clean
- **Recorded analysis confidence:** 91.0%
- **Started:** 2026-11-15T08:32:57.688Z
- **Finished:** 2026-11-15T08:36:13.303Z
- **Download time:** 501 ms
- **Static scan time:** 2575 ms
- **AI review time:** 192538 ms
- **Total time:** 195615 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:** No attack identified. The package provides a maind CLI, including an explicit session backfill command that sends feature data to maind.

- **Trigger:** The user runs `maind sessions backfill`; it does not run from an install hook.

- **Impact:** Session data is sent to the service for the requested backfill feature; no unrelated credential theft or automatic exfiltration was identified.

- **Review source:** ai\_review

- **Reviewed:** 2026-11-15T08:36:13.303Z

### AI review details

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

- **Mechanism:** The command reads local Claude Code and Codex session data and posts backfill data using MAIND\_API\_KEY to MAIND\_INGEST\_URL or the default maind ingest service.

- **Rationale:** The flagged credential and network behavior fits the CLI’s documented maind service functions. Session uploads occur only through the explicit backfill command and go to maind’s ingest endpoint; no malicious default behavior was found.

- **Files touched:** ~/.claude/projects, CODEX\_HOME/sessions or ~/.codex/sessions

- **Network endpoints:** https://fn.maind.dev/functions/v1/mcp-client-metrics-ingest, MAIND\_INGEST\_URL (user-configured override)

### Review decision

- **Verdict:** Clean

- **Confidence:** 91.0%

- **Recommended action:** mark\_clean

- **Intent class:** Benign

- **False-positive risk:** Low

- **Evidence for AI clean decision:** The package is a CLI whose declared main and executable are build/index.js; its only lifecycle script is prepublishOnly, which runs the build., Transcript backfill is dispatched only for the explicit `maind sessions backfill` command., Backfill posts data with the MAIND API key to the configured ingest endpoint, defaulting to the package vendor’s fn.maind.dev service., The CLI description identifies maind as its service and says it authenticates with MAIND\_API\_KEY.

- **Evidence against:** The bundled CLI reads local Claude Code transcripts and Codex sessions for the backfill feature; titles are content-derived and can be included in uploads. The feature is explicitly invoked by the user.

## Affected versions and remediation

This report applies to @maind-dev/cli@0.166.0.

- No action is needed for @maind-dev/cli@0.166.0. Pin the version in your lockfile and check new releases as they are scanned.

## Public findings

These are automated scan signals. The review checked each one and found no malicious behavior, so all of them are cleared.

### 1. Low: Non Install Lifecycle Scripts (cleared)
- **Status:** Cleared by review: an automated scan signal, not a confirmed behavior
- **Category:** Manifest
- **Confidence:** 80.0%

Package declares lifecycle scripts that are not normally run for registry tarball installs.

### 2. Low: Scripts Present (cleared)
- **Status:** Cleared by review: an automated scan signal, not a confirmed behavior
- **Category:** Manifest
- **Confidence:** 100.0%

Package declares npm scripts.

### 3. High: Child Process (cleared)
- **Status:** Cleared by review: an automated scan signal, not a confirmed behavior
- **Category:** Source
- **Confidence:** 85.0%
- **Path:** build/index.js
- **Public source:** [View source](<https://unpkg.com/@maind-dev/cli@0.166.0/build/index.js>)

Package source references child process execution.

Public source snippet (untrusted):

```javascript
L1: #!/usr/bin/env node
L2: var R_=Object.defineProperty;var a=(e,t)=>R_(e,"name",{value:t,configurable:!0});var IL=(e,t)=>{for(var n in t)R_(e,n,{get:t[n],enumerable:!0})};import{execFileSync as zee}from"nod...
L3: `).filter(t=>t.trim()!==""&&!V1.test(t.trim())).join(`
```

### 4. High: Shell (cleared)
- **Status:** Cleared by review: an automated scan signal, not a confirmed behavior
- **Category:** Source
- **Confidence:** 85.0%
- **Path:** build/index.js
- **Public source:** [View source](<https://unpkg.com/@maind-dev/cli@0.166.0/build/index.js>)

Package source references shell execution.

Public source snippet (untrusted):

```javascript
L528: `)){let o=r.replace(/^maind:\s*/,"").trim();if(o==="")continue;let i=n!=="unknown"&&n!==0,s=/\bHTTP [45]\d\d\b|\berror\b|could not|\bfailed\b/i.test(o);this.text(o,i||s?"warn":n===...
L529: `),!0}catch{return!1}}a(zi,"claimWatch");function el(e,t){let n=Hb(e);if(!n)return;let r=rn(e);if(!(r===null||r.pid!==t.pid||r.head!==t.head))try{oJ(n,{force:!0})}catch{}}a(el,"rel...
L530: `)}a(E,"note");function P(e,t,n,r=12e4){try{return Gd(e,t,{cwd:n,encoding:"utf8",stdio:["ignore","pipe","ignore"],timeout:r}).trim()}catch{return null}}a(P,"sh");function il(e,t,n)...
```

### 5. Medium: Dynamic Require (cleared)
- **Status:** Cleared by review: an automated scan signal, not a confirmed behavior
- **Category:** Source
- **Confidence:** 75.0%
- **Path:** build/index.js
- **Public source:** [View source](<https://unpkg.com/@maind-dev/cli@0.166.0/build/index.js>)

Package source references dynamic require/import behavior.

Public source snippet (untrusted):

```javascript
L189: size = excluded.size,
L190: indexed_at = excluded.indexed_at`)),this._upsertFile}};import{randomUUID as AW}from"node:crypto";import{createHash as EW}from"node:crypto";function ui(e){return EW("sha256").update...
L191: `){if(i.length>0){let u=e.slice(o+1).split(`
```

### 6. Medium: Network (cleared)
- **Status:** Cleared by review: an automated scan signal, not a confirmed behavior
- **Category:** Source
- **Confidence:** 75.0%

Package source references network APIs.

### 7. Medium: Environment Vars (cleared)
- **Status:** Cleared by review: an automated scan signal, not a confirmed behavior
- **Category:** Source
- **Confidence:** 75.0%

Package source references environment variables.

### 8. Low: Filesystem (cleared)
- **Status:** Cleared by review: an automated scan signal, not a confirmed behavior
- **Category:** Source
- **Confidence:** 70.0%

Package source references filesystem APIs.

### 9. High: Same File Env Network Execution (cleared)
- **Status:** Cleared by review: an automated scan signal, not a confirmed behavior
- **Category:** Source
- **Confidence:** 85.0%
- **Path:** build/index.js
- **Public source:** [View source](<https://unpkg.com/@maind-dev/cli@0.166.0/build/index.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: var R_=Object.defineProperty;var a=(e,t)=>R_(e,"name",{value:t,configurable:!0});var IL=(e,t)=>{for(var n in t)R_(e,n,{get:t[n],enumerable:!0})};import{execFileSync as zee}from"nod...
L3: `).filter(t=>t.trim()!==""&&!V1.test(t.trim())).join(`
```

### 10. Critical: Hardcoded Runtime Data Exfiltration (cleared)
- **Status:** Cleared by review: an automated scan signal, not a confirmed behavior
- **Category:** Source
- **Confidence:** 94.0%
- **Path:** build/index.js
- **Public source:** [View source](<https://unpkg.com/@maind-dev/cli@0.166.0/build/index.js>)

Source sends credentials or rich application records to a package-controlled external receiver enabled by default.

Public source snippet (untrusted):

```javascript
Source sends the broad process environment to a literal external destination.
L1: #!/usr/bin/env node
L2: var R_=Object.defineProperty;var a=(e,t)=>R_(e,"name",{value:t,configurable:!0});var IL=(e,t)=>{for(var n in t)R_(e,n,{get:t[n],enumerable:!0})};import{execFileSync as zee}from"nod...
L3: `).filter(t=>t.trim()!==""&&!V1.test(t.trim())).join(`
...
L27: `)){if(c.startsWith("diff --git ")){l(),i=!1,s=!1;continue}if(c.startsWith("new file mode")){s=!0;continue}if(c.startsWith("rename to ")){i=!0;continue}if(c.startsWith("Binary file...
L28: `),y=Sx(b[0]??"");if(!y)continue;let k=b.slice(1).filter(_=>_.trim().length>0).length;m.push({sha:y.sha,dateIso:y.dateIso,authorName:y.authorName,subject:y.subject,filesTouched:k})...
L29: `))if(o.startsWith("worktree "))r(),n={path:o.slice(9).trim(),de
```

### 11. Critical: Credential Exfiltration (cleared)
- **Status:** Cleared by review: an automated scan signal, not a confirmed behavior
- **Category:** Source
- **Confidence:** 90.0%
- **Path:** build/index.js
- **Public source:** [View source](<https://unpkg.com/@maind-dev/cli@0.166.0/build/index.js>)

Source appears to send environment or credential material to an external endpoint.

Public source snippet (untrusted):

```javascript
L1: #!/usr/bin/env node
L2: var R_=Object.defineProperty;var a=(e,t)=>R_(e,"name",{value:t,configurable:!0});var IL=(e,t)=>{for(var n in t)R_(e,n,{get:t[n],enumerable:!0})};import{execFileSync as zee}from"nod...
L3: `).filter(t=>t.trim()!==""&&!V1.test(t.trim())).join(`
...
L27: `)){if(c.startsWith("diff --git ")){l(),i=!1,s=!1;continue}if(c.startsWith("new file mode")){s=!0;continue}if(c.startsWith("rename to ")){i=!0;continue}if(c.startsWith("Binary file...
L28: `),y=Sx(b[0]??"");if(!y)continue;let k=b.slice(1).filter(_=>_.trim().length>0).length;m.push({sha:y.sha,dateIso:y.dateIso,authorName:y.authorName,subject:y.subject,filesTouched:k})...
L29: `))if(o.startsWith("worktree "))r(),n={path:o.slice(9).trim(),detached:!1};else if(n)o.startsWith("branch ")?n.branch=o.slice(7).trim().replac
```

### 12. High: Command Output Exfiltration (cleared)
- **Status:** Cleared by review: an automated scan signal, not a confirmed behavior
- **Category:** Source
- **Confidence:** 82.0%
- **Path:** build/index.js
- **Public source:** [View source](<https://unpkg.com/@maind-dev/cli@0.166.0/build/index.js>)

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

Public source snippet (untrusted):

```javascript
L140: );
L141: `,oo="schema_version",ii="last_index_commit",Ic="last_indexed_at",Fs="edges_dirty",bh="resolve_config_fp",Nc="embed_recipe_version",Dc="embed_model",Mc="embed_dim",kh="last_synced_...
L142: `).filter(k=>k.length>0);if(y.length!==m.length)return null;m.forEach((k,_)=>h.set(k,y[_].trim()))}return n.map((b,y)=>{let k=p[y],_=h.get(b);return{path:b,work:_?{mode:k.exec?"100...
...
L145: `))i.startsWith("worktree ")?r=i.slice(9):i.startsWith("branch ")&&(o=i.slice(7).replace(/^refs\/heads\//,""));if(!r||!o)return null;for(let i of t.split(`
L146: `)){let[s,l,c]=i.split("	");if(s?.trim()!==o)continue;let u=eE(l??""),d=c?.trim()??"";return u===null||u.behind===0||d.length===0?null:{path:r,branch:o,upstream:d,behind:u.behind,a...
L147: `,1)[0]??"";return t.length>300?`${t.slice(0,300)
```

### 13. High: Sandbox Evasion Gated Capability (cleared)
- **Status:** Cleared by review: an automated scan signal, not a confirmed behavior
- **Category:** Source
- **Confidence:** 84.0%
- **Path:** build/index.js
- **Public source:** [View source](<https://unpkg.com/@maind-dev/cli@0.166.0/build/index.js>)

Source gates dangerous network, credential, or execution behavior behind CI, host, platform, time, or geo fingerprint checks.

Public source snippet (untrusted):

```javascript
L1: #!/usr/bin/env node
L2: var R_=Object.defineProperty;var a=(e,t)=>R_(e,"name",{value:t,configurable:!0});var IL=(e,t)=>{for(var n in t)R_(e,n,{get:t[n],enumerable:!0})};import{execFileSync as zee}from"nod...
L3: `).filter(t=>t.trim()!==""&&!V1.test(t.trim())).join(`
...
L27: `)){if(c.startsWith("diff --git ")){l(),i=!1,s=!1;continue}if(c.startsWith("new file mode")){s=!0;continue}if(c.startsWith("rename to ")){i=!0;continue}if(c.startsWith("Binary file...
L28: `),y=Sx(b[0]??"");if(!y)continue;let k=b.slice(1).filter(_=>_.trim().length>0).length;m.push({sha:y.sha,dateIso:y.dateIso,authorName:y.authorName,subject:y.subject,filesTouched:k})...
L29: `))if(o.startsWith("worktree "))r(),n={path:o.slice(9).trim(),detached:!1};else if(n)o.startsWith("branch ")?n.branch=o.slice(7).trim().replac
```

### 14. Critical: Trigger Reachable Dangerous Capability (cleared)
- **Status:** Cleared by review: an automated scan signal, not a confirmed behavior
- **Category:** Source
- **Confidence:** 90.0%
- **Path:** build/index.js
- **Public source:** [View source](<https://unpkg.com/@maind-dev/cli@0.166.0/build/index.js>)

A package entrypoint or install-time lifecycle script reaches a source file with blocking dangerous behavior.

Public source snippet (untrusted):

```javascript
Trigger-reachable chain: scripts.start -> build/index.js
L1: #!/usr/bin/env node
L2: var R_=Object.defineProperty;var a=(e,t)=>R_(e,"name",{value:t,configurable:!0});var IL=(e,t)=>{for(var n in t)R_(e,n,{get:t[n],enumerable:!0})};import{execFileSync as zee}from"nod...
L3: `).filter(t=>t.trim()!==""&&!V1.test(t.trim())).join(`
...
L27: `)){if(c.startsWith("diff --git ")){l(),i=!1,s=!1;continue}if(c.startsWith("new file mode")){s=!0;continue}if(c.startsWith("rename to ")){i=!0;continue}if(c.startsWith("Binary file...
L28: `),y=Sx(b[0]??"");if(!y)continue;let k=b.slice(1).filter(_=>_.trim().length>0).length;m.push({sha:y.sha,dateIso:y.dateIso,authorName:y.authorName,subject:y.subject,filesTouched:k})...
L29: `))if(o.startsWith("worktree "))r(),n={path:o.slice(9).trim(),detached:!1};else if(n)
```

### 15. High: Trigger Reachable Credential Exfiltration (cleared)
- **Status:** Cleared by review: an automated scan signal, not a confirmed behavior
- **Category:** Source
- **Confidence:** 94.0%
- **Path:** build/index.js
- **Public source:** [View source](<https://unpkg.com/@maind-dev/cli@0.166.0/build/index.js>)

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

Public source snippet (untrusted):

```javascript
Trigger-reachable credential exfiltration chain: scripts.start -> build/index.js
L1: #!/usr/bin/env node
L2: var R_=Object.defineProperty;var a=(e,t)=>R_(e,"name",{value:t,configurable:!0});var IL=(e,t)=>{for(var n in t)R_(e,n,{get:t[n],enumerable:!0})};import{execFileSync as zee}from"nod...
L3: `).filter(t=>t.trim()!==""&&!V1.test(t.trim())).join(`
...
L27: `)){if(c.startsWith("diff --git ")){l(),i=!1,s=!1;continue}if(c.startsWith("new file mode")){s=!0;continue}if(c.startsWith("rename to ")){i=!0;continue}if(c.startsWith("Binary file...
L28: `),y=Sx(b[0]??"");if(!y)continue;let k=b.slice(1).filter(_=>_.trim().length>0).length;m.push({sha:y.sha,dateIso:y.dateIso,authorName:y.authorName,subject:y.subject,filesTouched:k})...
L29: `))if(o.startsWith("worktree "))r(),n={path:o.slice(9).trim()
```

### 16. High: Trigger Reachable Command Output Exfiltration (cleared)
- **Status:** Cleared by review: an automated scan signal, not a confirmed behavior
- **Category:** Source
- **Confidence:** 94.0%
- **Path:** build/index.js
- **Public source:** [View source](<https://unpkg.com/@maind-dev/cli@0.166.0/build/index.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: scripts.start -> build/index.js
L140: );
L141: `,oo="schema_version",ii="last_index_commit",Ic="last_indexed_at",Fs="edges_dirty",bh="resolve_config_fp",Nc="embed_recipe_version",Dc="embed_model",Mc="embed_dim",kh="last_synced_...
L142: `).filter(k=>k.length>0);if(y.length!==m.length)return null;m.forEach((k,_)=>h.set(k,y[_].trim()))}return n.map((b,y)=>{let k=p[y],_=h.get(b);return{path:b,work:_?{mode:k.exec?"100...
...
L145: `))i.startsWith("worktree ")?r=i.slice(9):i.startsWith("branch ")&&(o=i.slice(7).replace(/^refs\/heads\//,""));if(!r||!o)return null;for(let i of t.split(`
L146: `)){let[s,l,c]=i.split("	");if(s?.trim()!==o)continue;let u=eE(l??""),d=c?.trim()??"";return u===null||u.behind===0||d.length===0?null:{path:r,branch:o,up
```

### 17. Low: High Entropy Strings (cleared)
- **Status:** Cleared by review: an automated scan signal, not a confirmed behavior
- **Category:** Supply Chain
- **Confidence:** 55.0%

Package source contains high-entropy string patterns.

### 18. Low: Url Strings (cleared)
- **Status:** Cleared by review: an automated scan signal, not a confirmed behavior
- **Category:** Supply Chain
- **Confidence:** 65.0%

Package source contains URL literals.

### 19. Medium: Structural Risk Force Deep Review (cleared)
- **Status:** Cleared by review: an automated scan signal, not a confirmed behavior
- **Category:** Artifact Inventory
- **Confidence:** 100.0%

Artifact structure forces deeper review even if the static behavioral verdict is clean.

### 20. Low: No License (cleared)
- **Status:** Cleared by review: an automated scan signal, not a confirmed behavior
- **Category:** Manifest
- **Confidence:** 80.0%

Package manifest does not declare a clear license.

## Dependencies and install lifecycle
- **Lifecycle scripts present:** Yes
- **Published lifecycle scripts:** prepublishOnly
- **Dependencies:** 3
- **Optional dependencies:** 0
- **Peer dependencies:** 0
- **Development dependencies:** 16
- **Published dependency-graph edges:** 3

### Published dependency entries
- better-sqlite3 ^12.11.1 (Dependency)
- tree-sitter-wasms 0.1.13 (Dependency)
- web-tree-sitter 0.24.7 (Dependency)

## Package metadata
- **Package:** @maind-dev/cli
- **Ecosystem:** npm
- **Version:** 0.166.0
- **License:** SEE LICENSE IN LICENSE
- **Version published:** 2026-11-15T08:31:24.896Z
- **Package first seen:** 2026-07-15T17:50:50.264Z
- **Package last seen:** 2026-11-23T07:03:37.800Z
- **Known versions:** 148
- **Latest version:** 0.190.0
- **Appeal under review:** No
- **Description:** Headless maind CLI — pull stack-relevant lessons into CI runners, report CI outcomes, brief agents on local git state (branch, PRs, peers), and launch coding agents behind a local NVIDIA NeMo Switchyard routing proxy. No device flow; authenticates from MA
- **Maintainers:** alexbernhard
- **Keywords:** mcp, maind, ci, cli, context
- **Runtime engines:** node: \>=20.0.0
- **Artifact files:** 5
- **Artifact unpacked size:** 1,309,571 bytes
- **Artifact signatures:** 2
- **Attestations:** No

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