# Undocumented Operation Detection

> Find operations the API serves but never documents, since undocumented routes are where authorization checks age worst. Use when you have a description document and want to know what exists beyond it before trusting coverage numbers

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

---


# Undocumented Operation Detection

> Find operations the API serves but never documents, since undocumented routes are where authorization checks age worst

**Use when:** you have a description document and want to know what exists beyond it before trusting coverage numbers

**Avoid when:** the API has no published document at all, where everything you find is undocumented by definition

## Procedure

1. Extract the documented operation set from the description document, normalized to method plus path template.
2. Collect observed operations from clients, gateway routes, logs you are entitled to see and your own crawling.
3. Diff the two sets in both directions: served-but-undocumented and documented-but-not-served.
4. For served-but-undocumented operations, determine the auth layer and whether any authorization check exists at all.
5. Check versioned prefixes and internal-only routes, which are the usual home of stale operations.
6. Report the undocumented set as coverage risk with the auth layer recorded for each entry.

## Signals

- An operation responds successfully but never appears in any published document.
- An internal-looking route answers on the public gateway, which suggests routing configuration drift.
- Documented operations return 404, meaning the document describes a version that no longer exists.
- Undocumented operations skip middleware that documented routes pass through.

## Patterns

**1. Two-way diff**

```text
documented 128, observed 143 -> undocumented=15, unserved=0
GET /api/internal/metrics as member -> 200, undocumented, auth=none -> flag
```

**2. Coverage number**

```text
coverage = documented_and_served / served
128/143 = 89.5% -> report the gap, not the flattering figure
```

**3. Triage order**

```text
1 auth=none undocumented  2 admin-only undocumented  3 stale documented routes
```

## Pitfalls

- Reporting coverage as document-only, which ignores everything the server actually serves.
- Testing undocumented routes without checking scope, since some are internal by design and excluded.
- Forgetting that a document can lag by one release, making the diff noisy until you account for timing.

## Done when

- Both diff directions are computed and every undocumented operation has an auth layer recorded.
- Coverage is stated with its denominator, and undocumented auth-free routes are ranked first for review.

## References

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

