v3.6.25

ruvnet/ruflov3.6.25May 4, 2026by ruvnet

AI Summary

This release focuses on security hardening, encryption at rest, and federation budget controls. Key improvements include closing shell-injection vulnerabilities across multiple surfaces, implementing AES-256-GCM encryption for high-tier stores, adding a federation budget circuit breaker to prevent recursive delegation loops, and fixing 25 pre-existing test failures.

Key Highlights

  • Security hardening: shell-injection vulnerabilities closed via execFileSync migration, loader-hijack vars blocked, secure file permissions (0600/0700), stdin/OOM protection, and safe package verification
  • Encryption at rest: AES-256-GCM vault with opt-in via CLAUDE_FLOW_ENCRYPT_AT_REST=1, encrypting sessions, terminals, and memory.db with 76 dedicated tests
  • Federation budget circuit breaker: maxHops default of 8 prevents recursive delegation loops, atomic check-and-decrement for concurrent sends, 41 dedicated tests
  • Test infrastructure: 25 pre-existing test failures cleared, suite now 1933/1933 passing
  • Performance: Dynamic-import cleanup providing ~2µs speedup per call (423× speedup on cleared sites)

New Features

  • Shell injection prevention via execFileSync('cmd', argv) in github-safe.js, statusline.js/cjs, github-tools MCP, and update/executor
  • LD_PRELOAD, NODE_OPTIONS, DYLD_* loader-hijack var blocking at terminal_create boundary
  • fs-secure.ts module for mode 0600 files / 0700 directories
  • MCP stdin handler caps un-newlined buffer at 10MB
  • Fetch sites have explicit AbortSignal.timeout budgets
  • isSafePackageSpec regex check gates package installs
  • AES-256-GCM vault with magic-byte format (RFE1) for backward-compatible migration
  • Encrypted stores: sessions/*.json, terminals/store.json, swarm/memory.db with SQL.js and ONNX embeddings
  • federation_send accepts budget/maxHops/hopCount/spent metadata with default maxHops:8
  • validateBudget rejects NaN, ±Infinity, negatives, non-integers, oversized values
  • Constant-string error reasons (HOP_LIMIT_EXCEEDED, BUDGET_EXCEEDED, INVALID_BUDGET) preventing oracle leaks
  • Vitest config externalizes optional dynamic imports
  • verification.md expanded to 300 MCP tools / 49 CLI commands / 32 plugins / 43 agents
  • New docs/STATUS.md covering overview and usage
  • ruflo-federation Claude Code plugin v0.2.0 with budget-options docs

Full Release Notes

22 commits since 3.6.24. Test baseline: **1933 / 1933 passing**, 0 failures, 46 intentionally skipped.

## What's new

### Security hardening (audit_1776853149979 closure)

- `github-safe.js`, `statusline.js/cjs`, `github-tools` MCP, and `update/executor` all migrated from `execSync(shellString)` to `execFileSync('cmd', argv)` — closing the shell-injection class across the affected surfaces.
- `validateEnv()` denies `LD_PRELOAD`, `NODE_OPTIONS`, `DYLD_*`, and other loader-hijack vars at the `terminal_create` boundary.
- Session, terminal, and memory stores now write with mode 0600 (files) / 0700 (dirs) via the new `fs-secure.ts` module.
- MCP stdin handler caps the un-newlined buffer at 10MB across both `bin/cli.js` and `bin/mcp-server.js` to prevent OOM-via-piped-stdin.
- Fetch sites in `verify` and IPFS HEAD probe now have explicit `AbortSignal.timeout` budgets.
- Update package install gated behind `isSafePackageSpec` regex check; prevents tampered npm registry responses from triggering shell injection.

### Encryption at rest — [ADR-096](v3/docs/adr/ADR-096-encryption-at-rest.md), all 4 phases shipped

- AES-256-GCM vault module with magic-byte format (`RFE1`) for backward-compat migration.
- Opt-in via `CLAUDE_FLOW_ENCRYPT_AT_REST=1`; off-by-default preserves the 1865-test baseline.
- High-tier stores wired:
  - `.claude-flow/sessions/*.json` (session-tools)
  - `.claude-flow/terminals/store.json` (terminal-tools)
  - `.swarm/memory.db` (sql.js SQLite + 384-dim ONNX embeddings — Buffer round-trip)
- 76 dedicated tests across vault primitives, integration, tamper detection, migration paths.

### Federation budget circuit breaker — [ADR-097](v3/docs/adr/ADR-097-federation-budget-circuit-breaker.md), Phase 1 shipped

- `federation_send` accepts optional `budget` / `maxHops` / `hopCount` / `spent` metadata. Closes #1723 (and dup #1724).
- Default `maxHops: 8` defangs recursive delegation loops even for callers that don't opt in.
- Constant-string error reasons (`HOP_LIMIT_EXCEEDED`, `BUDGET_EXCEEDED`, `INVALID_BUDGET`) — no oracle leak.
- `validateBudget` rejects `NaN`, `±Infinity`, negatives, non-integer hops, oversized values up front.
- Atomic check-and-decrement (synchronous, no internal awaits) — concurrent sends cannot both pass a single-hop budget.
- 41 dedicated tests on the validator + enforcer.

### Test infrastructure

- 25 pre-existing test failures cleared. Suite went from 1865 + 25 failures → 1933 + 0 failures.
- Vitest config externalizes optional dynamic imports (`@ruvector/*`, `@huggingface/transformers`, `@noble/ed25519`).

### Performance

- Dynamic-import cleanup across `memory-tools`, `hooks-tools`, and `commands/`. Microbench: removing `await import('fs')` of an already-cached module is ~2µs faster per call (423× speedup on the cleared sites).

### Documentation

- `verification.md` expanded into a full capability inventory: 300 MCP tools / 49 CLI commands / 32 plugins / 43 agents. Auto-generated via `scripts/inventory-capabilities.mjs`.
- `verification.md.json` regenerated and re-signed for 3.6.25 — all 27 fixes still verify.
- New `docs/STATUS.md` covering overview + usage + current status. Cross-linked from root README.
- `ruflo-federation` Claude Code plugin bumped to v0.2.0 with budget-options docs.

## Verify your install

```bash
ruflo verify
```

Fetches the manifest, recomputes SHA-256 for every cited file, re-derives the public key from the git commit, and verifies the signature. Drift in any fix produces a non-zero exit + a structured error pointing at the regressed file.

## Packages

| Package | Version |
|---|---|
| `@claude-flow/cli` | 3.6.25 |
| `claude-flow` (umbrella) | 3.6.25 |
| `ruflo` (umbrella) | 3.6.25 |
| `@claude-flow/plugin-agent-federation` | 1.0.0-alpha.5 |
| `ruflo-federation` (Claude Code plugin) | 0.2.0 |

## Install

```bash
npx ruflo@latest init --wizard
```

Or:

```bash
npm install -g ruflo@3.6.25
```

For the bridge container running `npm install -g ruflo`, a rebuild picks up 3.6.25 automatically. Wire format is fully backward-compatible — no breaking schema changes.