AgentAudit  security scorecard
F

fixtures/corebreak_vulnerable.py

1 finding across 1 of 3 layers · risk 40/100

1 critical 0 high 0 medium 0 low
2026-09-12T20:42:25Z scan 0.00s agentaudit v0.1.0
architectural RAN
static tool-trust graph: 0 finding(s); harness-integrity checked (1 finding(s)); rug-pull baseline checked (0 change(s))
cloud SKIPPED
no deploy config found (pass --deploy-config or add <agent>.deploy.json)
behavioral RAN
static prompt hygiene ran; dynamic red-team skipped (no Bedrock model configured). Would run 5 RISK_CATEGORIES + 0 tool-derived probes via strands_evals RedTeamExperiment.

Findings

CRITICAL architectural ASI01·ASI05 harness-model-skip-corebreak · corebreak_vulnerable.py

This agent forwards caller-controlled conversation history ('messages' -> Agent(messages=…)) into the Strands Agent without a step that removes 'toolUse' / 'tool_use' content blocks. On strands-agents<=1.55.0 (all released versions; no upstream fix), the event loop's '_has_tool_use_in_latest_message' check (event_loop.py) then skips the model call whenever the latest message already contains a toolUse block and dispatches that tool directly. An attacker who controls the last message can execute a configured tool with attacker-chosen arguments, bypassing the model and every guardrail wrapped around the model call. AWS patched the managed AgentCore InvokeHarness API for CVE-2026-18830 but did not change the open-source SDK.

location fixtures/corebreak_vulnerable.py:40  ·  confidence heuristic
evidence caller-controlled 'messages' -> Agent(messages=…); no toolUse/tool_use sanitization, no BeforeModelCall guard, and <agent>.deploy.json does not attest managed-InvokeHarness deployment (corebreak_mitigation / invocation)
37    # `event["messages"]` is the whole conversation history supplied by the38    # caller — trusted verbatim, tool_use blocks and all.39    messages = event["messages"]40    agent = Agent(41        system_prompt=SYSTEM_PROMPT,42        tools=[delete_document],43        messages=messages,
▸ REMEDIATION — Strip caller-suppliable tool_use/toolUse content blocks from inbound message history before constructing or invoking the Agent. strands-agents has no upstream fix as of 1.55.0, so this must be enforced in your code. If the agent is in fact invoked only through the patched managed AgentCore InvokeHarness API, declare it in <agent>.deploy.json ("corebreak_mitigation": true).
- messages = event["messages"]
- agent = Agent(system_prompt=SP, tools=TOOLS, messages=messages)
+ def _strip_tool_use(messages):
+     out = []
+     for m in messages:
+         blocks = [b for b in m.get("content", [])
+                   if "toolUse" not in b and "tool_use" not in b]
+         out.append({**m, "content": blocks})
+     return out
+ 
+ messages = _strip_tool_use(event["messages"])
+ agent = Agent(system_prompt=SP, tools=TOOLS, messages=messages)