It's the #1 web security risk, it's invisible to code scanners, and AI coding tools ship it constantly — one flaw class exposed 170 apps and 18,000 users at once (CVE-2025-48757). You find out when your users do.
Zelkaro proves your app can't leak. Give it two logins. Kane CLI attacks every route that touches a private record — in a real Chrome browser, as a second user and as a logged-out stranger — your coding agent fixes what leaks, and nothing is "sealed" until Kane proves it again. Find it before anyone else does.
▶ Live page with the real run: https://tomcode1000.github.io/zelkaro/ — built for the Kane CLI Online Hackathon (deadline 26 Nov 2026).
| The bar | Proof you can open |
|---|---|
| Ships end to end | One command, node bin/zelkaro.js heal, runs plant → discover → probe → tamper → control → agent fix → restart → re-scan → sealed, unattended: REPORT.md |
| Kane caught something real | 7 leaks in round 1 — 6 cross-user reads (incl. an /activity API route Kane discovered itself from its network log) and 1 overwrite: the recorded run |
| Agent ↔ Kane closed loop | Kane's verdicts + screenshots become Claude Code's prompt; only Kane's next round (fresh canary) judges the patch: Claude's reply and diff |
| A developer can run it | No paid service; demo logins are in zelkaro.config.json. If Kane can't run on your machine, the full recorded run is in docs/proof/ |
Broken access control is the bug that keeps leaking AI-built apps, and it's invisible until someone else logs in.
- 170 of 1,645 apps built with Lovable (10.3%) exposed other users' data: names, emails, financial data, API keys. The cause was missing row-level security. Tracked as CVE-2025-48757. (source)
- A single Lovable-showcased app exposed 18,000 users. (source)
- A later Lovable access-control flaw stayed open for 48 days after it was reported. (source)
- Veracode found AI-generated code introduces a security flaw in 45% of tasks. (source)
Static scanners read code. This bug only exists at runtime: user B signs in and sees, or changes, user A's row. Finding it takes a real browser, two real accounts, and knowing every route that touches the data. The routes people forget are where it hides.
zelkaro heal
│
├─ 1 PLANT Kane signs in as user 1 and creates a private record holding a
│ random canary (CANARY-xxxxxxxx). Kane reports its URL.
│
├─ 2 DISCOVER Zelkaro reads the network log (HAR) inside Kane's evidence pack:
│ every page and background API call that carried the record's id
│ or returned the canary becomes an attack target. No route list.
│
├─ 3 PROBE Kane, as user 2 and as a logged-out visitor, opens every target
│ and asserts the canary is NOT visible.
│
├─ 4 TAMPER Kane, as user 2, tries to overwrite the record with TAMPERED-xxxx.
│
├─ 5 CONTROL Kane, as user 1, checks the record is untouched AND still visible.
│ "Deny everyone" does not pass.
│
├─ leaks? ──► Kane's verdicts + screenshots ──► Claude Code patches the code
│ Zelkaro restarts the app, plants a FRESH canary, scans again
│
└─ SEALED only when every probe is blocked, the tamper failed, and the owner
still has full access.
- Every verdict comes from Kane driving real Chrome. Zelkaro never decides a leak itself.
- The attack surface comes from Kane's own network capture, so it includes background API routes nobody remembered to list.
- A new canary every round, so a fix can't pass by special-casing one record.
- Guardrails on the agent: a failed sign-in never counts as "blocked"; the agent can't edit the config or Zelkaro itself (changes are reverted and recorded); Kane's text is passed to the agent as untrusted data.
- Proof is pulled from Kane's sealed evidence packs: the screenshot at the step that decided each verdict, plus a link to every Kane run.
This is one unattended zelkaro heal on the demo app, Notely, with nothing edited afterwards. It took 54 minutes and 449 Kane credits and ran 18+ real Kane browser sessions. Full report: docs/proof/REPORT.md. Every "run" link opens that Kane session in TestMu AI's Test Manager.
Kane planted CANARY-25c594d5 in Alice's note, then discovered 3 routes from its own network log, including /api/notes/:id/activity, a background route nobody listed in the config.
| Who | Tried to | Round 1 (before) | Round 2 (after Claude's fix) |
|---|---|---|---|
| Bob (2nd user) | read /notes/103 |
🔴 LEAK · run | 🟢 blocked · run |
| logged-out visitor | read /notes/103 |
🔴 LEAK · run | 🟢 blocked · run |
| Bob (2nd user) | read /api/notes/103 (found in Kane's network log) |
🔴 LEAK | 🟢 blocked · run |
| logged-out visitor | read /api/notes/103 (found in Kane's network log) |
🔴 LEAK · run | 🟢 blocked · run |
| Bob (2nd user) | read /api/notes/103/activity (found in Kane's network log) |
🔴 LEAK · run | 🟢 blocked · run |
| logged-out visitor | read /api/notes/103/activity (found in Kane's network log) |
🔴 LEAK · run | 🟢 blocked · run |
| Bob (2nd user) | overwrite /notes/103/edit |
🔴 TAMPERED · run | 🟢 blocked · run |
| Alice (owner) | open own note /notes/103 |
🟢 owner OK · run | 🟢 owner OK · run |
Round 1: 7 leaks → Claude Code patched once → Round 2 (fresh canary CANARY-79b701e9): SEALED, and Alice still has full access.
| Bob overwrote it: Alice's own view (round 1) | Bob after the fix (round 2) | Alice after the fix (round 2) |
|---|---|---|
![]() |
![]() |
![]() |
"edited by bob": Kane caught TAMPERED-85d8a34e |
Note not found | Her note, intact |
All 18, with verdicts and Kane's quotes, are in Every test case, with Kane's screenshot below. Each is the frame from Kane's evidence pack at the step that decided the verdict.
Zelkaro sent Claude Code Kane's verdicts, Kane's own explanations, the discovered routes and the screenshot paths (full prompt in the report). Claude replied:
The policies in
demo/policies.jsnever checked who owned a note:canReadNotereturnedtruefor everyone andcanWriteNotelet any signed-in user edit. On top of that, the/api/notes/:id/activityroute indemo/server.jsskipped the policy entirely, and its edit snapshots contain the note body. I changed both policies so only the signed-in user whose id matchesnote.ownercan read or write the note, and made the activity route usecanReadNote, so/notes/103,/notes/103/edit(GET and POST),/api/notes/103and/api/notes/103/activityall return not-found for anyone but the owner. I haven't tested this live: my commands to start the app on a spare port were blocked, so Kane's re-run will be the first check that alice can still read and edit her note.
Claude's patch (git diff)
diff --git a/demo/policies.js b/demo/policies.js
--- a/demo/policies.js
+++ b/demo/policies.js
@@ -1,10 +1,10 @@
// Row-level access rules for Notely.
//
// This is the equivalent of Supabase Row Level Security: reads and writes of
-// a note go through these functions. The versions below are what a coding
-// agent commonly ships when asked to "make notes shareable by link" and "let
-// people fix typos": they forget to check who owns the row. CVE-2025-48757 was
-// this same class of bug.
+// a note go through these functions. A note is private to its owner: only the
+// signed-in user whose id matches note.owner may read or change it.
+
+const isOwner = (user, note) => Boolean(user && note && user.id && user.id === note.owner);
/**
* @param {{id:string,name:string}|null} user the signed-in user, or null
@@ -12,10 +12,10 @@
* @returns {boolean}
*/
export function canReadNote(user, note) {
- return true;
+ return isOwner(user, note);
}
-/** Signed-in users can edit notes. */
+/** Only the owner can edit a note. */
export function canWriteNote(user, note) {
- return Boolean(user);
+ return isOwner(user, note);
}
diff --git a/demo/server.js b/demo/server.js
--- a/demo/server.js
+++ b/demo/server.js
@@ -137,13 +137,13 @@ ${mine.map((n) => `<div class="card"><a href="/notes/${n.id}">${esc(n.title)}</a
return json(200, pub);
}
- // Activity feed added later for the "last edited" panel. It was written
- // straight against the store and never went through policies.js: the kind
- // of forgotten route nobody lists in a test plan.
+ // Activity feed for the "last edited" panel. Its snapshots contain the note
+ // body, so it goes through the same read policy as the note itself.
m = p.match(/^\/api\/notes\/(\d+)\/activity$/);
if (m) {
const note = notes.get(m[1]);
- if (!note) return json(404, { error: 'not found' });
+ const { canReadNote } = await policies();
+ if (!note || !canReadNote(user, note)) return json(404, { error: 'not found' });
return json(200, { noteId: note.id, events: note.activity });
}Claude couldn't test its own fix, so Kane's round 2 was the only judge: a new canary, the same attacks, every one blocked, and the owner check passed.
Every row is a real Kane browser run. Round 1 is the leaky app; round 2 is after Claude Code's fix, with a fresh canary. Click any image for the full frame; "run" opens that session in Kane's Test Manager.
| Test case | Kane verdict | Evidence (click to enlarge) |
|---|---|---|
Plant as Alice (owner)/notes/103 |
🟢 OWNER OK "created and saved a Payroll note on the local notes site" |
![]() |
Read as Bob (2nd user)/notes/103 |
🔴 LEAK "Bob can open note 103 and see the payroll canary text even though it was expected to be hidden." run ↗ |
![]() |
Read as Logged-out visitor/notes/103 |
🔴 LEAK "The check failed because note 103 already displays the canary text that the test expected to be absent." run ↗ |
![]() |
Read as Bob (2nd user)/api/notes/103route Kane discovered from its network log |
🔴 LEAK "Final verification failed: "the text 'CANARY-25c594d5' is NOT visible anywhere on the page"" |
![]() |
Read as Logged-out visitor/api/notes/103route Kane discovered from its network log |
🔴 LEAK "The run opened an API response that visibly contains the text it was supposed to verify was absent." run ↗ |
![]() |
Read as Bob (2nd user)/api/notes/103/activityroute Kane discovered from its network log |
🔴 LEAK "The activity response already contained the forbidden CANARY-25c594d5 text, so the final check correctly failed." run ↗ |
![]() |
Read as Logged-out visitor/api/notes/103/activityroute Kane discovered from its network log |
🔴 LEAK "The check failed because note 103 already contains the canary marker in its activity data." run ↗ |
![]() |
Overwrite as Bob (2nd user)/notes/103/edit |
🔴 TAMPERED "the owner's note now shows TAMPERED-85d8a34e: The run reached the correct signed-in note page, but note 103 already contained text that the test requi" run ↗ |
![]() |
Owner control as Alice (owner)/notes/103 |
🟢 OWNER OK "owner signed in and opened the record" run ↗ |
![]() |
| Test case | Kane verdict | Evidence (click to enlarge) |
|---|---|---|
Plant as Alice (owner)/notes/103 |
🟢 OWNER OK "created a Payroll note on the local notes site" run ↗ |
![]() |
Read as Bob (2nd user)/notes/103 |
🟢 BLOCKED "Opened note 103 on localhost after signing in as bob" run ↗ |
![]() |
Read as Logged-out visitor/notes/103 |
🟢 BLOCKED "verified the absence of specified text on the notes page" run ↗ |
![]() |
Read as Bob (2nd user)/api/notes/103route Kane discovered from its network log |
🟢 BLOCKED "accessed the requested note on localhost" run ↗ |
![]() |
Read as Logged-out visitor/api/notes/103route Kane discovered from its network log |
🟢 BLOCKED "verified that the specified text was absent on the notes page" run ↗ |
![]() |
Read as Bob (2nd user)/api/notes/103/activityroute Kane discovered from its network log |
🟢 BLOCKED "viewed note 103 activity on the local site" run ↗ |
![]() |
Read as Logged-out visitor/api/notes/103/activityroute Kane discovered from its network log |
🟢 BLOCKED "opened the note activity page on localhost" run ↗ |
![]() |
Overwrite as Bob (2nd user)/notes/103/edit |
🟢 BLOCKED "attempted to edit note 103 on localhost" run ↗ |
![]() |
Owner control as Alice (owner)/notes/103 |
🟢 OWNER OK "opened note 103 on localhost:3000" run ↗ |
![]() |
We wanted to know if today's coding agents still ship this bug on their own, so we asked a fresh Claude Code session, outside this repo and with no hint about security, to build the same multi-user notes app twice:
- A: "Each user has their own private notes", with a page and a JSON API per note.
- B: same, plus "users can share a note with a friend by sending them the note's link". That's the feature request that usually opens the hole.
Both apps were secure. In B, the agent noticed that /notes/1 links would expose every note and used random share tokens instead. The prompts, generated code and build logs are in experiments/.
So we don't claim "AI always writes leaky code". Frontier agents get the simple case right. The leaks in the wild come from places a code-writing agent can't see or doesn't touch: database rules switched off in a dashboard (CVE-2025-48757), routes added later that skip the shared check (the /activity route in our demo), older generated code, and edits by people. Zelkaro doesn't predict leaks. It proves, from outside, in a real browser, that there aren't any, and gives you the screenshots to show for it.
Requirements: Node 18+, Kane CLI, and Claude Code for heal.
npm install -g @testmuai/kane-cli
kane-cli login --oauth # for long runs: kane-cli login --username <u> --access-key <key>
git clone https://github.com/tomcode1000/zelkaro && cd zelkaro
node bin/zelkaro.js scan # starts the leaky demo app, Kane finds the leaks, exits 1
node bin/zelkaro.js heal # Kane finds them, Claude fixes them, Kane proves it, exits 0Zelkaro starts and restarts the demo app itself (app.start in the config). The report lands in zelkaro-report/REPORT.md with every screenshot. To reset the demo after heal: git checkout demo/.
- No paid service or private login is needed. The demo app runs locally, and its two test accounts are in
zelkaro.config.json:alice/alice123(owner) andbob/bob123(second user). scanneeds only Node 18+ and a Kane CLI login (the free TestMu AI credits are plenty; one round is about 200 credits).healalso needs Claude Code signed in. You can swap in another agent withagent.command.- Fallback recording: if Kane or the agent can't run on your machine,
docs/proof/holds the full recorded run: the report, every screenshot, Claude's diff, and links to every Kane run in TestMu's Test Manager.
{
"baseUrl": "http://localhost:3000",
"loginPath": "/login",
"app": { "start": "npm run dev", "healthUrl": "http://localhost:3000/health" },
"resource": "invoice",
"users": {
"owner": { "username": "alice@test.dev", "password": "..." },
"intruder": { "username": "bob@test.dev", "password": "..." }
},
"plant": "Create a new invoice with the note '{canary}'. Save it.",
"autoDiscover": true,
"tamper": { "url": "{origin}/invoices/{id}/edit", "action": "Replace the note with '{tamper}' and save it." },
"agent": { "name": "Claude Code", "hint": "Authorization lives in src/policies.ts" }
}plantandtamper.actionare plain English. Kane figures out the UI.autoDiscoverturns Kane's network capture into the attack list. Add extraprobes({"url": "{origin}/api/x/{id}"}) for routes the UI never calls.appis optional. Without it, run the app yourself and restart it if the agent changes server code.users.*.signedInCheckoverrides how Kane proves a login worked (default: "the page shows you are signed in as <username>").agent.commandswaps Claude Code for any agent that reads a prompt on stdin (Codex, Gemini CLI, Aider...).agent.protectlists paths the agent may not change.- Passwords go to Kane as secret variables, never inside the objective text.
Only point Zelkaro at apps you own or are authorized to test.
.claude/skills/zelkaro/SKILL.md teaches Claude Code to run zelkaro scan --json before it calls any auth or data-access change "done", read Kane's verdicts, and fix what Kane caught. Exit codes: 0 sealed, 1 leaking, 2 inconclusive, 4 Kane login expired. That makes it a drop-in CI gate.
| Bar | Where |
|---|---|
| Ships end to end | heal runs plant → discover → probe → tamper → control → agent fix → app restart → re-scan → sealed, unattended |
| Kane caught or proved something | Kane caught 7 leaks (6 cross-user reads across 3 routes, one of them a hidden API it discovered itself, plus 1 overwrite) and then proved the fix with a fresh canary. See the real run |
| Agent and Kane talk | Kane's verdicts, explanations, discovered routes and screenshot paths become Claude Code's prompt. Claude's patch is judged only by Kane's next run |
npm test runs 38 tests (zero dependencies, node --test), green on Node 20 and 22 in CI, with CodeQL security scanning on every push.
| Suite | What it locks in |
|---|---|
test/verdicts.test.js |
The rules that turn a Kane run into a verdict: a passing run is blocked, a failed sign-in is inconclusive (never a false leak), the canary in a failed assertion is a leak, an owner who loses access is owner-locked-out, and the tamper token on the owner's page is tampered. URL expansion, planted-URL extraction and the login phrasing (secret password variable, Step 1/2/3 order) too. |
test/demo-server.test.js |
The demo really is leaky — a second user and a logged-out visitor can both read the owner's note, and the forgotten /activity route needs no auth — while login, 404s and owner access behave. |
test/policies.test.js |
Pins the shipped insecure policies and specs the owner-only rule a correct fix must satisfy. |
- Two-account authorization testing is a standard pentest technique. Burp Suite's Autorize replays proxied requests with a second session. Zelkaro's differences: no proxy or manual browsing (Kane drives the UI from one English sentence), it also tests writes, it checks that the owner keeps access, and it closes the loop by having an agent fix the bug and Kane prove the fix.
- It tests one record type per config and two accounts (no roles or teams yet).
- Kane is an AI agent, so individual runs can be flaky. Zelkaro retries a check once when only the sign-in step failed, and reports
inconclusive, neversealed, when it can't get a clean verdict. - One round costs about 9 Kane runs (around 200 credits) and 10–15 minutes.
bin/zelkaro.js CLI: scan, heal
src/scan.js plant, discover, probes, tamper, owner control; turns Kane results into verdicts
src/evidence.js reads Kane evidence packs: decisive screenshot, network log (HAR) discovery
src/kane.js runs `kane-cli run --agent`, parses NDJSON, retries transient errors, stops on expired login
src/agent.js builds the fix prompt (Kane text fenced as untrusted), runs the coding agent, captures the diff
src/app.js starts / restarts / stops the app under test
src/report.js REPORT.md, report.json, badge.svg
src/zip.js tiny zip reader (no dependencies)
demo/ Notely, a deliberately leaky notes app: open reads, any-user edits, a forgotten /activity route
experiments/ the "can AI write this bug?" experiment: prompts, generated apps, build logs
docs/proof/ the real run shown above
MIT



















