How I built a prompt injection scanner with Kiro CLI (Kiroween 2026)
I wrote this post as part of the Kiroween 2026 hackathon. The project is InjectGuard, built by Manadger Tech with Kiro. The problem AI agents read emails, web pages, support tickets and files. Attackers can hide instructions inside that content, for example "ignore all previous instructions" in an HTML comment, in zero-width characters, or in a base64 string. This is called indirect prompt…
In the Kiroween 2026 hackathon, a team from Manadger Tech created a tool called InjectGuard using Kiro CLI. The tool scans text for potential prompt injection attacks, where attackers hide malicious instructions in emails, web pages, support tickets, and files. InjectGuard provides a risk level, a score, and identifies specific spans that may contain problematic content.
The scanner also includes a sanitizer to remove hidden characters and offers a command line interface, as well as a browser demo that runs offline. The project uses zero dependencies and requires Node.js 20 or later. The source code is available on GitHub under the MIT license, and a live demo is accessible at https://manadgertech.github.io/injectguard/web/.
The development process utilized Kiro CLI in headless mode, with three steering files (product.md, tech.md, and structure.md) setting the project's goals and limits. These files included requirements written in EARS style, a design with detection rules, and a task list. Kiro worked through the tasks one by one, resulting in the creation of the scanner, CLI, sanitizer, web demo, and 99 tests. A hook was implemented to run the test suite whenever a file in the src/ directory was saved.
One significant lesson learned was that a failing test using the string "\uE0041" revealed that the scanner did not handle the Unicode tag block correctly. The fix involved working with code points and using the 'u' flag in regular expressions. Through the use of tests and a continuous workflow, the team was able to identify and fix issues that may have otherwise been overlooked.
InjectGuard, while not a guarantee against all prompt injection attacks, serves as an additional layer of defense. The project's creators welcome feedback and issues on GitHub for further improvements.
Rewritten by urgent.news; may contain errors — check the original.
Source: dev.to