Spec-only and crawler-only discovery misses undocumented services, internal microservices, and endpoints that are still live after being removed from documentation. That leaves testing blind spots, especially in fast-moving platforms where service ownership changes often. The result is incomplete coverage, weaker risk prioritisation, and a false sense that the attack surface is fully understood.
Why This Matters for Security Teams
API discovery is only useful when it reflects what is actually running, not just what is documented. Spec files and crawler output can help establish a baseline, but they rarely capture shadow endpoints, internal services, version drift, or stale routes that still respond in production. Security teams that rely on incomplete discovery often under-scope testing, miss exposed business logic, and misjudge which services deserve immediate review.
This matters because API inventories are increasingly used to drive vulnerability management, penetration testing, service ownership, and compliance evidence. If the inventory is wrong, every downstream decision inherits that error. Current guidance from the OWASP API Security Top 10 and the NIST microservices security guidance both point to the same operational reality: discovery has to account for runtime behavior, not only design-time intent. In practice, many security teams encounter exposed endpoints only after an incident review reveals that the “unknown” service was never in scope to begin with.
How It Works in Practice
A defensible API discovery process blends multiple sources because no single method is complete. Specifications such as OpenAPI or gRPC definitions provide intent, but they can lag behind code. Crawlers and traffic analysis reveal what clients actually call, but they may miss internal-only routes, authenticated functions, or endpoints hidden behind feature flags. Runtime discovery, logs, gateway telemetry, service mesh data, and code repository signals all help close the gap.
Teams usually get better results when they treat discovery as a continuous control rather than a one-time exercise. That means reconciling what the platform says should exist with what traffic and host-level telemetry show is live. It also means assigning ownership to services that appear without documentation, and flagging endpoints that remain reachable after deprecation. The practical goal is not a perfect inventory on day one, but a continuously improving map of exposure and trust boundaries.
- Compare published specs with gateway, proxy, and WAF logs to identify undocumented endpoints.
- Use authenticated crawling where appropriate, because public crawlers will miss privileged paths.
- Correlate discovery with asset and service ownership so findings can be actioned quickly.
- Review removed or deprecated routes to confirm they are actually retired, not just hidden.
- Feed confirmed endpoints into testing, attack surface management, and risk triage workflows.
For product and supply-chain contexts, the EU Cyber Resilience Act raises the value of being able to demonstrate control over exposed digital components, including APIs that form part of a connected product or service. That does not mean documentation alone is sufficient evidence; it means discovery must be grounded in observed runtime reality and traceable change management. These controls tend to break down when authentication gates, tenant-specific routing, or rapidly deployed serverless endpoints hide live functions from unauthenticated probes.
Common Variations and Edge Cases
Tighter discovery often increases operational overhead, requiring organisations to balance broader visibility against the noise of false positives and the cost of continuous reconciliation. The right method depends on architecture, but the tradeoff is real: broader coverage usually means more data sources, more tuning, and more ownership disputes.
In microservice and platform engineering environments, best practice is evolving toward combining specs with telemetry from API gateways, service meshes, and traces. Pure crawler-based approaches struggle with authenticated workflows, event-driven endpoints, and APIs invoked only by other services. Spec-only approaches fail when engineering teams treat documentation as aspirational rather than authoritative. For SaaS platforms, tenant scoping adds another complication: an endpoint may exist for only certain customers or roles, so discovery must be tested against realistic identities and permissions.
There is also no universal standard for how much undocumented exposure is acceptable before an endpoint is treated as a finding. Some teams classify all unregistered services as critical; others prioritise by data sensitivity, privilege level, and external reachability. That policy choice should be explicit, because discovery without a triage model can create backlog without improving risk decisions. Where identity controls matter, pairing API discovery with least-privilege access review helps expose whether a service is merely undocumented or actually overexposed.
For organisations operating under the EU Cyber Resilience Act or similar product-security expectations, the key question is whether the discovery process can support evidence, ownership, and remediation. If not, the inventory may look complete on paper while still leaving live attack surface unaccounted for.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Agentic AI Top 10 and OWASP Non-Human Identity Top 10 address the attack surface, NIST CSF 2.0 and NIST AI RMF set the technical controls, and EU Cyber Resilience Act define the regulatory obligations.
| Framework | Control / Reference | Relevance |
|---|---|---|
| NIST CSF 2.0 | ID.AM-1 | Incomplete API discovery is an asset-management failure affecting visibility. |
| OWASP Agentic AI Top 10 | Automated discovery and agentic workflows can miss hidden or dynamic endpoints. | |
| OWASP Non-Human Identity Top 10 | Undocumented APIs often expose secrets or service identities tied to NHI risk. | |
| EU Cyber Resilience Act | Product security evidence depends on knowing what network-exposed components exist. | |
| NIST AI RMF | Discovery gaps matter when AI systems expose APIs used for model or tool access. |
Validate automated discovery outputs against authenticated runtime evidence before trusting them.
Related resources from NHI Mgmt Group
Deepen Your Knowledge
Reviewed and updated by the NHIMG editorial team on August 2, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org