# API Version Check Divergence

> Compare authorization behavior across API versions and deployment generations, so a check fixed in v2 cannot silently regress in v1. Use when the API serves multiple versions, prefixes or generations in parallel, which is the standard state for aging products

- Skill: `wsh7ash/api-version-check-divergence` (Agent Skill)
- Install (CLI): `npx get-skill add wsh7ash/api-version-check-divergence`
- Raw SKILL.md: https://api.skillmd.com/api/skills/wsh7ash/api-version-check-divergence/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/api-version-check-divergence

---


# API Version Check Divergence

> Compare authorization behavior across API versions and deployment generations, so a check fixed in v2 cannot silently regress in v1

**Use when:** the API serves multiple versions, prefixes or generations in parallel, which is the standard state for aging products

**Avoid when:** exactly one version exists with no legacy surface, making version divergence structurally impossible

## Procedure

1. Enumerate every version prefix that answers: versioned paths, header-selected versions and content-type negotiation.
2. Pick matched operations across versions and run the same object-level and function-level test through each.
3. Record per-version outcomes side by side, and verify that a fix deployed everywhere actually landed everywhere.
4. Check deprecation behavior: how much longer retired versions keep answering and whether authorization drifts there first.
5. Inspect internal or preview versions reachable from your environment for divergent code paths.
6. Record each divergence with the version pair, the operation and the observed difference in enforcement.

## Signals

- v2 returns 403 for a peer object while v1 still serves the body, showing version-skew in the fix.
- A retired legacy prefix remains open with weaker enforcement than any current version.
- Header-based version selection bypasses prefix matching entirely, reaching a dispatch layer with its own checks.
- A preview or internal version exposes operations absent from any public version, with lighter guards.

## Patterns

**1. Version row**

```text
GET /api/v1/orders/{peer-id} as bob -> 200 | v2 -> 403 -> fix incomplete across versions
```

**2. Negotiation**

```text
Accept: application/vnd.api+json;version=1 -> dispatches to legacy path despite v2 prefix
```

**3. Result row**

```text
versions=[v1,v2,v3] flagged=[v1-bola-leak,v3-admin-open] skew-found=yes
```

## Pitfalls

- Testing only the newest version, which flatters a review while legacy prefixes keep answering.
- Assuming the version dispatch layer applies your middleware, when each version can register its own.
- Ignoring internally reachable versions on a different host, which often lag public fixes by several releases.

## Done when

- Matched operations are tested across every served version with side-by-side outcomes recorded per version pair.
- Retired and internal versions are enumerated with their remaining reachability and authorization state documented.

## References

- [OpenAPI specification](https://spec.openapis.org/oas/v3.1.0)
- [OWASP API Security Top 10](https://owasp.org/www-project-api-security/)

