Skip to content

armgit / ruflo

Public Imported from GitHub
0

🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated

feat(plugins): ADR-098 Part 1 (slice 1/3) β€” capability sync for security plugins

Reuven6a40574745f3
diff --git a/plugins/ruflo-aidefence/.claude-plugin/plugin.json b/plugins/ruflo-aidefence/.claude-plugin/plugin.json
index 2b7a4d93c8..dd9ce19ff8 100644
--- a/plugins/ruflo-aidefence/.claude-plugin/plugin.json
+++ b/plugins/ruflo-aidefence/.claude-plugin/plugin.json
@@ -1,7 +1,7 @@
{
"name": "ruflo-aidefence",
"description": "AI safety scanning, PII detection, prompt injection defense, and adaptive threat learning",
- "version": "0.1.0",
+ "version": "0.2.0",
"author": {
"name": "ruvnet",
"url": "https://github.com/ruvnet"
diff --git a/plugins/ruflo-aidefence/README.md b/plugins/ruflo-aidefence/README.md
index ea9f38d671..b7cdaa02f3 100644
--- a/plugins/ruflo-aidefence/README.md
+++ b/plugins/ruflo-aidefence/README.md
@@ -16,6 +16,14 @@ AI safety scanning, PII detection, prompt injection defense, and adaptive threat
- **Adaptive learning**: Train defenses on confirmed threats to improve detection
- **Threat classification**: Categorize threats with confidence scores
+## Defense-in-depth pairing (ruflo 3.6.25+)
+
+This plugin pairs with three runtime hardening features that ship in the host (ADR-095 / ADR-096 / audit_1776853149979):
+
+- **Loader-hijack denylist** β€” `validateEnv()` rejects `LD_PRELOAD`, `LD_LIBRARY_PATH`, `LD_AUDIT`, `DYLD_INSERT_LIBRARIES`, `DYLD_LIBRARY_PATH`, `DYLD_FALLBACK_LIBRARY_PATH`, `DYLD_FORCE_FLAT_NAMESPACE`, `NODE_OPTIONS`, `NODE_PATH` at the `terminal_create` MCP boundary. Adding any of these to a child process is functionally RCE; threat scoring should treat a denylist-enforcing host as substantially less exposed.
+- **File mode 0600 / dir mode 0700** on session, terminal, and memory stores via `fs-secure.writeFileRestricted` β€” cross-user-on-host reads blocked at the OS layer.
+- **Encryption at rest** (opt-in via `CLAUDE_FLOW_ENCRYPT_AT_REST=1`) β€” AES-256-GCM with magic-byte (`RFE1`) backward-compat sniff. Reports involving memory.db / sessions / terminal-history exfiltration should account for the gate state (`ruflo doctor -c encryption`).
+
## Commands
- `/aidefence` -- Detection stats and threat analysis dashboard
diff --git a/plugins/ruflo-security-audit/.claude-plugin/plugin.json b/plugins/ruflo-security-audit/.claude-plugin/plugin.json
index 8e5d5be376..2e6ec79538 100644
--- a/plugins/ruflo-security-audit/.claude-plugin/plugin.json
+++ b/plugins/ruflo-security-audit/.claude-plugin/plugin.json
@@ -1,7 +1,7 @@
{
"name": "ruflo-security-audit",
"description": "Security review, dependency scanning, policy gates, and CVE monitoring",
- "version": "0.1.1",
+ "version": "0.2.0",
"author": {
"name": "ruvnet",
"url": "https://github.com/ruvnet"
diff --git a/plugins/ruflo-security-audit/README.md b/plugins/ruflo-security-audit/README.md
index b3136699c1..b53ee16302 100644
--- a/plugins/ruflo-security-audit/README.md
+++ b/plugins/ruflo-security-audit/README.md
@@ -18,6 +18,19 @@ Security review, dependency scanning, policy gates, and CVE monitoring.
- **Policy Gates**: Configurable security policies for CI/CD pipelines
- **Threat Modeling**: Automated threat analysis and risk assessment
+## Patterns to scan for (audit_1776853149979 follow-up)
+
+The 3.6.25 release closed a class of shell-injection bugs. When auditing downstream code, the scanner should flag these patterns:
+
+- **`execSync(string)` with template-literal args** β€” replace with `execFileSync(cmd, argv, { shell: false })`. Closed sites: `github-safe.js`, `statusline.js/cjs` (git calls), `mcp-tools/github-tools.ts` (`gh pr/issue/run`), `update/executor.ts` (`npm install`).
+- **Numeric MCP inputs cast as `number`** β€” TypeScript casts don't run at runtime. A `prNumber: "1; rm -rf /"` slips through. Mitigate via `toPositiveInt(value)` (see `src/mcp-tools/github-tools.ts`).
+- **Untrusted package specs flowing into `npm install`** β€” gate via `isSafePackageSpec(pkg, version)` regex check (see `src/update/executor.ts`). Defense-in-depth even with `execFileSync`.
+- **Loader-hijack env vars** (`LD_PRELOAD`, `NODE_OPTIONS`, `DYLD_*`) flowing into a child process env β€” gate via `validateEnv()` (see `src/mcp-tools/validate-input.ts`).
+- **Plaintext secrets at rest** in `.claude-flow/sessions/`, `.claude-flow/terminals/store.json`, `.swarm/memory.db` β€” paired with [ADR-096](../../v3/docs/adr/ADR-096-encryption-at-rest.md) opt-in encryption (`CLAUDE_FLOW_ENCRYPT_AT_REST=1`). Confirm gate state via `ruflo doctor -c encryption`.
+- **MCP stdin DoS** β€” un-newlined input piped into the MCP server. The host caps the buffer at 10MB by default; downstream MCP wrappers should enforce equivalent limits.
+
+A `ruflo verify` round-trip confirms 55 witnesses (27 regression-fix + 28 per-source-file capability) match the signed manifest byte-for-byte.
+
## Requires
- `ruflo-core` plugin (provides MCP server)