# Bulk Endpoint Object Scoping

> Verify that endpoints accepting lists of identifiers apply ownership checks to every item, not just the first. Use when an endpoint takes an array of ids in the query or body, such as fetch-many, delete-many or update-many

- Skill: `wsh7ash/bulk-endpoint-object-scoping` (Agent Skill)
- Install (CLI): `npx get-skill add wsh7ash/bulk-endpoint-object-scoping`
- Raw SKILL.md: https://api.skillmd.com/api/skills/wsh7ash/bulk-endpoint-object-scoping/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: Wsh7Ash (https://skillmd.com/u/wsh7ash)
- Updated: 2026-11-22
- Page: https://skillmd.com/skills/wsh7ash/bulk-endpoint-object-scoping

---


# Bulk Endpoint Object Scoping

> Verify that endpoints accepting lists of identifiers apply ownership checks to every item, not just the first

**Use when:** an endpoint takes an array of ids in the query or body, such as fetch-many, delete-many or update-many

**Avoid when:** the API processes exactly one identifier per request, where bulk behaviour does not exist

## Procedure

1. Identify every endpoint accepting an array, collection or batch payload of identifiers.
2. Build a mixed list containing items you own and items from your second test account, ordered both ways.
3. Send the mixed list and compare the response against expectations: refuse entirely or return only your own items.
4. Check partial-success behaviour, since an endpoint that silently skips unauthorized items may still leak their existence.
5. Test write operations in bulk, where a single unauthorized item can modify data across accounts.
6. Record per-item handling so the report can state whether the gap is leakage, modification or both.

## Signals

- A mixed list returns every item including those owned by the other test account.
- The response reports per-item status codes that reveal whether an unauthorized item exists.
- Bulk update applies to all items after validating only the first one.
- Deleting in bulk removes objects belonging to another account without error.

## Patterns

**1. Mixed batch**

```text
ids=[mine, mine, peer] expected=refuse-all or mine-only
observed=all three returned -> finding
```

**2. Existence leak**

```text
per-item result: {id: 404} for unknown, {id: 403} for peer-owned
-> 403 vs 404 distinguishes existence, report as information leak
```

**3. Result row**

```text
endpoint=POST /api/items/fetch items=3 peer_items=1 leaked=1 mode=full-disclosure
```

## Pitfalls

- Testing a homogeneous list, which cannot reveal whether per-item checks exist at all.
- Ignoring the response's per-item detail, which often leaks existence even when data is withheld.
- Assuming bulk write shares the read path's checks, when the two are frequently implemented separately.

## Done when

- Mixed lists have been tested in both orders for read and write endpoints with per-item outcomes recorded.
- The response is classified as full leak, existence leak, partial success or clean refusal.

## References

- [OWASP API Security Top 10](https://owasp.org/www-project-api-security/)
- [PortSwigger - access control](https://portswigger.net/web-security/access-control)

