CtrlK
BlogDocsLog inGet started
Tessl Logo

testland/cross-tenant-data-leak-tests

Workflow-driven skill that plans and implements the cross-tenant leak-test suite - from surface inventory to the runtime CI gate a multi-tenant codebase must pass on every PR. The planning section inventories tenant-bearing surfaces (tables, APIs, object storage, search, queues, caches), classifies each by isolation model (silo / pool / bridge, per references/isolation-models.md), and derives the OWASP WSTG-ATHZ-02 coverage matrix. The battery defines the canonical test patterns (read-other-tenant-by-id, list-leak, spoofed-tenant-id-in-body, JWT-replay, FK-cross-tenant, unique-collision side channel, object-storage IDOR, search-index-direct-query, async-job-context-reload, cache-key-collision), the 404-vs-403 disclosure trade-off, the Postgres-RLS-direct patterns, and the CI integration (non-superuser non-BYPASSRLS role, fail the build on any leak). Use when designing or implementing a tenant-isolation test suite, adding the CI gate to an existing project, or investigating a leak finding.

90

1.05x
Quality

90%

Does it follow best practices?

Impact

94%

1.05x

Average score across 3 eval scenarios

SecuritybySnyk

High

Do not use without reviewing

Overview
Quality
Evals
Security
Files

test-surfaces.mdreferences/

Test surface by tenant-isolation model

Isolation tier mapping

A common pattern is independent isolation per architecture tier:

TierCommon choice
UIShared host name (fully multitenant)
API gatewayShared, with tenant claim in JWT
Application servicesShared, tenant context in every request
Async queues / topicsShared topic with tenant_id message attribute, or per-tenant queue
DataOften partitioned: tables with tenant_id (pool); schemas per tenant (bridge); databases per tenant (silo)
Object storagePer-tenant prefix in bucket (pool); bucket per tenant (silo)
Search indexPer-tenant routing key (pool); index per tenant (silo)

The test surface depends on the lowest isolation level in the stack. A fully isolated UI but shared database still requires the full cross-tenant data-leak test battery against the database.

Required test categories per model

ModelRequired test categories
Silo / single-tenantTenant-to-deployment routing; per-deployment health; deployment automation
Pool / fully-sharedCross-tenant data leak (highest priority); tenant_id propagation; noisy-neighbor mitigation; quota enforcement
Bridge / horizontalPool tests + database routing per tenant; cross-database query rejection
VerticalPool + silo tests + tier-migration tests

The cross-tenant data leak suite is the universal floor: even silo deployments share some surface (account-management APIs, billing, identity providers) where pool-like leaks are possible.

SKILL.md

tile.json