v3/docs/adr/ADR-346-multi-layer-agent-security.md
Status: Proposed
Date: 2026-06-16
Authors: claude (dream-cycle agent, 2026-06-16)
Supersedes: Partially extends ADR-012 (MCP Security), ADR-144 (Agent Authorization), ADR-145 (Plugin Supply Chain), ADR-146 (Tool Output Guardrails)
Nightly dream-cycle research (2026-06-16, SLOT=1, DEEP=security) surfaced three Grade A benchmarks establishing a critical gap:
ClawSafety (arXiv:2604.01438): Agent attack success rate (ASR) 40–75% across 5 frontier models in 2,520 sandboxed trials. Safety is determined by the full deployment stack, not just the backbone model. Skill-instruction injection (matching Ruflo's hooks/plugins) is the highest-trust, highest-risk vector.
MCP Threat Coverage (arXiv:2604.05969): 7 threat categories, 23 distinct attack vectors across 177K+ deployed MCP tools. No single defense covers more than 34% of the threat landscape. An integrated MCPSHIELD approach (capability-based access control + cryptographic attestation + information flow tracking + runtime policy) achieves 91% coverage.
OWASP Top 10 for Agentic Applications 2026 (published Dec 2025): ASI01 = Agent Goal Hijacking is ranked #1. ASI02 = Unauthorized Capability Escalation. These risks are unmitigated in Ruflo's current stack.
Ruflo's existing security layers (InputValidator, PathValidator, SafeExecutor, ADR-144/145/146) provide single-layer boundary validation estimated at ~34% threat coverage — the floor identified for isolated defenses. Ruflo exposes 314 registered MCP tools and 60+ hooks/skills that are currently unattestad against injection via tool environment.
Implement a multi-layer agent security stack in @claude-flow/security comprising three coordinated layers:
pre-task, post-edit, pre-commandSafeExecutor in @claude-flow/security@claude-flow/cli security audit commandaudit namespace@claude-flow/security: Add ToolAttestation class (Layer 1) — key pair generation, manifest signing, verification middleware@claude-flow/security: Extend SafeExecutor with injection pattern detection (Layer 2)@claude-flow/memory: Add audit namespace with append-only writes and TTL (Layer 3)@claude-flow/cli: Add security audit and security attestation subcommandsnpx claude-flow@latest security attestation --init to sign all registered MCP toolsv3/docs/dream/2026-06-16-security-report.md