Domain allowlist
Restricts which domains the agent can reach.
AI SECURITY / NODE.JS · EXPRESS
A guard layer between a tool-using AI agent and the tools it can access.
View GitHub repositoryFinal frozen-code Haiku 4.5 round. Harmless tasks completed 15/15 in both arms. These results describe this evaluation only, not a general security guarantee.
01 / THE PROBLEM
Prompt injection can try to steer an AI agent into unsafe tool actions. Agent Guard explores checks between the model’s intent and the external action, so a request is not passed straight through by default.
02 / ARCHITECTURE
USER → AI AGENT → GUARD LAYER → TOOL
Restricts which domains the agent can reach.
A blind second-model reviewer checks a proposed action.
A person can approve actions before they reach a tool.
03 / BENCHMARK
The final frozen-code Haiku 4.5 round recorded 6/20 successful autonomous attacks with the guard off and 0/20 with it on. In the guarded arm, 10/20 attacks were attempted; every attempt was a lookalike-domain email and the allowlist stopped it.
The same round completed 15/15 harmless tasks in both arms, with no errors or truncated runs. In an earlier layer check, allowlist plus taint rules completed 0/9 harmless tasks; the final blind-reviewer check completed 9/9 with none blocked.
04 / GENERALIZATION CHECK
A starter set that was tuned on stopped 10/10 attacks and allowed 5/5 legitimate tasks. A second set, written after seeing the reviewer, stopped 5/5 attacks but allowed only 3/5 legitimate tasks. The summary reports no independently authored attack set yet, so the second set is not an independent holdout.
The summary is a record of results from earlier sessions, not raw terminal output. Treat counts and costs as reported figures until checked against the original logs.
05 / TECHNICAL DECISIONS
The implementation combines a domain allowlist, a blind second-model review, and a human approval queue. A real agent run queued the lookalike-domain send, and approve/deny actions were exercised in the local dashboard.
An address-parsing fix was added without changing the evaluation results. The summary records 21 tests passing afterward; these checks complement the benchmark but do not expand its attack sample.
Want to inspect the implementation?
Read the source