# Vertical Privilege Step Test

> Walk every privilege boundary one step at a time, testing adjacent roles rather than leaping from anonymous straight to superuser. Use when the API has at least three distinct privilege levels and you control an identity for each adjacent pair

- Skill: `wsh7ash/vertical-privilege-step-test` (Agent Skill)
- Install (CLI): `npx get-skill add wsh7ash/vertical-privilege-step-test`
- Raw SKILL.md: https://api.skillmd.com/api/skills/wsh7ash/vertical-privilege-step-test/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Integrations & APIs
- Author: Wsh7Ash (https://skillmd.com/u/wsh7ash)
- Updated: 2026-11-22
- Page: https://skillmd.com/skills/wsh7ash/vertical-privilege-step-test

---


# Vertical Privilege Step Test

> Walk every privilege boundary one step at a time, testing adjacent roles rather than leaping from anonymous straight to superuser

**Use when:** the API has at least three distinct privilege levels and you control an identity for each adjacent pair

**Avoid when:** only one privilege boundary exists, where a simpler admin-guard check is sufficient

## Procedure

1. Order the role levels from the claim catalog: anonymous, member, elevated, staff, tenant-admin, platform-admin.
2. For each adjacent pair, list operations the higher role can reach that the lower role must not.
3. Call those operations as the lower role using only credentials issued to roles you control.
4. Check whether any operation assigns, grants or modifies roles, since those are the worst vertical gaps.
5. Verify that elevated capabilities expire or require re-confirmation when the product promises one-time elevation.
6. Record each boundary as a pass or fail row so the report can rank the most exposed boundary first.

## Signals

- The boundary between two ordinary roles holds on GET but fails on a mutation, showing incomplete enforcement.
- An operation that changes roles accepts the request with mismatched or missing elevation claims.
- Elevation granted by one flow persists into sessions the grant never intended to cover.
- The lowest privileged role can invoke a bulk operation implicitly reserved for staff, despite separate UI routes.

## Patterns

**1. Boundary list**

```text
boundaries: anon->member, member->elevated, elevated->staff, staff->tenant-admin, tenant-admin->platform-admin
```

**2. Adjacent test**

```text
member calling elevated op grant-role -> 200 -> vertical gap at member->elevated
```

**3. Result row**

```text
boundary=member->elevated ops=5 failures=1 worst=POST /api/roles grant
```

## Pitfalls

- Testing anonymous against everything while skipping intermediate boundaries, which is exactly where gaps hide.
- Using production-issued credentials outside your own accounts instead of the controlled role pairs you own.
- Assuming UI-visible privileges match server checks, when the server is the only authority that matters.

## Done when

- Every adjacent privilege pair has a tested operation list with per-assignment pass or fail verdicts.
- Role-granting operations have dedicated evidence showing whether the elevation claim is validated server-side.

## References

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

