← ClaudeAtlas

saas-tenant-isolationlisted

Audit multi-tenant SaaS applications for cross-tenant data leakage including query scoping, tenant_id enforcement, cache key isolation, file storage path scoping, search index isolation, and tenant binding across billing, analytics, and background jobs. Use this skill whenever the user mentions multi-tenant, tenant isolation, cross-tenant leak, tenant_id, organization scoping, workspace isolation, B2B isolation, "are my tenants isolated", shared database with tenant column, schema-per-tenant, or database-per-tenant. Trigger on phrases like "audit my multi-tenancy", "check tenant isolation", "cross-tenant data leak", "tenant_id scoping", "are my orgs isolated". Use this even when only one isolation surface is mentioned.
hlsitechio/claude-skills-security · ★ 1 · AI & Automation · score 65
Install: claude install-skill hlsitechio/claude-skills-security
# SaaS Tenant Isolation Audit Audit a multi-tenant SaaS for cross-tenant data leakage paths. The single most dangerous class of bug in B2B SaaS — one breach exposes every customer. ## When this skill applies - Reviewing query patterns in a shared-database multi-tenant architecture - Checking that every data-access path enforces `tenant_id` / `org_id` / `workspace_id` scoping - Auditing cache key construction (Redis, in-memory, CDN) - Reviewing file storage path conventions - Reviewing search indices (Elasticsearch, Algolia, Meilisearch) for cross-tenant filters - Reviewing background jobs and queues for tenant binding Use other skills for: row-level enforcement in Postgres (`supabase-security-audit`), auth checks per object (`saas-code-security-review`), API rate limits per tenant (`saas-api-security`). ## Tenancy models Identify which model the app uses; the audit approach differs. | Model | Description | Primary risk | |-------|-------------|--------------| | **Shared DB, shared schema, tenant column** | One DB, one schema, `tenant_id` column on every table | Missing WHERE clause on any query | | **Shared DB, schema per tenant** | One DB, schema named per tenant; connect to that schema | Wrong schema selected; cross-schema query | | **DB per tenant** | One DB per customer | Connection string mix-up; admin tooling crossing tenants | | **Hybrid (sharded)** | Tenant maps to a specific shard | Misrouted query lands on wrong shard | Most SaaS use shared DB + tenant colum