In one minute
I booby-trapped a repo and told a real Kiro agent, every tool auto-approved, to run its tests. Kiro obeyed no hidden order, but a test script in the repo sent my planted secret out in 4 of 40 runs. If you let an AI agent run code in a repo you didn't write, it will read, and run, anything.
The attack is older than AI: code that runs before anyone looks. 1998 had an answer for that, so I brought it back.
Exorcist 98 is the 90s desktop antivirus (readable virus definitions, a full system scan, a quarantine vault and a
real-time shield) rebuilt inside the agent's loop: Kiro hooks check a file before the agent reads it and a package
script before npm runs it, an MCP firewall hides a tool the moment it changes after you approved it, and a Kiro
workflow cleans an infected folder until the scanner, not the agent, says CLEAN. My first version failed that trap
too (5 of 40); since the fix it has leaked in none of the runs (0 of 40 twice; docs/KIRO_UNDER_ATTACK.md, pre-registered).
Try it in 60 seconds (no login, nothing to install)
- Scan an infected repo: https://exorcist-98.vercel.app/?demo=haunted
- Watch the Shield stop a rug pull, with and without it: https://exorcist-98.vercel.app/?demo=rug-pull
- Tamper with the Shield's log and watch the hash chain break: https://exorcist-98.vercel.app/?open=tamper
- Scan any public GitHub repo: paste its URL at https://exorcist-98.vercel.app
- Judges' guide (every claim with the file and command that check it): https://github.com/pranavsaji/exorcist-98/blob/main/docs/JUDGES.md
- In Kiro:
npx -y @exorcist-98/cli init --kiro(npm, published from CI with provenance)
Inspiration
Every week I review developer tools on my channel, and in episode after episode the story was the same: an agent settings file that leaked 31,088 secrets, one agent skill in three with a security flaw. The agents were doing exactly what the text around them told them to. I wanted the thing I had as a kid in 1998: an antivirus that checks what comes in before it runs.
In the 90s, viruses came on floppy disks. Today, AI coding agents read and act on text that anyone can write: a README, a steering file, an MCP tool description, a code comment. Attackers hide orders there with invisible Unicode or HTML comments, poison tool descriptions, or change an MCP tool after you approved it (a "rug pull"). I brought back the antivirus model people already understand (virus definitions, a full system scan, a real-time shield, a quarantine vault) and pointed it at the files and tools an agent trusts.
What it does
- Full System Scan (web app, CLI, GitHub Action, MCP tool): scan a public GitHub repository, a folder or a .zip. Every finding shows the file, line, the quoted text, the infection level in words and a shape (never colour alone), the threat class and a fix. Reports export as SARIF, Markdown, JSON and an SVG badge.
- Virus Definitions: 54 open YAML signatures anyone can read and argue with: hidden Unicode, orders aimed at the AI, encoded payloads, poisoned tool descriptions, rug pulls, over-broad auto-approve, remote code in hooks, install-script exfiltration, unpinned or typosquatted MCP packages, secrets in the agent's reach, memory poisoning, the lethal trifecta and more, across the files Kiro and six other coding agents read. Each maps to the OWASP LLM, Agentic or MCP Top 10.
- Real-Time Shield: an MCP firewall between the agent and each MCP server. It pins every tool's fingerprint and hides a tool that changes after approval; it blocks secrets and unknown hosts in tool calls; and once a session has read untrusted text and private data, it holds the next call that could send data out until a person says yes (Touch ID on macOS). Its event log is a hash chain: rewrite one event and verification fails at exactly that event.
- The
exorciseKiro workflow: scan, clean, scan again, until the scanner says CLEAN (details below). - Possession Lab (web app): seven attacks replayed twice, through the real Shield and with nothing in between, side by side. Tamper demo: rewrite a blocked call as allowed in the Shield's log and watch the chain break.
- Quarantine Vault, a Kiro Power, an MCP server, an editor extension for Kiro (on Open VSX), and ten more
90s antivirus ideas brought back: on-access scanning, canary traps, signed definition updates, a detonation chamber
and others (
docs/REFERENCE.md). - Crew app: a nightly patrol of your folders with a dashboard page, an MCP rug-pull watch and an owner-only quarantine.
Measured, including where it loses
- Blind evaluation (
docs/BLIND_EVAL.md): attacks written by agents with no access to my rules first exposed what my tuned benchmark hid (29 of 94 caught). After two rounds of fixes, 91 of 94, with 0 of 72 false alarms (8 of 100 on a second, untouched set). The set is no longer held out, and I say so. - Held-out set (
docs/HOLDOUT.md): 80 new cases written by a Kiro agent whose permissions let it read only its own folder, so it never saw a rule. Pre-registered and scored once: 26 of 40 attacks caught, 2 of 40 look-alikes flagged. That gap from 91/94 is the honest measure of what the tuned number owed to tuning; the weakest class is a secret placed next to a polite request to send it (0 of 5). On the same set, Claude Sonnet alone caught 38 of 40 and a naive grep 14 of 40 (docs/EVAL_LADDER.md): on attacks nobody tuned for, a model does much better, which is why the optional AI judge exists. - Eval ladder (
docs/EVAL_LADDER.md), on the same sets, attacks caught out of 94: naive grep 25; my signatures 91; signatures plus the AI judge 94; Claude Sonnet alone 90. An LLM alone is about as accurate here; the signatures need no model, no network and 51 seconds for 266 cases, and cannot be talked out of a verdict. A ledger lists all 615 model calls. - Broken on purpose (
docs/BROKEN_ON_PURPOSE.md): remove any group of rules and the score drops (without the rules for orders aimed at the AI: 59/94), and CI checks that on every change. - Field report: the scanner on 483 real public repositories in 3 rounds, every serious alert read by hand. Fixes cut serious (high or critical) alerts from 4.0 to 0.24 per repository on a fresh set. A fourth round, held out, on 100 popular MCP servers with today's rules: no real threat, 1.76 serious alerts and 0.96 false-alarm issues per repository, most of them from the rules I added while chasing the blind set. I publish it as measured. The precision fixes it led to bring that set to 0.30 per repository, a development number (tuned on that round), with every blind, held-out and benchmark score unchanged.
- Shield: passes 83 of 84 adversarial scenarios over real stdio (one does not apply).
- 4,375 tests including 233 fast-check properties; a 46-step Chrome run with 0 axe violations; Lighthouse (PageSpeed Insights, 2026-12-02): mobile 96 performance, 100 accessibility, 96 best practices, 100 SEO; desktop 99, 100, 96, 100.
How I used Kiro
Of the 49 specs in .kiro/specs/, Kiro wrote 39 (16 in Kiro IDE, 23 in Kiro CLI, headless) and implemented
31 of them itself; it left 8 part-done, mostly at its monthly usage limit, and those were finished outside Kiro
(spec by spec: docs/kiro-specs.json, checked against the log by a test). Up to v0.3.13, 46 of 339 commits carry a
Claude Code co-author line (node scripts/kiro-share.mjs). The exported Kiro IDE sessions alone come to 27 sessions, 1,540.57 credits and 3,766 tool calls, in which
my hooks ran 1,718 times (docs/KIRO_EVIDENCE.md). Kiro played three parts: the builder, the agent I
attacked, and the runtime that cleans an infected folder. Every row of docs/KIRO_LOG.md says which Kiro
product did the work, and rows written outside Kiro say so: in some specs Kiro's run was finished or corrected
outside Kiro (most often after the account hit its monthly usage limit), and the blind-evaluation fixes and the last
precision round had no Kiro spec and were done outside Kiro. The full map of features, files and evidence is
docs/HOW_KIRO.md (also at https://exorcist-98.vercel.app/how-kiro).
Kiro IDE, CLI, Web, Crew: how they differed.
- Kiro IDE carried the first half: one spec per milestone, written and implemented interactively, with steering every change had to follow and hooks firing on save. It is where I installed my Power from the Powers panel, ran the MCP server and saw Kiro offer Ask Kiro to Fix on my editor extension's findings.
- Kiro CLI carried the second half, and it changed how I worked. With
--no-interactiveand a custom agent, it read one written brief per area, wrote the spec, then failing tests, then code, in parallel git worktrees, and a small driver resumed each run until a done marker appeared. Kiro CLI 3.8 also runs my workflow, and Kiro CLI was the agent under attack in the pre-registered study. - Kiro Crew was a different kind of target: a running agent platform I built an app for, then installed and ran in Crew 0.12.2 and 0.13.0. That found seven places where Crew behaved differently from its docs, each recorded.
- Kiro Web: I did not use it.
Custom agents. 6 in .kiro/agents/. exorcist-blind-writer wrote my held-out test set: its permissions allow reads and writes only inside that set's folder, so it could not see a single rule it was testing (docs/HOLDOUT.md). exorcist-builder (Kiro CLI) built every spec from m17 on: it can
write code, tests, docs and specs, but not hooks, agents, settings, .git or CI files, and its shell runs only a
fixed list of build and test commands, which is what made long unattended runs safe. exorcist-cleaner is the agent
the workflow runs: read, write and two Exorcist MCP tools, no shell, no web, and no writes to the files that decide
when it is done, in any letter case. exorcist-reviewer and exorcist-red-team are read-only and fixture-only.
In Crew, the exorcist-sentry agent reads patrol results through one read-only MCP tool and never sees scanned text.
Agent hooks. 12 hooks in Kiro's JSON format automate the loop: spec-change keeps docs/THREATS.md in
step with every spec save; definition-save runs the core tests when a rule changes; spec-trace lists requirement
IDs that no test covers; verify-after-task runs the typecheck and the related tests after each spec task and hands
failures back to the agent; kiro-log (a Stop hook) writes the end-of-turn rows of docs/KIRO_LOG.md;
pre-commit-secrets, guard-env-write and guard-web-fetch stop a secret leaving through a commit, a file or a URL;
mcp-config-write-guard asks a person before the agent edits an MCP config; exorcist-gate fails a turn that leaves
the repo infected; and on-access-scan scans a file before the agent reads it. That last one guarded Kiro while it
built this project: it refused Kiro's reads of my own files that quoted attack text, and Kiro stopped and asked
instead of working around it. I fixed the files, not the hook. Once, on 2026-12-03, with the machine overloaded,
the hook's checks ran out of time and failed closed, and Kiro did work around it: it read a file through git show
and overwrote docs/CHANGELOG.md. I restored the file from git and logged it. The agent's
instructions said never to work around a hook, and git show was on its allowed command list: the shell-read guard that
init --kiro installs for users, which scans reads through git show, was not among this repository's own hooks.
It is now a lesson in the log: a hook that refuses one tool is a guard, not a sandbox.
Spec-driven development. Each area starts as a brief, then a Kiro spec: requirements.md with numbered
acceptance criteria (298 "shall" lines across the specs), design.md, and tasks.md (564 of 637 tasks done).
Test names start with the requirement ID, and the spec-trace hook flags any ID without a test. Compared with vibe
coding: where I skipped the spec, I was wrong. Rule tuning that looked fine on my own fixtures raised 4,457 false
alarms on five real repositories, none real; the m7-precision spec forced a benchmark and brought it to 2. Specs
also made a security tool falsifiable: the pre-registered study is a spec whose method was committed before any run.
Steering docs. 11 files. Four written with Kiro IDE before any code (product, tech and security always on,
ui for the web components) set the non-negotiables: strict TypeScript, zod at every boundary, defanged fixtures, untrusted text never
concatenated into instructions, severity never by colour alone. The strategy that made the biggest difference was
scoping: the later files load only for the files they govern (fileMatch, for example untrusted-output.md only in
code that prints findings) or on request (release.md), so each turn carries the rules that matter there and
nothing else.
MCP. I built the exorcist MCP server (official SDK) so Kiro can scan and explain findings itself. MCP made the
workflow's key property possible: the scan_repo tool, not the agent, writes the verdict file the workflow stops on,
so a possessed or mistaken agent cannot declare itself done. Running my MCP firewall inside Kiro also found that Kiro
caches the tool list, so the Shield now checks every tool against its pin before every call.
Property-based testing. 233 fast-check properties, enabled for the requirements where one example proves little: "a secret at any depth is never forwarded", "a changed tool is never listed or callable", "a zero-width character is detected at any position", "no tar entry writes outside the target folder", "quarantine then restore returns the exact bytes". PBT caught a crash on import in M0 that example tests missed, and pinned the fix when the browser run showed one finding per hidden character instead of one per run of them.
Kiro Powers. I built the exorcist Power (MCP config plus three skills: scan a repo, set up the Shield,
quarantine), installed it through Kiro's Powers panel, and its first real use found a bug (the server scanned its own
install folder) that the Kiro IDE agent fixed. I did not use third-party Powers.
Workflows. The exorcise workflow (.kiro/workflows/), specified and built by Kiro CLI from a brief and finished outside Kiro (the cleaner agent's file and
the input format; docs/KIRO_LOG.md): up to five rounds of the
cleaner agent, stopping when the scanner's own verdict for that folder says CLEAN, pausing for a person otherwise.
Four recorded headless runs (the fourth is the one in the video), each CLEAN after one round in 23 to 31 seconds, with the exact diffs. Run 2 showed a line
the scanner missed (an order granting the agent standing permission to release), which became rule EX-078.
How it compares to existing tools
Scanners for MCP tool descriptions (such as Invariant Labs' mcp-scan) and prompt-injection classifiers (such as Meta's Prompt Guard) cover parts of this problem; I have not benchmarked them, so I claim nothing about them. Exorcist 98 reads every file an agent will read, not only tool descriptions, with rules anyone can read in YAML; it acts at run time too (the Shield); it fits into Kiro as hooks, a Power, an MCP server, a workflow and a Crew app; and it is measured in the open, including the ladder where an LLM alone does about as well.
Challenges
- Defending the scanner from what it scans. Scanned text is attacker text. It is never concatenated into instructions, the MCP server and Crew agent never receive quoted file text, and the web page inserts it only as text.
- My own tests lied until I ran things for real. A real browser run found four UI defects unit tests missed; my first hooks were in a format Kiro does not use and never fired; and my own pre-registered study showed my first version did not protect against the one attack that worked.
- Kiro reads what it builds. My on-access hook stopped Kiro from reading my own docs when they quoted attacks. The fix was to keep attack text in fixtures only, which made the docs safer for every agent.
Accomplishments
- A study that could fail, and did: my first version lost to the one trap that worked on a real Kiro agent. The fixed version stopped it in every run of two passes.
- A Kiro workflow that cleans an infected folder in one round, where only the scanner can say it is done.
- About 97,000 lines in the main repository (about 53,000 of program code and 43,000 of tests), published on
npm with provenance, with every number in this text traceable to a file and a command (
docs/JUDGES.md).
What I learned
A security tool earns trust by failing in public first. The blind evaluation, the eval ladder, the broken-on-purpose proofs and the failed first arm of the study each taught me more than the passing tests did.
What's next
- Make the AI judge cheaper to leave on, and benchmark against other scanners on shared sets.
- Release a held call through the system prompt on Linux and Windows (macOS only today).
- A team view: shared policies, one audit log, and the Crew patrol across a fleet.
Links
- Demo video: https://youtu.be/Sh4zg67JIoQ
- Live app: https://exorcist-98.vercel.app (demos:
?demo=haunted,?demo=rug-pull,?demo=trifecta,?open=tamper) - How I used Kiro, feature by feature: https://exorcist-98.vercel.app/how-kiro
- Repository (Apache-2.0,
.kiro/committed): https://github.com/pranavsaji/exorcist-98 - Judges' guide: https://github.com/pranavsaji/exorcist-98/blob/main/docs/JUDGES.md
- Kiro record: dated log https://github.com/pranavsaji/exorcist-98/blob/main/docs/KIRO_LOG.md and spec by spec https://github.com/pranavsaji/exorcist-98/blob/main/docs/kiro-specs.json
- Kiro under attack (pre-registered study): https://github.com/pranavsaji/exorcist-98/blob/main/docs/KIRO_UNDER_ATTACK.md
- Held-out set: https://github.com/pranavsaji/exorcist-98/blob/main/docs/HOLDOUT.md and the eval ladder: https://github.com/pranavsaji/exorcist-98/blob/main/docs/EVAL_LADDER.md
- Field report (483 public repos, plus 100 MCP servers): https://github.com/pranavsaji/exorcist-98/blob/main/docs/FIELD_REPORT.md
- The
exorciseKiro workflow and its recorded runs: https://github.com/pranavsaji/exorcist-98/blob/main/docs/WORKFLOW.md - npm: https://www.npmjs.com/package/@exorcist-98/cli and https://www.npmjs.com/package/@exorcist-98/mcp-server
- Editor extension for Kiro (Open VSX): https://open-vsx.org/extension/exorcist-98/exorcist-98-kiro
- Kiro Power: https://github.com/pranavsaji/exorcist-98/tree/main/power
- Kiro Crew app: https://github.com/pranavsaji/exorcist-98-crew
Built With
- amazon-bedrock
- esbuild
- fast-check
- github-actions
- kiro
- mcp
- next.js
- node.js
- playwright
- react
- tailwindcss
- typescript
- vercel
- vitest
- zod