Inspiration
An extension says "color theme" and its code reads your SSH keys. The label and the contents disagree, and nobody notices until it hurts. We wanted a guard that opens the box and compares the label with the contents, that never runs the code, and that a non-expert can understand. Read before you install.
What it does
Gulyabani has two gates and one court.
- Extension Gate. Checks an extension on Open VSX (the registry used by Kiro, Cursor and VSCodium) for three things: malicious code, evil twins (a copy of a trusted extension under another publisher) and possession (a trusted extension whose latest update suddenly behaves differently).
- Contract Gate. Reads a Solidity file as text with seventeen rules and a layer that combines weak signals.
- The court. Stage 1 is plain code. When it finds something worth arguing about, two AI agents argue: a Hunter accuses, a Devil's Advocate defends. They may only cite numbered excerpts that code tools extracted. A deterministic Judge decides. An AI never has the last word, and it can never lower what the code found.
Every scan ends with a card a non-expert can read: the verdict, one plain sentence of why, what to do next and the exact lines as evidence. It can also say "I could not check this", and it never calls that clean.
How we measured it (the part we are proudest of)
A security tool is judged by what it caught, and by how honestly it reports what it missed. So the measurement is a first-class part of the project, and the rules for it are public (docs/measurement-protocol.md).
- Sample sets are written down before the first run. Every result file stores the hash of its set.
- A set whose evidence we read in order to fix a rule becomes a development set, and we say so next to its numbers.
- Independent contract set: 115 production files from Solmate, Uniswap v2 and v3, and Aave v3, picked by a rule fixed before scanning. First scan: 18 of 115 (15.7%) were flagged with a medium or high finding. That is the honest false-alarm figure. We then fixed the general shapes behind the false alarms and got 8 of 115 (7.0%), but that second number is a development number.
- Development sets: all 143 known-vulnerable contracts have a finding (142 a medium or high one; the last is an ERC-20 approve race we lowered on purpose), and 0 of 18 OpenZeppelin files have a medium or high finding.
- Independent extension set: 3 of 9 popular extensions were flagged on the first scan. Reading them showed address-like numbers inside SVG data, a domain list entry and a dictionary file name. We fixed those shapes and kept one finding on purpose: a build script that downloads with
curl. - Live window: 614 new Open VSX versions, frozen list, rules only. 149 flagged, 465 could not be checked, 0 confirmed malicious. We read all 47 archives with a high finding by hand: 39 false alarms, 8 expected behaviour (mostly security tools quoting an attack phrase as their own rule). We narrowed three rules for that, so this window is now a development set; re-scanning the 149 gave 16 archives with a high finding instead of 47. Nothing was reported to Open VSX because nothing was confirmed.
- Second live window (independent): 332 newer versions in neither the first manifest nor the first log, frozen before scanning, rules only, no rule changed afterwards. 84 flagged, 248 could not be checked, 0 confirmed malicious. 5 had a high finding and we read all 5 in the real files: 3 security tools quoting an attack phrase as a detection pattern, 2 false alarms of the wallet rule in large bundled libraries (the known file-wide limit). The AI court ran on those 5: all stayed suspicious, none came out malicious or clean. We also read the evidence lines of the other 79 flagged (quoted lines, not whole files): none was malicious, they were library data, tools that start programs by design and plain strings. No rule was changed for them. The court did not run on those 79.
- Online check (same 50 samples, network on): the harness is offline on purpose, so its cards cannot say "clean". With the network on and the same rules, the first 50 samples of the second window gave 22 clean, 17 flagged and 11 could not be checked; the offline run gave 38 could not be checked and 12 flagged for the same 50. What remains are binary files and text files over 5 MB that the rules do not read, and Evil Twin checks where the Marketplace could not be reached. The flags are leads nobody has read yet, and 50 is a small sample.
- AI court on the contract set, current rules: ran on 142 files, no errors, no change to which files are flagged. It raised 25 findings by one step and added 36 low, uncertain suggestions; it lowered nothing. On extensions the court ran on 48 live-window archives: the 16 with a high finding (15 stayed suspicious; 1 came out malicious and, on reading the real file, is a false alarm: an AI-governance tool quoting its own detection patterns) and 32 more flagged ones, the first 32 in a fixed order (all 32 stayed suspicious). It cleared none.
How we built it
Spec-first in Kiro. Steering files hold the honesty rules (no verdict without evidence, unread input is never "clean", English-only project text). Each feature went requirements, design, tasks before code. Two bugfix specs removed false alarms. Two agent hooks check on every save that no code path labels unread input as clean and that no test was marked as expected-to-fail to hide a bug. A read-only auditor agent checks the code against the honesty rules. The project's own MCP server is registered so Kiro can call Gulyabani. Kiro CLI runs the auditor agent headless and read-only: its audit of the honesty rules found eleven points, which are kept unchanged and triaged in docs/kiro-cli-audit.md. A Kiro Crew scheduled job read the results of a local watch scan of popular extensions (every six hours, then every hour on 2026-12-01, when we stopped it) and reported which were flagged, unchecked or changed; its first run miscounted, we caught it against the cards and fixed the prompt. Property-based tests (Hypothesis) check things like "the Judge is deterministic" and "a defender can never raise the accusation score". The Kiro Power (power/gulyabani) bundles the MCP server and two skills; it was installed in Kiro and also started from the public repository in an empty folder with a real MCP handshake. A Kiro Workflows recipe runs three independent read-only reviewers on one saved card and merges them; Kiro's schema check rejected our first draft, we fixed it from the documentation, and it ran to the end once (the reviewers could not read the extension archive, so we claim only that the recipe works). The product itself also uses Kiro's configuration: gulyabani kiro-setup writes a steering file and a read-only card-reader agent into a user's project. What Kiro did and did not do is recorded plainly in docs/kiro-usage-log.md.
Challenges
- Keeping the AI from becoming the authority. The Judge is code, and the deterministic result is a floor that no AI answer can lower.
- False alarms. Rules that catch real attacks also fire on proxies, libraries and build scripts. We measure on code we have not read, report the first result, and disclose every rule changed afterwards.
- Hostile text. An extension can contain text addressed to the AI reviewer. Text inside an extension is data, never instruction, and such text earns a red flag.
Accomplishments
- A false-alarm figure on code nobody tuned for, published with its first result and its caveat.
- A court where every claim must quote lines that exist, or it is thrown out.
- Two gates sharing one court and one card format.
What we learned
Honest numbers are harder and more convincing than good numbers. Reading the first result of an independent set teaches more than any amount of tuning on a set you already read.
What Gulyabani does not do
It never runs extension code, so it cannot see what a server sends an extension later. It does not compile contracts or see bytecode, other files or chain state. Neither gate can see key compromise or account takeover. The full list is in docs/what-it-does-not-cover.md and docs/contract-gate-limits.md.
What's next
The AI court on all flagged archives (it has run on 48 of the 144 flagged in window 1 and on the 5 high-finding archives of window 2), storing the court's reasoning in every result row, and reporting confirmed findings to Open VSX first.
Built with
Python 3.12, FastAPI, Typer, Hypothesis, Kiro (IDE steering, specs, hooks, agent, skill, MCP; Kiro CLI; Kiro Crew), Open VSX API.
Kiro write-up (how Kiro was used)
- IDE: specs (requirements, design, tasks), steering files with the honesty rules, agent hooks on save, a read-only card-reader agent, two skills, MCP registration, property-based tests written with Kiro's help.
- CLI: ran the read-only auditor agent headless; 11 findings kept unchanged and triaged in
docs/kiro-cli-audit.md. - Crew: one scheduled job over the watch-scan results, every six hours until 2026-12-01, then every hour that day until we stopped it (6 Crew reviews by 2026-12-01 09:27 UTC, the first on 2026-11-30 09:23 UTC; one of them listed a real version change, vscodevim.vim 1.33.0 to 1.33.1). Approval mode is automatic and Windows has no sandbox for it; both are recorded in
docs/kiro-usage-log.md. - Powers:
power/gulyabanibundles the MCP server and two skills; installed in Kiro and started from the public repo with a real MCP handshake. - Workflows: one recipe with three read-only reviewers, run twice. The first run (an extension archive) proved only that the recipe runs, because the agents could not read the zip. The second run (a plain-text contract card) completed: the card auditor found the quote on the cited line, and the hunter added two small points that we checked by hand and are correct. It checks where the quote sits, not whether the finding is right.
- Kiro Web: not used.
- Where Kiro did not help, and what we did by hand, is in
docs/kiro-usage-log.md.
Links
- Repository: https://github.com/Mavi-lab533/gulyabani
- Demo video (2:08): https://youtu.be/_EWOtqB6IR0
- Demo cards: https://mavi-lab533.github.io/gulyabani/