Loading npm security reports…
Loading npm security reports…
@claude-flow/cli@3.38.0: Agent extension lifecycle risk – flagged | LPM Firewall
npm / @claude-flow/cli / 3.38.0 Ruflo CLI - Enterprise AI agent orchestration with 60+ specialized agents, swarm coordination, MCP server, self-learning hooks, and vector memory for Claude Code
Flagged as agent extension risk
Allowed by default with warning: install-time first-party agent extension setup was detected.
AI security reviewscanned on Aug 11, 2026, 22:48 UTC · by lpm-firewall-ai The package has a real, broad Claude Code integration surface with default global mutation on explicit initialization, so it warrants a warning. Its postinstall hook is dependency-local compatibility work, and the flagged network/secret script is an unreferenced E2E test utility.
Static reason
High-risk behavior combination matched malicious policy.
Trigger
User runs the package's `init` command or later invokes its CLI after initialization.
Impact
Ruflo can influence Claude Code tool discovery and behavior through its own integration block and helpers; no unconsented install-time Claude-control-surface mutation was confirmed.
Mechanism
AI-agent instruction and helper installation/refresh.
Evidence
package.json scripts/postinstall.cjs dist/src/index.js dist/src/init/executor.js dist/src/commands/init.js plugins/ruflo-metaharness/scripts/test-with-openrouter.mjs ~/.claude/CLAUDE.md <targetDir>/CLAUDE.md <cwd>/.claude/helpers ~/.claude/helpers node_modules/agentdb/dist/*
Decision evidencepublic snapshot Evidence for warning
`init` defaults to appending a Ruflo instruction block to `~/.claude/CLAUDE.md`, a broad AI-agent control surface. The generated global block instructs Claude Code to discover and invoke Ruflo MCP tools. CLI startup can refresh previously installed project and global `.claude/helpers`. Evidence against
The global write is reached through explicit `init` and supports `--no-global` opt-out. The install hook only copies compatibility directories inside reachable `agentdb` dependencies; it does not write Claude configuration. The OpenRouter/GCP secret access is in a standalone E2E test script, not a lifecycle hook or CLI startup path. No inspected source established credential exfiltration, remote payload execution, or destructive behavior. Behavioral surface
Source Child process · Crypto · Dynamic require · Environment variables · Eval · Filesystem · Network · Shell
Supply chain High entropy strings · URL strings
Manifest No manifest risk signals triggered.
Scanned 402 files · 6.64 MB of source
35 external domains referenced
127.0.0.1 agentbbs.local aistudio.google.com api.anthropic.com api.npmjs.org api.openai.com api.pinata.cloud api.web3.storage cli.github.com cloud.google.com cloudflare-ipfs.com cognitum.one datasets-server.huggingface.co dweb.link funnel.ruv.io gateway.pinata.cloud generativelanguage.googleapis.com git-scm.com github.com html.duckduckgo.com hub.docker.com huggingface.co ipfs.io no-such-registry-9c8c43.example.invalid nodejs.org ollama.com openrouter.ai pinata.cloud raw.githubusercontent.com registry.npmjs.org storage.googleapis.com us-central1-claude-flow.cloudfunctions.net w3s.link web3.storage www.apple.com Findings2 critical · 10 high · 7 medium · 6 low Source & flagged code17 flagged High Install time lifecycle scripts
Package defines install-time lifecycle scripts.
package.json View on unpkg Medium Ambiguous install lifecycle script
Install-time lifecycle script is not statically allowlisted and needs review.
package.json View on unpkg Shared scanner record · 2 findings · 1 line scripts.postinstall = node ./scripts/postinstall.cjs
High Child process
Package source references child process execution.
dist/src/init/executor.js View on unpkg · L301 Code excerpt · 3 lines 301 // Uses node -e with git rev-parse so hooks work regardless of CWD (#1259, #1284).
302 const gitRootResolver = "var c=require('child_process'),p=require('path'),u=require('url'),r;"
303 + "try{r=c.execSync('git rev-parse --show-toplevel',{encoding:'utf8'}).trim()}"
Code excerpt · 3 lines 283 // Platform-specific command wrappers
284 // Windows: Use PowerShell-compatible commands
285 // Mac/Linux: Use bash-compatible commands with 2>/dev/null
High Trigger reachable external AI agent control surface mutation
Manifest-trigger-reachable source writes behavior-bearing configuration into a user or project AI-agent control surface.
dist/src/init/executor.js View on unpkg Scanner record · 14 lines Manifest-trigger-reachable source links an external AI-agent control path to a behavior-bearing write operation.
if (commandsconfig.agents)
commandstocopy.push(...(commands_map.agents || []));
if (commandsconfig.coordination)
commandstocopy.push(...(commands_map.coordination || []));
if (commandsconfig.hivemind)
commandstocopy.push(...(commands_map.hivemind || []));
if (commandsconfig.memory)
commandstocopy.push(...(commands_map.memory || []));
if (commandsconfig.swarm)
commandstocopy.push(...(commands_map.swarm || []));
if (commandsconfig.workflows)
commandstocopy.push(...(commands_map.workflows || []));
if (commandsconfig.pai
Medium Dynamic require
Package source references dynamic require/import behavior.
dist/src/init/executor.js View on unpkg · L231 Code excerpt · 3 lines 231 if (fs.existsSync (memDbPath)) {
232 const { repairVectorIndexes } = await import ('../memory/memory-initializer.js' );
233 await repairVectorIndexes (memDbPath, { autoRecover: true });
Low Eval
Package source references a known benign dynamic code generation pattern.
dist/src/commands/security.js View on unpkg · L224 Code excerpt · 3 lines 224 const codePatterns = [
225 { pattern: /eval\s*\(/g, type: 'Eval Usage' , severity: 'medium' , desc: 'eval() can execute arbitrary code' },
226 { pattern: /innerHTML\s*=/g, type: 'innerHTML' , severity: 'medium' , desc: 'XSS risk with innerHTML' },
High Trigger reachable persistence
A manifest entrypoint or package-local install chain reaches persistence behavior.
dist/src/commands/daemon.js View on unpkg · L7 Code excerpt · 10 lines Trigger-reachable persistence chain: manifest.main -> dist/src/index.js -> dist/src/commands/index.js -> dist/src/commands/daemon.js
7 import { resolveDaemonProjectRoot } from '../services/daemon-autostart.js' ;
8 import { fork } from 'child_process' ;
9 import { fileURLToPath } from 'url' ;
⋯
56 // ADR-174 M3: honored by WorkerDaemon's consolidate worker directly via
57 // process.env — set it now so the foreground path (which runs in this
58 // same process) picks it up too; the background path forwards it to the
High Hidden inline dependency execution
Source silently spawns a Node process to execute an inline dependency payload.
dist/src/commands/doctor.js View on unpkg · L11 Code excerpt · 12 lines 11 import { createHash } from 'crypto' ;
12 import { execSync, exec } from 'child_process' ;
13 import { promisify } from 'util' ;
⋯
23 async function runCommand (command, timeoutMs = 5000 ) {
24 const { stdout } = await execAsync (command, {
25 encoding: 'utf8' ,
26
High Copied package dependency bridge
Package metadata claims a different repository identity while copied source loads a runtime dependency bridge.
dist/src/auth/security-bridge.js View on unpkg · L30 Code excerpt · 4 lines package = @claude-flow/cli; repositoryIdentity = claude-flow; dependency = @claude-flow/security
30 try {
31 const mod = (await import ('@claude-flow/security' ));
32 if (!mod.authorizeUrl || !mod.createKeychainAdapter) {
Critical Trigger reachable excluded directory payload
A package entrypoint or install-reachable source explicitly loads and activates an executable-looking payload from a test, fixture, or hidden path.
dist/src/init/helpers-generator.js View on unpkg Scanner record · 5 lines path = dist/src/init/helpers-generator.js
kind = trigger_reachable_excluded_payload
sizeBytes = 56814
triggerReachableSource = dist/src/init/helpers-generator.js
excludedPayload = .claude/helpers/statusline-hook.sh
High External AI agent control surface mutation
Runtime or CLI source writes behavior-bearing configuration into a user or project AI-agent control surface.
dist/src/init/helpers-generator.js View on unpkg Scanner record · 27 lines Runtime or CLI code links a write operation to an explicit external AI-agent control path:
=> {
const escaped = escaperegex(tok.tolowercase());
.claude/helpers/validate-v3-config.sh View file High Payload in excluded dir
Package hides binary, compressed, or executable-looking payloads in test/fixture/hidden paths.
.claude/helpers/validate-v3-config.sh View on unpkg Scanner record · 4 lines path = .claude/helpers/validate-v3-config.sh
kind = payload_in_excluded_dir
sizeBytes = 5677
magicHex = [redacted]
Code↓
Package metadata 8 findings
Medium Network
Medium Environment variables
Medium Structural risk force deep review
Low Non install lifecycle scripts
⋯
68 const projectRoot = resolveWorkspaceFlag (ctx.flags.workspace)
69 ?? resolveDaemonProjectRoot (process.cwd ());
70 const isDaemonProcess = process.env.CLAUDE_FLOW_DAEMON === '1' ;
300 // Ignore SIGHUP on macOS/Linux — prevents daemon death when terminal
Medium Install persistence
Source writes installer persistence such as shell profile or service configuration.
dist/src/commands/daemon.js View on unpkg · L7 Code excerpt · 12 lines 7 import { resolveDaemonProjectRoot } from '../services/daemon-autostart.js' ;
8 import { fork } from 'child_process' ;
9 import { fileURLToPath } from 'url' ;
⋯
56 // ADR-174 M3: honored by WorkerDaemon's consolidate worker directly via
57 // process.env — set it now so the foreground path (which runs in this
58 // same process) picks it up too; the background path forwards it to the
⋯
68 const projectRoot = resolveWorkspaceFlag (ctx.flags.workspace)
69 ?? resolveDaemonProjectRoot (process.cwd ());
70 const isDaemonProcess = process.env.CLAUDE_FLOW_DAEMON === '1' ;
⋯
300 // Ignore SIGHUP on macOS/Linux — prevents daemon death when terminal closes (#1283)
301 if (process.platform !== 'win32' ) {
302 process.on ('SIGHUP' , () => { });
function
listOpenRouterModels
76 const resp = await fetch ('https://openrouter.ai/api/v1/models' , {
77 headers: { Authorization: `Bearer ${apiKey}` },
80 return { ok: false , status: resp.status, body: (await resp.text ()).slice (0 , 200 ) };
timeout: timeoutMs,
27 shell: process.platform === 'win32' ? 'cmd.exe' : '/bin/sh' , // Use proper shell per platform
28 env: { ...process.env }, // Explicitly inherit full environment
29 windowsHide: true , // Hide window on Windows
61 return { name: 'npm Version' , status: 'fail' , message: 'npm not found' , fix: 'Install Node.js from https://nodejs.org' };
if (/\\s|\\//.test(tok)) return escaped;
return \`\\\\b\${escaped}\\\\b\`;
return new regexp(\`(?:\${alternatives.join('|')})\`, 'i');
const compiled_patterns = task_patterns.map((entry) => ({
regex: buildpattern(entry.tokens),
function routetask(task) {
const tasklower = string(task == null ? '' : task).tolowercase();
for (const entry of compiled_patterns) {
if (entry.regex.test(tasklower)) {
reason: \`matched keyword(s) from: \${entry.tokens.join('|')}\`,