# Cross Tenant Boundary Discovery

> Locate every point where one tenant's data could cross into another's, using two tenants you control. Use when the API is multi-tenant and you can operate two separate tenants for testing

- Skill: `wsh7ash/cross-tenant-boundary-discovery` (Agent Skill)
- Install (CLI): `npx get-skill add wsh7ash/cross-tenant-boundary-discovery`
- Raw SKILL.md: https://api.skillmd.com/api/skills/wsh7ash/cross-tenant-boundary-discovery/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Product & Planning
- Author: Wsh7Ash (https://skillmd.com/u/wsh7ash)
- Updated: 2026-11-22
- Page: https://skillmd.com/skills/wsh7ash/cross-tenant-boundary-discovery

---


# Cross-Tenant Boundary Discovery

> Locate every point where one tenant's data could cross into another's, using two tenants you control

**Use when:** the API is multi-tenant and you can operate two separate tenants for testing

**Avoid when:** you have only one tenant available, where cross-tenant tests cannot be performed honestly

## Procedure

1. Create two tenants you are authorized to use and populate each with clearly labeled fixtures so leakage is unmistakable.
2. Record how tenant context is derived: claim, header, host, API key or a server-side session attribute.
3. Identify every endpoint that returns lists, exports, search results or aggregates, since those are where isolation must be enforced.
4. Run each tenant's requests while watching for the other tenant's fixture labels appearing anywhere in responses.
5. Check background and asynchronous paths such as webhooks, exports and caches, which often bypass the request-scoped filter.
6. Document the tenant derivation mechanism per endpoint group, marking any endpoint where it is absent.

## Signals

- A response contains a fixture identifier that belongs to the other test tenant.
- Tenant context comes from a client-supplied header with no server-side confirmation.
- Search or aggregation results are broader than the tenant filter applied to plain list endpoints.
- An asynchronous export delivered later contains objects from both test tenants.

## Patterns

**1. Fixture labeling**

```text
tenant A fixture: ACME-ALPHA-001   tenant B fixture: ACME-BETA-002
leak detector: response contains the other tenant's label -> finding
```

**2. Derivation table**

```text
endpoint group | tenant from | client-controllable
/api/v2/*      | claim       | no
/api/export   | header      | yes -> verify server-side binding
```

**3. Async check**

```text
export job submitted as A -> download -> scan for B labels
```

## Pitfalls

- Testing with two accounts in one tenant, which proves nothing about tenant isolation.
- Checking only synchronous responses while the leak happens in a background job or cached view.
- Skipping endpoint groups such as webhooks and exports, which frequently lack the request-scoped filter.

## Done when

- Tenant derivation is documented per endpoint group, and both tenants' fixtures are checked on list, search, export and async paths.
- Any endpoint with no server-confirmed tenant derivation is flagged for focused review.

## References

- [OWASP API Security Top 10](https://owasp.org/www-project-api-security/)
- [OWASP Web Security Testing Guide](https://owasp.org/www-project-web-security-testing-guide/)

