The dev team behind Hisaab, an open-source overnight clerk for household bills, discovered that their primary safety mechanism was actively leaking the very attacks it was designed to catch. During testing for the Agentware 2026 hackathon, the team found that while their agent correctly flagged and refused unauthorized payment requests from hostile call transcripts, the resulting safety citations copied the attacker's payload directly into the user's morning report. The fix required shifting citation logic to reference metadata rather than content, a change implemented in commit 8d8e49f.
The Citation Trap
Hisaab operates on a strict asymmetry: untrusted input can stop the agent, but only the owner's ledger can authorize a sandbox payment. When the Trap Pack injected fictional canary tokens into hostile files, the agent's rules engine correctly identified the threat. However, the requirement for every flag to include a citation caused the system to reproduce the specific line containing the attack. While no data was transmitted externally in this instance, the team noted that a future 'forward to accountant' feature could have propagated this leaked payload, turning a safety feature into an exfiltration channel.
Audit Logs as Attack Surfaces
The scan revealed a second vulnerability in the agent's hash-chained audit log, which had been storing raw document text from hostile inputs. Because the logs were committed to a public repository, the audit trail effectively archived the attack payloads. The team addressed this in commit 0a32b15 by restricting document audit records to metadata onlyβsuch as document ID, SHA-256, length, and flagsβensuring the hash chain remains verifiable without preserving the raw, potentially sensitive, or malicious input text.
Metrics and Independent Verification
A third issue involved the agent's evaluation metrics, where acceptance rates jumped to 88% due to a feedback loop. The rules engine's verdict was inadvertently included in the model's prompt, leaking the correct answer and inflating performance scores. After removing this leak in commit c22816d, the team reported a more realistic 86.5% pass rate in a 19-case eval, with 95% agreement between the model and rules. This highlights the danger of self-grading systems in agent development.
Key Takeaways
- Treat every output channel, including citations and logs, as a potential exfiltration vector.
- Never store raw untrusted input in audit logs; use metadata and hashes for verification.
- Ensure evaluation metrics are independent of the logic they are grading to avoid self-fulfilling prophecies.
- Implement asymmetric authority where untrusted inputs can only halt processes, not initiate them.
The Bottom Line
Your safety mechanisms are part of your attack surface; if your agent quotes the bug, you're just printing the exploit for the user to read.