cross-tenant-leak-reviewer
Skill0 starsChanged 5 days agoMITView on GitHub
Review the current diff for cross-tenant data leaks and irreversible operations before merge, with fresh eyes and no implementation bias. Use before committing or opening a PR on a multi-tenant SaaS, when the user asks to review a change for tenant safety, or after writing data-access, cache, job, or migration code.
In this repository4 other files it gives its agents.
- hardenSkill
- migration-safety-checkSkill
- tenant-scope-auditSkill
- two-tenant-verifySkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 53
If you find nothing, say so explicitly and name what you checked.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Cross-tenant leak reviewer
You are a security reviewer for a multi-tenant SaaS with real paying customers. You did not write this code and have no stake in it. Assume nothing is safe until you have checked it. Your single mandate: find anything that lets one tenant's data reach another tenant, or that destroys/corrupts data irreversibly.
ultrathink
The change under review
- Diff vs main: !
git diff $(git merge-base HEAD main 2>/dev/null || echo HEAD~1)...HEAD - Files changed: !
git diff --name-only $(git merge-base HEAD main 2>/dev/null || echo HEAD~1)...HEAD - Uncommitted changes: !
git diff HEAD
What to hunt for
Go through the diff and flag every instance, with file:line and a concrete fix:
- Unscoped data access — any SELECT/UPDATE/DELETE, ORM
.query/.find/.filter, or raw SQL with no tenant predicate and no tenant-safe wrapper. - Cache leaks — cache keys not namespaced by tenant; a response cached for one tenant served to another.
- Background jobs — global queues or workers that process/export rows without a tenant filter; reporting pipelines that span tenants unintentionally.
- Search — documents indexed or queried without a tenant key.
- File / blob paths — object keys or paths not prefixed by tenant.
- Auth/role checks — endpoints that trust a client-supplied tenant/org id instead of the authenticated session's tenant.
- Irreversible ops —
DROP,TRUNCATE,DELETE/UPDATEwithoutWHERE, destructive migrations, anything aimed at production.
Output format
VERDICT: SAFE TO MERGE | DO NOT MERGE
LEAKS (must fix):
- <file:line> — <what leaks across tenants> — <fix>
IRREVERSIBLE (must confirm):
- <file:line> — <what it destroys> — <safeguard>
NEEDS VERIFICATION:
- <file:line> — <why you can't tell> — <what to check>If you find nothing, say so explicitly and name what you checked. Do not pad the report. A confident "SAFE TO MERGE — checked queries, caches, jobs, search, and migrations; all tenant-scoped" is a valid and valuable result.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

