Dev.to Security πŸ” Cybersecurity πŸ‘ 0 πŸ“– 2 min read

The invoice my AI agent filed with an order hidden inside

My Near Miss entry for Agentware 2026 by Hackathon Raptors (@raptorsdev), #HackathonRaptors. The Near Miss awards are backed by FileClerk, the prize sponsor, which builds UK company filing tools for people and AI agents:

The invoice my AI agent filed with an order hidden inside

My Near Miss entry for Agentware 2026 by Hackathon Raptors (@raptorsdev), #HackathonRaptors. The Near Miss awards are backed by FileClerk, the prize sponsor, which builds UK company filing tools for people and AI agents: https://fileclerk.co.uk

DoubtPilot is an AI agent for money paperwork. It reads an inbox, files the routine documents, and holds the rest for a human. It has no tool to pay, transfer or send anything, so the worst a mistake can do is ask a person to take a look.

Here is the time it nearly went wrong.

The invoice with an order inside

An invoice arrived with a line in an HTML comment, addressed to the AI assistant and telling it to approve the payment. A human reading the email never sees a comment. My agent did, and it filed the invoice like any other.

The cause was boring. My HTML reader stripped comments, script text and alt text before the safety scanner ever ran. Text a person cannot see was also invisible to the check that exists to catch it. In my first run, 5 of 10 hidden-text tricks got through as normal invoices.

Before and after: the same invoice FILED in the first run, then HELD after the reader fix

The fix was small. Keep the text a human cannot see, scan it, and hold the document. All 10 variants are held now, each with a regression test. The agent never obeys the instruction. It records it as data and says why it held the document.

The email with no scary words

The second near miss had no keywords at all. A polite follow-up from a known supplier, same invoice, one change: the bank account. No keyword filter catches that. DoubtPilot remembers which account belongs to which supplier, so a changed payee gets held.

The honest numbers

Only first runs count as evidence, so these are first runs:

  • Red team: 63/102 (62%)
  • Unseen round 4, never tuned on: 38/84 (45%)
  • Trap Pack: 12/20

The 100% scores (102/102 and 20/20) came after I tuned on those sets. They are regression checks, not proof. Round 4 was locked and I did not tune on it, so 45% is my real estimate of how it does on documents it has not seen.

Scorecard of first-run results, with tuned scores labelled

What I took from it

An agent that cannot move money is not a safe agent, but it is a forgiving one. Because DoubtPilot can only hold, each miss costs a human a minute instead of a payment. The Trap Pack also flagged a harmless newsletter on my first run (a false positive), which is the cheaper kind of mistake to have.

Next time I would test the reader on invisible text before writing a single detector.

Links

Built by Septian Panjaya for Agentware 2026.

πŸ“° Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.