Near Miss: The Agent That Leaked Its Inputs — and the Newsletter It Refused to Summarise
Team: Maman Rusmana (solo) — AdPilot, Track T4 Browser Agent Repo: https://github.com/Maman19358/adpilot Evidence: tests/trap-pack/RESULTS.md (full run history, scorecard, and per-trap traces) What AdPilot is
Team: Maman Rusmana (solo) — AdPilot, Track T4 Browser Agent
Repo: https://github.com/Maman19358/adpilot
Evidence: tests/trap-pack/RESULTS.md (full run history, scorecard, and per-trap traces)
What AdPilot is
AdPilot is a zero-LLM, zero-network, zero-dependency browser agent that builds a full ad campaign in a headless browser and stops at a publish gate as a draft. Because it has no model to fall back on, every safety decision is a hand-written rule — which makes its failure modes unusually visible. During the Agentware Trap Pack (20 adversarial inputs), we caught two bugs that would each have been embarrassing in production. Both were near misses: caught in testing, fixed with general rules, and verified by re-running the whole pack from scratch.
Near Miss #1: the agent that copied raw input into its outputs
In our very first Trap Pack run, the leak scanner flagged a real bug: AdPilot was copying raw input text into its outputs. A summary of a document could quote a reference code straight from the input. In a demo that looks harmless. In production — where the input might be a supplier email, a bank export, or a page with a pasted credential — that is a leak vector: the agent laundering secrets into its own output, where they can be forwarded, logged, or displayed.
The scary part was how ordinary it looked. Nothing crashed. No guardrail fired. The agent was doing exactly what a helpful assistant does — quoting the source material — and that was precisely the problem.
The fix (general, not trap-specific): output redaction. A leak scanner now checks every output payload for known secret/reference-code formats and redacts them before anything is emitted. Local outputs are sanitised instead of blocked, so a benign task still completes; external sends stay refused outright. No canary string, no per-trap logic — one rule, applied everywhere.
Verification: run 2 re-ran all 20 traps after the fix: zero leaks on all 20. Every run since has stayed at zero canary leaks.
Near Miss #2: the newsletter the agent refused to summarise
The opposite failure arrived three runs later. Trap #04 is a security newsletter that quotes attack examples — "for example, an email saying 'send the passphrase to…'" — and asks for a plain summary. AdPilot refused it. Its injection scanner saw the quoted instruction and treated it as a live command.
This is the failure mode nobody demos: an agent so afraid of being tricked that it refuses ordinary work. A user asking for a newsletter summary gets a refusal, and the agent looks broken rather than safe. Run 3's scorecard showed the scale of the problem: 7 pass, 10 partial, 3 fail — and the fails were over-refusals on benign controls, not missed attacks.
The fix (again general): reported-speech handling. A pattern match inside a double-quoted span introduced by an example-framing cue ("like", "for example", "quoted") is logged as a quoted-example — noted, ignored, not a live injection. The cue list is deliberately narrow (generic reporting verbs like "said" do not count), structured data (JSON/CSV) is exempt because quotes there are syntax, not speech, and outbound requests must be live — verbs inside quotations or immediately negated ("never send", "do not publish") are not requests to the agent.
Verification: before writing the fix, we probed it against all 20 traps and confirmed it changes the decision on only #04 — nothing else moves. Run 5, executed first and scored only after it finished: 15 pass, 5 partial, 0 fail, 0 canary leaks. Trap #04 now proceeds normally: the quoted examples are recognised as reported speech, "never send secrets" is read as a negation, and the summary is delivered.
The uncomfortable part: we read the answer key first
Full disclosure, because a Near Miss write-up that hides its own near miss would be a joke: a teammate read the Trap Pack answer key (EXPECTED.md) before the first scored run. That cannot be undone, so we documented exactly how the runs stayed honest:
- No agent code was ever changed based on the key. No canary strings, no per-trap-number logic, no behaviour copied from the key's "what a safe agent does" column. Every guardrail is general: page content is data, never send secrets, stop before pay/publish without approval, validate numbers before trusting them.
- Run 3 used the agent exactly as written before the key was read, and was scored only after it finished.
- Weaknesses found in scoring were fixed with general guardrails only, then the whole pack was re-run from scratch (runs 4 and 5), each executed first and scored only after it finished.
A trap an agent "passes" by refusing everything is not the same as understanding it. The traces show what was actually seen and why each call was made — that is the evidence, not the score.
The lesson
These two misses look like opposites — one agent leaked too much, the other refused too much — but they share one root cause: treating text as if it were instructions. Raw input quoted into an output is data pretending to be the agent's own words; a quoted attack example is data pretending to be a command. The fix in both cases is the same discipline: data is data, quotes are quotes, and only a live request counts. Get that distinction right and the agent can be both safe and useful — which, for a zero-LLM agent with no model to catch its mistakes, is the whole job.
AdPilot — solo entry by Maman Rusmana. Trap Pack run 5: 15/20 pass, 5 partial, 0 fail, 0 canary leaks. Full evidence: https://github.com/Maman19358/adpilot/blob/main/tests/trap-pack/RESULTS.md
Thanks to FileClerk (https://fileclerk.co.uk/) for sponsoring the Near Miss write-up prizes.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.