By NHI Mgmt Group Editorial TeamBased on Xygeni: “API Security Has Been a Runtime Problem. It Doesn’t Have to Be” (August 7, 2026)

TL;DR: Runtime API scanners only see endpoints after deployment, leaving a gap between code review and exposure; Xygeni argues that static testing closes that gap by reading source code and API specifications before traffic ever hits the route, while also mapping findings to OWASP API Security Top 10 categories. The governance lesson is that inventory, sensitivity, and ownership must be established before runtime verification can mean anything.


At a glance

What this is: Xygeni argues that static API security closes the discovery gap created when runtime scanners only inspect endpoints after deployment.

Why it matters: For IAM and API security practitioners, the core issue is that ownership, authentication state, and exposure cannot be governed reliably if endpoints are discovered only after they are live.


Context

API security fails when organisations treat the runtime scanner as the first point of truth. By then, the endpoint exists, the exposure window has opened, and the control is observing rather than preventing. The governance gap is not testing coverage alone, but the delay between code change, route creation, and security visibility.

Static analysis matters here because API inventories are often split between code and specification, and neither alone gives a complete picture. In identity terms, that means caller access, endpoint ownership, and data sensitivity are being judged against an incomplete asset list. The result is familiar drift: routes ship before policy can catch up.


Key questions

Q: How should teams handle API routes that appear in code but not in the spec?

A: Treat them as governance defects, not documentation gaps. If code and specification disagree, the security team does not have a trustworthy inventory, which means release decisions are being made against incomplete evidence. The right response is to reconcile source and spec before deployment and require a named owner for any endpoint that remains reachable.

Q: Why does runtime API testing miss some exposure before release?

A: Because runtime tools only inspect what is already deployed and reachable. If an endpoint is newly created, undocumented, or drifted from the specification, the scanner may not know it exists. That is why runtime testing should confirm exposure, while static analysis should establish the inventory before traffic ever reaches the route.

Q: What are the signs that API inventory management is failing in practice?

A: Common signs include endpoints that are reachable in production but missing from the inventory, documented APIs that no longer receive traffic, and versioned or deprecated APIs that remain accessible. Another warning is declining control coverage, where active APIs lack current logging, policy enforcement, or clear ownership. These symptoms show the inventory no longer reflects runtime reality.

Q: When should security teams rely on static analysis instead of DAST alone?

A: Use static analysis whenever a pull request changes endpoint structure, authentication, or data handling. DAST remains useful, but only after a route is live. If the goal is to stop exposure before release, static analysis has to be the first control, with DAST used for confirmation and reachability checks.


Technical breakdown

How static API inventory is built from code and specs

Static API security builds an inventory by reading source code and API specifications such as OpenAPI or Swagger before deployment. Code-only views can reveal routes that exist but were never documented, while spec-only views can miss what developers actually added. The value is not just enumeration, but reconciliation: identifying the mismatch between declared interfaces and implemented ones. That gives teams a pre-release view of method, path, service, module, authentication state, and risk. In practice, this shifts security from post-deploy verification to change-time visibility.

Practical implication: Use the pre-deployment inventory as the control point for route approval and ownership assignment before the endpoint goes live.

Why runtime scanning misses undocumented and drifted endpoints

Runtime scanners test what is already reachable, so they are inherently lagging indicators. If an endpoint is new, undocumented, or already out of sync with the spec, a live scan may not know to look for it. That is why runtime testing answers the question of what is reachable now, but not the more important governance question of what was just exposed. The gap widens when teams rely on documentation that has drifted from the codebase. Static analysis closes that by checking the code path itself, not the traffic path.

Practical implication: Treat runtime testing as confirmation, not discovery, and pair it with pre-release static checks for every changed route.

How endpoint sensitivity and authorization state change prioritisation

Not every API finding carries the same risk. An unauthenticated health check is not equivalent to an unauthenticated endpoint returning customer records, and a prioritisation model that ignores that distinction creates alert fatigue. Static API analysis can classify data types such as PII, PCI, and PHI, then combine that sensitivity with the endpoint’s authentication state and any compounding findings. That produces a more defensible severity model because exposure, not just existence, drives urgency. The practical gain is clearer triage and fewer false equivalence decisions.

Practical implication: Rank findings by data sensitivity plus access state so teams fix exposed business data before low-risk noise.


NHI Mgmt Group analysis

Endpoint drift is the real control failure here. The security problem is not simply that APIs exist, but that code, specification, and runtime visibility often diverge. When the inventory is stale, policy decisions are made against a partial asset list, and the governance model silently accepts unknown exposure. Practitioners should treat drift between source and spec as a security defect, not a documentation issue.

Static discovery changes where trust is placed in the API lifecycle. Runtime testing assumes the endpoint already exists and is close enough to production to inspect. Static analysis moves the trust boundary back to change time, where inventory, ownership, and data classification can still shape release decisions. That is the right place to stop unauthorised or over-exposed routes from becoming live.

API security is also identity governance by another name. The article’s strongest insight is that endpoint access, caller authentication, and route ownership are identity questions, not just application questions. If the team cannot say who may call an endpoint, what data it can return, and who owns it, the control model is incomplete. The practical conclusion is that API security and IAM must be aligned before release, not reconciled after.

Broken inventory is a governance gap, not a tooling gap. Static testing helps expose undocumented, zombie, and orphan endpoints, but the deeper issue is organisational inability to maintain a trustworthy service catalogue. Without that catalogue, no downstream control can reliably prove coverage. Security teams should frame API inventory as a governed asset register, because control confidence depends on it.

API6 remains a useful boundary condition for static analysis. The article correctly notes that unrestricted access to sensitive business flows cannot be credibly inferred from static code alone. That distinction matters because overclaiming automation weakens the programme’s credibility. Practitioners should use static analysis for route-level risk and reserve business-flow abuse for threat modelling and manual testing.

From our research library:

What this signals

Endpoint drift becomes a control problem as soon as code and specification stop matching. Teams that rely on runtime verification alone will always be late to some exposure, because the route must already be live before the scanner can reason about it. Static discovery belongs in the release pipeline, not the incident queue.

API ownership now sits inside identity governance, not beside it. Who can call the endpoint, what data it can disclose, and who owns it are all governance questions that determine whether access control is meaningful. If the service catalogue is incomplete, policy enforcement is operating on an assumption rather than an asset register.


For practitioners

  • Map every changed endpoint before merge Require static analysis on the pull request that introduced the route, and block release until the endpoint inventory, method, path, and authentication state are recorded.
  • Reconcile code and specification sources Compare source code and API specifications on every release to catch undocumented, zombie, and orphan endpoints before they become production drift.
  • Classify endpoint sensitivity early Tag PII, PCI, and PHI in request and response handling during development so severity reflects what the endpoint can expose, not just whether it exists.
  • Use runtime testing as a follow-on control Treat DAST as validation of live reachability after static discovery, especially for endpoints that changed in the current release cycle.
  • Assign ownership for every reachable route Make orphan endpoints visible in the backlog and require a named owner for each service path so security findings have a remediation target.

Key takeaways

  • Static API security matters because runtime scanners only see endpoints after deployment, when exposure has already begun.
  • The most useful control shift is from live traffic inspection to pre-release inventory, sensitivity, and ownership checks.
  • Teams should pair static analysis with runtime validation so route discovery happens before release and confirmation happens after.

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 and MITRE ATT&CK address the attack and risk surface, while NIST CSF 2.0 sets the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP API Security Top 10API8 — Security MisconfigurationThe article centres on misaligned API exposure and endpoint drift before release.
API9 — Improper Inventory ManagementStatic inventory versus runtime-only discovery is the core control gap discussed here.
Recommendation — Use API8 checks to catch misconfigured or undocumented endpoints before they reach production. Build and maintain an API inventory that includes code-defined and spec-defined routes.
NIST CSF 2.0PR.AA-05 — Access Permissions, Entitlements and AuthorizationsEndpoint access and caller authorization are central to the article’s governance argument.
ID.AM-01 — Physical devices and systems within the organisation are inventoriedThe article’s main control problem is incomplete inventory of exposed API assets.
Recommendation — Align API authorization decisions with PR.AA-05 before releasing new endpoints. Extend asset inventory practices to API routes so release decisions use a complete service catalogue.
MITRE ATT&CKTA0007;TA0006 — Discovery; Credential AccessUndocumented and exposed routes become targets after discovery and access probing.
Recommendation — Map exposed routes to discovery and credential-access tactics when prioritising detection and testing.

Key terms

  • Passive API Security Testing: Passive API security testing is the practice of examining API traffic and artifacts without sending active probes or disruptive requests. It relies on logs, captures, schemas, documentation, and observed behavior to identify exposed endpoints, weak authentication, excessive data exposure, and policy gaps while minimizing operational risk and detection.
  • Endpoint Drift: The gradual loss of consistency across devices because configuration, software, or policy enforcement differs by location or user group. For construction teams, drift matters because mobile and specialist devices can no longer be assumed to meet the same security baseline as office endpoints.
  • API Inventory: An API inventory is the authoritative record of what interfaces exist, who owns them, what data they touch, and how they are authenticated. For identity governance, it is the baseline control that makes review, monitoring, offboarding, and risk prioritisation possible across distributed services.
  • Unauthorized Exposure: Unauthorized exposure occurs when an endpoint becomes reachable or discloses data without the intended approval, authentication, or data-handling controls in place. In API security, the problem is often not a single exploit but a release process that allowed risky exposure to go live unchecked.

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 is designed for practitioners who need to connect identity controls to the broader security programme they run every day.
NHIMG Editorial Note
Published by the NHIMG editorial team on August 18, 2026.
Updated on October 12, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org