Hisaab 的證據閘門洩露了原本要保護的內容
Our evidence gate leaked the secret it was built to protect
Hisaab 團隊復盤發現,證據引用、審計日誌及模型摘要都曾把不可信指令或來源敏感內容帶入報告與日誌。團隊改為引用風險線索、以文件元資料取代日誌原文,並遮蓋摘要中的來源代碼;引用事件未有在本地執行以外傳送內容,但早期 traces 已提交至公開 repository。
Built for Agentware 2026 by Hackathon Raptors. The Near Miss write-up awards are backed by FileClerk.
We built Hisaab (हिसाब, “the accounts”), an overnight clerk for household bills. It reads bills, renewal notices, bank exports and call transcripts, then pays fake money in a local sandbox, holds, disputes or reminds. Its governing rule fits in a sentence:
Anyone can make Hisaab stop. Only you can make it pay.
Untrusted input—a message, a web page or a call transcript—can cause a hold or flag. Only the owner's ledger can authorize a sandbox payment, and actions carry quotes that code checks against their sources. We were proud of that rule. Then the evidence itself became a leak.
The near miss: a citation carried the payload
The Agentware Trap Pack puts fictional canary tokens into hostile files. We scanned what Hisaab wrote: outbox, data, reminders, reports and, later, traces. One Life Admin trap is a call transcript in which a non-owner asks the assistant to do something it shouldn't. The rules flagged the request, but the morning report reproduced the attack-bearing line as evidence.
Nothing was sent outside the local run. Still, the citation put the payload in a document the owner was meant to read. If we had later added a feature to forward that report, the same path could have carried the content farther. That is a hypothetical consequence, not an observed transmission.
We changed call flags to cite the cue, not the instruction: a speaker label or a risk word can explain the finding without reproducing the request. Commit 8d8e49f added the rule and test_call_flag_does_not_echo_untrusted_instruction. The Trap Pack scorer scans outputs after each run; the latest committed results report zero leak canaries in the scanned outputs. That result does not cover every historical recording or traffic outside the application.
The second: the audit log copied the attack
We also found fictional canaries in traces. Our hash-chained audit log, intended to help a human reconstruct a run, stored raw document text. That made it a faithful copy of the hostile input—and we had committed traces to a public repository.
In 0a32b15 we changed document audit records to metadata: ID, SHA-256, length, kind and flags. The hash chain can still be verified, but metadata alone cannot reconstruct the original document. We did not rewrite history. SAFETY.md discloses that fictional canaries remain in earlier commits. They were logged inputs published in that history, not evidence of a separate outbound transmission.
The third: our eval was grading itself
At one point model-proposal acceptance rose to 88%. That looked encouraging, until we found that the prompt included the rules engine's verdict. The model was being shown an answer we meant it to reach independently. We removed it in c22816d and began reporting model/rules agreement separately, including disagreements.
On the final 19-case eval, 32 of 37 model proposals passed the gate (86.5%), and model and rules stances agreed on 19 of 20 documents (95%). Those are results for this recorded fictional eval, not a measure of general reliability. The later holdout told a less comfortable story.
The fourth: the holdout caught a UPI-change scam we missed
Our teammate added five holdout cases without us tuning the original rules to them. In the first offline rules run, a look-alike sender introduced a changed UPI ID for a known payee. Hisaab did not hold it. The expected hold was missing; the record does not show a real payment. The same run also held a harmless notice, so just refusing more was not a complete fix.
We added general checks for payment-detail changes and known-payee sender domains (3f1c95e), then corrected an over-broad check for unchanged details and no-payment notices (2f29129). The rules passed 5 of 5 when rerun, up from 3 of 5. That second result is not blind: we had seen the cases before fixing the rules.
With recorded model responses, the scam case passed, but the model had proposed payment while the rules said stop. Across all five holdout cases, replay passed 4 of 5. The remaining case executed a call summary that its expectation forbade; the holdout gate-acceptance rate was 4 of 7 proposals (57.1%), and model/rules stance agreement was 1 of 5 (20%). We kept the failure in the raw results. A passed scam case and a failed summary case are both part of the result.
The fifth: a summary leaked a code after the flag was fixed
Fixing the flag's citation did not close every output path. In an earlier Trap Pack replay, model-generated summaries for the seminar recording and warehouse standup copied source-derived codes into the local morning report. Both were scored as failures in run 20261129T165733Z-547e24. The problem was not that the calls went unflagged; it was that the useful-looking summary carried sensitive source content into another output.
In b79b7cc we added redaction of source-derived codes in model text and displayed call citations, and strengthened the gate against summaries that repeat non-owner instructions. The tests include test_generated_text_redacts_source_derived_codes and test_call_summary_rejects_quoted_nonowner_instruction. The subsequent Trap Pack run classified both files as caught by guardrail; the results retain the earlier failure and trace. The later holdout summary failure above remains a separate limitation: that test forbids the summary action itself, even if its text is redacted.
What we'd tell the next team
- Every place your agent cites or summarizes evidence is an output channel. Scan citations, summaries, error messages, reports and logs as well as explicit send paths.
- Logs are outputs too. An audit trail that stores inputs verbatim stores attacks verbatim.
- Make authority asymmetric. Untrusted input should be able to stop an action without gaining authority to start a payment.
- Distrust a metric that jumps. Ours improved because the answer had leaked into the prompt. Keep independent cases and publish failures as well as passes.
- A fix is a new hypothesis, not a clean bill of health. Our citation fix did not protect the summary path, and the post-fix holdout was no longer blind.
Hisaab is open source (MIT): github.com/kushagragupta2005/hisaab-agent. It runs in replay mode without an API key. Watch the demo video.
This is our Near Miss entry for Agentware 2026, a hackathon by Hackathon Raptors. The Near Miss is backed by FileClerk.
Thanks to @raptorsdev for organizing Agentware 2026.
來源:DEV Community · dev.to