By NHI Mgmt Group Editorial TeamBased on Salt: “Is OAS Enough For API Security?” (July 29, 2026)

TL;DR: OpenAPI Specification documentation helps teams describe endpoints, parameters, and authentication, but Salt argues it often diverges from production reality, leaves shadow APIs undiscovered, and cannot stop logic abuse or attacker iteration. Schema validation alone is not a security boundary when documentation is incomplete, stale, or too broad.


At a glance

What this is: Salt’s analysis says OpenAPI is useful for API description and input validation, but it breaks down as a security control when documentation diverges from production reality.

Why it matters: IAM, API security, and governance teams should treat OpenAPI as supporting evidence, not an enforcement boundary, because discovery gaps and stale schemas leave attack paths and shadow APIs exposed.


Context

OpenAPI documentation is a machine-readable description of an API, not the API itself. It can help teams understand endpoints, parameters, responses, and authentication methods, but it fails when the documented contract no longer matches production behaviour. That gap matters because security controls built on stale or incomplete schemas inherit the same blind spots.

The governance problem is simple: if the inventory is wrong, the policy layer is wrong with it. In API security terms, that means undocumented or drifting interfaces can bypass review, while over-broad validation can block legitimate traffic and create pressure to weaken controls. The same pattern shows why specification-driven control is helpful but insufficient without continuous discovery and verification.

For identity and access teams, the intersection is direct. API documentation often describes who or what is supposed to authenticate, authorise, and pass data, but it cannot prove that non-human identities, tokens, or service-to-service access are behaving as intended in production.


Key questions

Q: What breaks when OpenAPI specifications are missing or out of date for API security testing?

A: Security testing stops matching the real API surface. Teams can miss undocumented endpoints, misread authentication requirements, and fail to exercise the role and object relationships that expose authorization flaws. The result is false confidence: scans may pass while exploitable routes, data exposures, or business-logic errors remain live in production.

Q: Why does schema validation fail against API abuse?

A: Schema validation checks structure, not intent. An attacker can send a request that matches the declared type and length rules while still abusing business logic, object access, or function access. That is why schema enforcement helps with hygiene but cannot replace authorisation, behavioural detection, or runtime policy.

Q: What are the signs that API documentation is drifting away from the real implementation?

A: The main signs are mismatched responses, undocumented fields or endpoints, custom code added to override generated specs, and tests that no longer reflect actual behavior. Teams should also watch for situations where tooling generates documentation automatically but engineers still need manual intervention to make the API work as expected. Those gaps usually point to growing specification drift.

Q: How should teams govern APIs that are used by service accounts and automation?

A: Treat those API paths as part of the identity estate. Inventory the service accounts, tokens, and delegated applications that can reach sensitive endpoints, apply least privilege to each one, and retest whenever a workflow or payload changes. That prevents machine identities from inheriting broad access by default.


Technical breakdown

Why OpenAPI is useful but incomplete

OpenAPI describes an API contract: endpoints, methods, parameters, response structures, and authentication hints. That makes it valuable for developer integration, security review, and schema-aware validation. But the contract is only as good as the process behind it. If teams do not document every endpoint, parameter, and change, the spec becomes a partial model of the system rather than a control surface. Security tooling that depends on the spec can only reason over what is declared, not what actually exists in production.

Practical implication: Use OpenAPI as an input to discovery and review, not as proof that the live API is governed.

Why schema validation misses API logic abuse

Schema validation checks whether a request fits the declared structure, such as type, length, and allowed character sets. It does not understand business logic, workflow abuse, or attacker sequencing. That means a request can satisfy the schema and still be malicious, especially when the abuse depends on excessive function access, object access, or misuse of valid paths. This is why logic-driven API attacks sit outside the protection envelope of documentation-only controls.

Practical implication: Pair schema checks with controls that evaluate authorisation, workflow abuse, and API behaviour at runtime.

How stale documentation creates shadow API risk

When documentation lags behind development, the security team sees a version of the API that no longer matches production. Unrecorded endpoints, undocumented parameters, and changed behaviour create shadow API risk, because enforcement, inventory, and review all depend on the wrong reference model. The article’s example, where documentation listed 2 parameters but the live environment had 27, shows how quickly a spec can become misleading when release cadence outruns governance.

Practical implication: Continuously reconcile the API inventory against live traffic so undocumented interfaces do not escape review.


Threat narrative

Attacker objective: The objective is to reach data, functions, or business workflows through API paths that governance believes are controlled but are not.

  1. Entry occurs through an API surface that may be documented incompletely or not at all, leaving security blind to the true attack surface.
  2. Credentialed or unauthorised requests can then exploit the gap between declared schema and live behaviour, including logic paths the specification does not model.
  3. Attackers can iterate against validation controls, while stale documentation and broad contracts increase the chance that malicious requests pass through or legitimate traffic is blocked.
  4. The end state is unauthorised access, data exposure, or business disruption through an API control layer that never matched production reality.
  • Sourcegraph breach 2023: A site-admin token left in a Sourcegraph commit for 47 days let an attacker become admin and offer free access to its APIs and LLM via a proxy.
  • Dropbox Sign breach 2024: A compromised back-end service account gave attackers Dropbox Sign customer data, including API keys, OAuth tokens and MFA information.

Read and download The State of NHI & AI Agent Breach Report 2026, covering 200+ breaches impacting Non-Human Identities including AI Agents.


NHI Mgmt Group analysis

OpenAPI drift is a governance problem, not just a documentation problem. Once the live API diverges from the contract, every downstream control that depends on the contract inherits false confidence. Security teams then validate a model of the API instead of the API itself, which is precisely how shadow interfaces stay visible to developers but invisible to governance. Practitioners should treat contract drift as a first-class control failure.

API security cannot rely on specification compliance when logic abuse is the real threat. A schema can tell you what shape a request should take, but not whether the request should be allowed to trigger a workflow, read an object, or chain through a business process. That leaves a gap between validation and authorisation that adversaries exploit repeatedly. The practical conclusion is that API governance has to extend beyond contract checks into runtime decisioning and behavioural control.

Shadow API discovery is the named control gap that this article exposes. If undocumented or stale endpoints exist, inventory is already incomplete and any policy derived from that inventory is incomplete as well. That is not a tuning issue, it is a structural weakness in how many teams govern API estates. Practitioners should assume undocumented surfaces are live attack paths until continuously disproven.

Specification-based controls are necessary, but they are not sufficient for non-human identity governance. APIs are where service accounts, tokens, and machine-to-machine access turn into real operational risk. When the contract is wrong, NHI governance is wrong too, because the organisation cannot reliably tell which identities can reach which functions or data. Teams should connect API discovery to NHI inventory and authorisation review, not manage them as separate problems.

From our research library:

What this signals

Shadow API discovery: if the live estate contains endpoints that the specification does not describe, then the organisation is governing an approximation of the attack surface rather than the attack surface itself. That is where API inventory, access policy, and NHI governance converge, because undocumented functions are often reachable through service accounts and machine tokens that were never reviewed against reality.

Specification-driven validation should be treated as a narrow control, not a compensating control for API security. Teams need continuous discovery, runtime authorisation, and workflow-level inspection so that schema checks do not become the last line of defence against business-logic abuse.


For practitioners

  • Continuously reconcile the API inventory Compare the documented OpenAPI contract with live traffic, observed endpoints, and actual parameters so undocumented or changed interfaces are visible before review cycles close.
  • Separate schema checks from authorisation checks Use validation for structure, but enforce authorisation, object access, and workflow controls at runtime so requests that fit the schema are still evaluated for intent and entitlement.
  • Treat undocumented endpoints as active risk Escalate any endpoint, parameter, or response pattern that appears in production but not in the spec, because absent documentation means absent governance until proven otherwise.
  • Review NHI access against API reality Map service accounts, tokens, and other non-human identities to the APIs they actually call, then revoke access that exists only because the contract or inventory is stale.

Key takeaways

  • OpenAPI helps teams document and validate APIs, but it does not prove the live service matches the contract.
  • The biggest control gap is the disconnect between documented intent and production reality, which creates shadow API risk and weakens inventory.
  • Security teams need runtime authorisation and continuous discovery, because schema validation alone cannot stop logic abuse or stale-contract exposure.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP API Security Top 10 addresses the attack and risk surface, while NIST CSF 2.0 and NIST SP 800-53 Rev 5 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP API Security Top 10API9 — Improper Inventory ManagementThe article centers on incomplete API discovery and stale documentation.
API5 — Broken Function Level AuthorizationSpecification checks do not prevent misuse of higher-risk API functions.
API6 — Unrestricted Access to Sensitive Business FlowsThe article warns that schema validation cannot model business logic abuse.
Recommendation — Track undocumented endpoints and reconcile your API inventory continuously against live traffic. Enforce function-level authorisation at runtime instead of trusting the OpenAPI contract alone. Assess API workflows for abuse paths that schema validation will not detect.
NIST CSF 2.0ID.AM-01 — Physical devices and systems are inventoriedAPI inventory drift is an asset-management failure in a digital estate.
PR.AA-05 — Access Permissions, Entitlements and AuthorizationsAPIs and their non-human identities need policy enforcement beyond documentation.
Recommendation — Maintain a live inventory of API endpoints, parameters, and consumers and verify it against production. Align API access permissions with verified entitlements, not just documented intent.
NIST SP 800-53 Rev 5AC-3 — Access EnforcementRuntime access enforcement is the missing control when docs do not match reality.
Recommendation — Enforce API access decisions at runtime rather than relying on documentation alone.

Key terms

  • OpenAPI Specification: A machine-readable format for describing REST APIs, including endpoints, parameters, responses, and authentication methods. It helps developers document interfaces and helps security teams understand intended behaviour, but it only reflects reality when the specification is kept aligned with the live service.
  • Shadow API: An API endpoint that exists in production but is not fully known, reviewed, or governed by the security programme. Shadow APIs often emerge through fast delivery, copy-paste development, or overlooked internal routes, and they create untracked exposure because they sit outside inventory, policy, and ownership processes.
  • Schema Validation: A control that checks whether an input matches the declared JSON structure, type, and required fields before it is accepted. In MCP elicitation, schema validation prevents malformed or coerced values from entering the session and corrupting later tool actions.
  • Runtime Authorisation: Runtime authorisation is the practice of deciding access while a task is in progress, rather than only at provisioning time. It matters for NHIs because credentials and entitlements can change risk mid-session, especially when automation or AI agents interact with sensitive systems.

Deepen your knowledge

NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, machine identity security, and secrets management. It helps practitioners connect access control, inventory, and lifecycle discipline across modern identity programmes.
NHIMG Editorial Note
Published by the NHIMG editorial team on August 1, 2026.
Updated on October 13, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org