* dream(security): denylist gaps in validateEnv() for git/perl/ruby/java env-var hijack family DENYLISTED_ENV_NAMES (v3/@claude-flow/cli-core/src/mcp-tools/validate-input.ts) covered loader-hijack and the 2026-09-21 search-path-family fix, but missed credential/arbitrary-command vars in the same git family (GIT_ASKPASS, GIT_PROXY_COMMAND), interpreter-flag-injection vars for Perl/Ruby/Java (PERL5OPT/RUBYOPT/JAVA_TOOL_OPTIONS/_JAVA_OPTIONS/JDK_JAVA_OPTIONS), two more search-path vars (PYTHONHOME, CLASSPATH), and git's numbered GIT_CONFIG_KEY_<n>/VALUE_<n>/COUNT runtime-config-injection family (added via a new regex, not a fixed name — strictly broader than any single name). PYTHONSTARTUP included for defense-in-depth with an honest caveat (interactive- REPL-only, not live-exploitable through today's non-interactive execSync path). Researched and explicitly rejected: PYTHONEXECUTABLE (cosmetic, macOS-only), PSModulePath (single-source, Grade C evidence only). 18 new discriminating tests added to validate-input-env.test.ts, matching the file's existing pattern. Stash-isolated: 18/18 fail against baseline, 51/51 pass on candidate. Full @claude-flow/cli suite: byte-identical 60-failure set baseline vs candidate (zero regressions). tsc --noEmit: 0 errors. Co-Authored-By: RuFlo <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_01S1h1otMCeN5gSX8S5gC17H * dream(security): fix-forward post-critique — correct test counts, document GIT_CONFIG_NOSYSTEM/PYTHONSTARTUP caveats Independent adversarial critic caught: (1) an arithmetic error in this session's own evaluation writeup (32 pre-existing tests, not 33; 19 new tests of which 18 discriminate, not 18 flat); (2) GIT_CONFIG_NOSYSTEM's denylist rationale was undocumented despite guidance/mod-sources.ts's git() helper setting that same var defensively elsewhere in this repo; (3) the PYTHONSTARTUP comment overclaimed that execSync's non-interactive child "cannot enter" Python's interactive mode — a caller-supplied `python3 -i` can still trigger it. All three addressed: gist corrected, source comments now document the real rationale for both. Net security conclusion for PYTHONSTARTUP unchanged (defense-in-depth, no new capability — the caller already controls the full command string). Re-verified: 51/51 tests, tsc --noEmit clean. Co-Authored-By: RuFlo <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_01S1h1otMCeN5gSX8S5gC17H * dream(security): update LEDGER.md for 2026-10-16 (#4229/#4230) Appends tonight's row, confirms #4053/#3977 merged via GitHub MCP tools, confirms no run-gap for 10-12..10-15, and flags that 10-11's own PR cited a CVE-2026-25725 that does not resolve in NVD/MITRE. Co-Authored-By: RuFlo <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_01S1h1otMCeN5gSX8S5gC17H * dream(security): fix CI — bump @claude-flow/cli-core 3.7.3->3.7.4 (leaf-package-publish audit) The "Plugin package install-safety" CI check's audit-leaf-package-publish.mjs caught that this PR's source change to v3/@claude-flow/cli-core (not bundled into the release tarballs, resolved from the registry at the version v3/@claude-flow/cli/package.json pins) left the leaf's own package.json version unchanged — per CLAUDE.md's "Publishing Rules" (ruvnet/ruflo#3335, #3390), that means a release would ship the OLD registry copy and this fix would reach nobody. PATCH bump per repo semver policy (bug fix, no API change): 3.7.3 -> 3.7.4. Updated the three places that need to agree: cli-core's own package.json, @claude-flow/cli's dependency pin, and v3/pnpm-lock.yaml's specifier for that workspace link. Re-verified: audit-leaf-package-publish.mjs clean, tsc --noEmit 0 errors, 51/51 tests pass. Co-Authored-By: RuFlo <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_01S1h1otMCeN5gSX8S5gC17H * dream(security): fix CI — bump root claude-flow's @claude-flow/cli-core range 3.7.3->3.7.4 audit-wrapper-dep-ranges.mjs (ruvnet/ruflo#2127) caught that the root claude-flow umbrella's own declared dependency range for the just-bumped @claude-flow/cli-core leaf (3.7.3) no longer includes the workspace's actual version (3.7.4) after the prior commit's bump. package-lock.json's resolved node_modules/@claude-flow/cli-core record intentionally left untouched (still 3.7.3, with its real registry integrity hash) since 3.7.4 has not actually been published yet — see the PR comment on the structural publish blocker. Re-verified all 5 install-safety audit scripts locally: clean. Co-Authored-By: RuFlo <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_01S1h1otMCeN5gSX8S5gC17H * Revert "dream(security): fix CI — bump root claude-flow's @claude-flow/cli-core range 3.7.3->3.7.4" This reverts commit9dae077cb3. * dream(security): resolve CI blocker — @claude-flow/cli-core@3.7.4 is now published A maintainer's 3.57.0 release (main advanced from1882006a0tob93144803while this PR sat open) published @claude-flow/cli-core@3.7.4 to the real npm registry, containing this exact fix (verified via `npm pack` + diff against the source on this branch). That resolves the structural blocker described in this PR's comment: the root claude-flow umbrella's own dependency range can now safely bump to match, since 3.7.4 genuinely exists — unlike three days ago, this no longer breaks root `npm ci`/ `npm install` for the rest of the CI matrix. Re-verified for real this time (not just the static audits): ran `node scripts/smoke-cli-npx-install.mjs` directly — packs the real CLI tarball and does a genuine `npm install` into a scratch project — and it now succeeds end-to-end (previously failed with ETARGET). All 5 install- safety audit scripts clean. 51/51 tests, tsc --noEmit 0 errors. Note: main's own source tree (v3/@claude-flow/cli-core/src/mcp-tools/ validate-input.ts) is still at the pre-fix 3.7.3 content as of this commit — only the npm registry got the fix early, via whatever process published 3.7.4. Merging this PR is what reconciles main's source with what's already shipped to real users. Co-Authored-By: RuFlo <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_01S1h1otMCeN5gSX8S5gC17H --------- Co-authored-by: Claude <noreply@anthropic.com>
@claude-flow/cli-core
Status: alpha (pre-release). Tracking ADR-100. Don't depend on this in production yet.
Lightweight core CLI surface for Claude Flow — memory + hooks commands only. Designed to load fast on a cold npx cache so plugin skills don't race Claude Code's 30 second MCP-startup timeout.
Why a separate package?
Issue #1748 #3 documented a silent failure mode for new users: npx claude-flow@latest mcp start from a cold npx cache regularly exceeds 30 seconds (1.8 MB / 999 files), Claude Code's MCP startup timeout fires, zero tools register, and the user observes "Ruflo is broken — no MCP tools available."
@claude-flow/cli-core is a ≤250 KB packed subset containing only what plugin skills actually call: memory store/list/retrieve/search/delete/init and the hooks family (route, model-outcome, post-edit, pre-task, etc.). On a cold cache, npx @claude-flow/cli-core@alpha memory store ... should complete in under 5 seconds — well under the timeout.
Install
# Pre-release alpha
npm install @claude-flow/cli-core@alpha
# Or just npx-invoke directly from a plugin Bash block
npx @claude-flow/cli-core@alpha memory store --key x --value 1 --namespace patterns
What's included
| Category | Commands |
|---|---|
memory |
store, list, retrieve, search, delete, init, migrate, stats, configure, cleanup, compress, export, import |
hooks |
route, pre-task, post-task, pre-edit, post-edit, pre-command, post-command, model-outcome, model-route, model-stats, worker-*, intelligence_*, plus 12 background-worker dispatchers |
What's NOT included (use @claude-flow/cli for these)
swarm,hive-mind,agent,task,coordination— multi-agent orchestrationneural,embeddings,intelligence— full ML surfacefederation,claims,aidefence— cross-installation featuresbrowser,wasm,rvf— sandbox + browser automationinit,migrate,doctor,daemon,deployment— lifecycle managementperformance,security,providers,plugins,config— admin surface
For any of these, install @claude-flow/cli@alpha (the metapackage that re-exports cli-core and lazy-loads everything else).
Compatibility
@claude-flow/cli-core@3.7.0-alpha.x ships in lockstep with @claude-flow/cli@3.7.0-alpha.x. Once promoted from alpha → latest, the two packages will continue to share the major.minor line.
Verification
# Cold cache test — clear npx cache first
rm -rf ~/.npm/_npx
time npx @claude-flow/cli-core@alpha memory store --key smoke --value test --namespace test
# Expected: <5 seconds wall-time on typical broadband
Documentation
- ADR-100 — cli-core split — design rationale
- MIGRATION.md — concrete diff + env-flag pattern for switching plugin scripts
- Issue #1748 — the bug this package addresses
- Issue #1760 — alpha tracking issue (status, benchmarks, fire-by-fire progress)
- Main
@claude-flow/cliREADME — full feature list
License
MIT