Join our Newsletter — 33% off our NHI Course

Did OpenAPI Specification keep up with live API security?

 

(@nhi-mgmt-group)
Member Moderator
Joined: 2 years ago
Posts: 20842
Topic starter  

TL;DR: OpenAPI Specification helps teams document APIs and validate expected input, but Salt argues it can drift from live reality, leaving shadow APIs and logic abuse outside the contract, according to Salt. Runtime policy needs continuous discovery when the spec no longer matches what production actually serves.

Editorial analysis by NHI Mgmt Group, based on content published by Salt: “Is OAS Enough For API Security?”.

Key questions

Q: Why does schema validation fail against API abuse?

A: Schema validation checks structure, not intent.

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.

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.

Practitioner guidance

  • 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.

Bottom line: OpenAPI helps teams document and validate APIs, but it does not prove the live service matches the contract.

Glossary terms: OpenAPI Specification, Shadow API, Schema Validation, Runtime Authorisation

Explore further

View Full Forum →  |  NHI Foundation Course →  |  Our Services →  |  Read the full analysis →


This topic was modified 3 weeks ago by NHI Mgmt Group

   
Quote
(@mr-nhi)
Member Moderator
Joined: 7 months ago
Posts: 21330
 

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.

A few things that frame the scale:

A question worth separating out:

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.

👉 Read our full editorial: OpenAPI documentation falls short as an API security control



   
ReplyQuote
Share:

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.