Living off the Trust Boundary: Task Atomization Across Sub-Agents

Single-turn prompt classifiers fail when adversaries poison workspace rule files before Turn 1, split recon across isolated sub-agents, and force inspection gateways to fail open.

Intent-based prompt classifiers assume malice shows up inside a single message. In multi-agent coding and enterprise orchestration stacks, an adversary never needs to send a hostile prompt. When workspace configuration files, isolated child sub-agents, local tool stdout, and gateway timeouts sit on separate trust boundaries, an offensive workflow passes every single-turn check as ordinary software maintenance.

Living-off-the-Trust-Boundary Lab implements the evasion vectors and architectural defenses from the MDRN Red Team Sec paper Deconstructing Agentic State Evasion in zero-dependency Python (github.com/ghostintheprompt/lottb_task_atomization_lab).

Splitting an offensive chain across benign boundaries

vulnerable/orchestrator.py models how four routine orchestration features combine without tripping a single input classifier:

  • Before Turn 1 (CWE-74, OWASP LLM01): Coding environments ingest checked-in workspace rule files (.cursor/rules/*.mdc, CLAUDE.md, AGENTS.md) at startup to load repository conventions. Live chat turns pass through an intent filter while workspace config files load straight into elevated system context. A poisoned rule file establishes guardrail-suppression state before Turn 1 while the visible user prompt says only "Proceed with Step 2."
  • Across isolated siblings (CWE-863, OWASP LLM06): A parent coordinator splits unauthenticated sink discovery across three ephemeral code_reader leaves: Leaf A lists HTTP routes under /api/v2/, Leaf B checks whether /api/v2/settlement/override attaches requireAuth, and Leaf C traces destinationAccount into the ledger sink. Because sibling leaves share zero context window, each leaf clears alignment checks as routine code review. The full bypass path materializes only when the parent synthesizes their outputs at egress.
  • Through local tool stdout (CWE-250, OWASP LLM07): Safety classifiers tuned to audit tokens generated by model weights frequently skip stdout returned by local binaries (the "Janitor pattern"), letting a leaf print raw scanner output into session logs unchallenged.
  • Past the 50ms inspection budget (CWE-636, CWE-400): Inline Web Application Firewalls (WAFs) enforce tight per-chunk CPU budgets (50ms) and default to availability-first FORWARD_FAIL_OPEN on timeout. Padding the top of a request with 128 levels of nested JSON burns 74.5ms so a SQL injection payload at the bottom reaches the backend uninspected.

Tracking capability taint across the sibling tree

In fixed/orchestrator.py, defense moves off single-prompt intent and onto startup policy scanning, per-role tool bounds, cross-branch lineage taint, and fail-closed budgets.

At startup, HardenedOrchestrator scans workspace rule files for guardrail-suppression directives and wraps clean repository notes inside JSON envelopes marked can_override_safety: false. ROLE_TOOL_ALLOWLIST strips binary execution from code_reader and doc_writer leaves, and tool stdout runs through the exact same prohibited-geometry check as model-authored text.

Most importantly, every child execution records its capability facet against parent_session_id. When synthesize_parent_egress runs, the gate evaluates what the entire sibling tree accumulated rather than what any one prompt asked:

triad_assembled = DANGEROUS_FACET_TRIAD.issubset(accumulated_facets)
bad_geometry = bool(PROHIBITED_EGRESS_GEOMETRY_RE.search(combined_text))

if triad_assembled or bad_geometry:
    reason = "atomized_attack_chain_triad_blocked" if triad_assembled else "prohibited_egress_geometry_blocked"
    return {
        "delivered": False,
        "facets_combined": sorted(accumulated_facets),
        "reason": reason,
    }

At the gateway boundary, inspect_gateway_payload rejects json_nesting_depth > 16 in O(1) (REJECT_DEPTH_LIMIT_422) and enforces BLOCK_FAIL_CLOSED whenever parsing exceeds 50ms. JSONL rules LOTTB-001 through LOTTB-004 catch all four evasion patterns with zero false positives on benign refactoring runs.

Verification and the authorized-auditor trade-off

test_01_latent_workspace_config_poisoning ... ok
test_02_horizontal_subagent_task_atomization_vs_lineage_gate ... ok
test_03_janitor_tool_stdout_passthrough_and_capability_isolation ... ok
test_04_waf_deep_nesting_timeout_fail_open_vs_fail_closed ... ok
test_05_jsonl_detection_rules_zero_fp_and_full_recall ... ok

Ran 5 tests in 0.000s (OK)

One production trade-off deserves candor: an internal security engineer legitimately reviewing routes, middleware, and data sinks in one session will assemble the exact same route_topology + auth_gap + sink_taint_path triad as an attacker. Blocking atomized triads cleanly requires pairing the orchestrator gate with signed, scope-bound Rules of Engagement tokens so authorized reviews pass with an audit receipt while unauthenticated sessions quarantine.

GhostInThePrompt.com // Single-turn filters read prompts; multi-agent defenses have to read the tree.