Skip to Main Content

Shadow API Governance in the agentic era: from static snapshots to AI-enhanced continuous discovery

shadow API governance
Publication date: November 26, 2026

A shadow API is an active endpoint that falls outside the inventory, ownership or governance controls an organisation uses to manage its API ecosystem. Detecting one means comparing three realities that rarely align: what is declared, what is deployed and what is used.

In the agentic era, the problem grows as coding assistants, automation and agents accelerate the creation and consumption of new integrations, making inventories based solely on documentation or periodic reviews insufficient.

Shadow API Governance moves beyond that static snapshot towards a model of continuous discovery that correlates signals from runtime, gateways, observability, repositories, cloud environments, OpenAPI/AsyncAPI contracts and emerging surfaces such as Model Context Protocol (MCP).

Artificial intelligence can help correlate findings, classify risk and prioritise remediation, but it cannot replace ownership or governance policies.

In this guide, we will explore:

  • how to build a persistent governance plane to detect, attribute, classify and remediate hidden APIs;
  • how this problem differs from API sprawl in the SDLC;
  • what changes with agents and MCP; and
  • which metrics show whether the inventory truly reflects the integration surface operating in production.

 

What is Shadow API Governance in an agentic environment?

Shadow API Governance is the set of capabilities, processes and controls used to continuously discover APIs outside the official inventory, assign ownership, assess risk and bring them into (or remove them from) the governed lifecycle.

It is neither a formal OWASP category nor a specific product.

OWASP addresses this risk under API9:2023 Improper Inventory Management, highlighting incomplete inventories, outdated documentation, older versions that remain active and sensitive data flows that are not adequately controlled.

Today’s environment makes this problem increasingly difficult to manage through manual inventories.

Salt Security’s 2025 CISO Report, based on a survey of 300 CISOs, indicates that 74% regularly discover APIs they were unaware of, while two-thirds of organisations audit shadow or unmanaged APIs only monthly or quarterly.

Its 1H 2026 State of AI and API Security report, based on 327 security professionals, adds that only 24% of organisations have a fully automated API inventory.

The challenge, then, is knowing whether what appears in the catalogue matches what is actually deployed, can be invoked and transfers data.

 

API sprawl and shadow API governance: two distinct layers

Controlling API sprawl takes place within the SDLC, through contracts, CI/CD, validation and pre-deployment gates. The next layer begins where that pipeline ends: in production.

Even with a well-governed pipeline, organisations may encounter the following in production:

  • APIs created outside the standard workflow,
  • older versions that still respond,
  • endpoints deployed by other teams,
  • services inherited through mergers or acquisitions,
  • SaaS integrations that were never added to the catalogue,
  • internal APIs that have begun to be consumed in new contexts,
  • MCP tools or servers that expose business capabilities to agents.

 

It is therefore worth distinguishing between two problems:

API sprawl control Shadow API Governance
Key question How can uncontrolled proliferation be prevented? What actually exists and is governed?
Key stage Design, development and CI/CD Runtime and continuous operations
Primary source Code, contracts and pipeline Runtime + code + cloud + catalogue + telemetry
Outcome Prevent non-compliant APIs Detect, attribute and remediate ungoverned assets
Responsible team Architecture / DevSecOps CISO / Enterprise Architect / CTO

 

Read more: How to control API sprawl in AI-amplified environments

 

Why static snapshots are no longer enough

A traditional inventory answers a simple question:

Which APIs do we know exist? A continuous discovery model asks a different question:

Which APIs can we actually see operating, and which of them do not match what we believe we have? The distinction may seem subtle, but it changes the operating model.

 

Dimension Periodic snapshot Continuous discovery
Evidence Documentation or point-in-time scan Up-to-date signals from multiple layers
Changes between audits May go unnoticed Generate new findings
APIs without contracts Difficult to identify May emerge from traffic or infrastructure
Zombie versions Depend on manual review Can be detected if still receiving traffic
Ownership Typically declared Can be inferred and then validated
Outcome Inventory Dynamic inventory + remediation workflow

 

The problem becomes particularly apparent as the pace of change increases.

Akamai’s 2026 API Security Impact Study, now in its fourth annual edition and based on 1,840 security professionals across 10 countries and six industries, reports that:

  • 87% of organisations experienced at least one API-related incident in the preceding 12 months, up from 76% in 2022;
  • 42% reported attacks against APIs associated with AI applications, agents or LLMs;
  • only 23% of organisations know which APIs return sensitive data, down from 40% in 2022.

This does not establish AI as the cause of shadow APIs, but it reinforces the point that the API surface associated with AI systems is already part of the operational risk that must be monitored.

 

Continuous discovery: no single signal is enough

No single source can discover every API in an organisation.

A gateway only sees the traffic that passes through it. Code analysis can uncover routes that are not yet receiving traffic.

The catalogue knows what should exist, but not necessarily what remains active. Cloud telemetry can reveal an exposure that was never declared as an API.

Network monitoring can only see routes and payloads if traffic is terminated, instrumented in-process or observed below the encryption layer. With end-to-end TLS, only connection metadata remains visible.

A continuous discovery plane can combine signals such as:

Source What it can reveal
API gateway, WAF or proxy Hosts, routes, methods, clients and actual traffic
Service mesh / network telemetry East-west communication and services that bypass the gateway
Repositories and CI/CD Declared routes, project, team and originating pipeline
OpenAPI / AsyncAPI Expected contract against which drift can be detected with tools such as oasdiff or Spectral
Cloud and infrastructure configuration Services, functions, load balancers and exposure
Observability Traces, dependencies and runtime behaviour
MCP Servers and capabilities that agents can discover and invoke
eBPF / kernel instrumentation East-west traffic without sidecars or code changes, including traffic that bypasses gateways and meshes

 

The key is to normalise and correlate them.

A route observed at runtime should not immediately be treated as a new API. It may be a version, an alias, a parameterised endpoint or a different representation of an already known service.

Discovery therefore needs to resolve the asset’s identity: host, normalised route, method, environment, service, version, owner and associated contract.

The difficult part is inferring the template: converting /users/8f2c/orders/991 into /users/{id}/orders/{orderId} before counting endpoints. Without that inference, any high-cardinality segment creates phantom endpoints, inflating the inventory without increasing the actual surface area.

AI can help with entity resolution, classification, grouping findings and anomaly detection. However, the primary evidence must remain verifiable.

 

From detecting a shadow API to governing it

Finding an unknown endpoint only solves the first part of the problem.

A mature approach to Shadow API Governance must turn the finding into a governed asset.

This is the capability the market calls API Security Posture Management: the aim is not simply to detect more, but to maintain oversight of what has been detected over time.

At a minimum, every API should ultimately be associated with:

  • an owner,
  • a service or business domain,
  • an environment,
  • a level of exposure,
  • a contract or technical representation,
  • the data it processes,
  • known consumers,
  • authentication and authorisation policies,
  • a lifecycle status,
  • a remediation decision.

Of these attributes, the data it processes is the only one that cannot simply be declared; it must be observed by sampling payloads.

This creates a paradox that is best addressed early: determining whether an API processes personal data requires processing that very data. The answer is limited sampling, classification at the point of observation and no retention of the payload.

A simple operational lifecycle might distinguish between observed → under review → managed → deprecated → retired, with two additional outcomes from under review: rejected, for items that are not governable assets (an alias, health check or infrastructure endpoint), and quarantined, for items isolated pending a decision.

The terminology may vary. What matters is that ‘discovered’ is not the final status and that there is a status for false positives, which are the most common outcome in the first few months of any discovery programme.

When an endpoint appears without an owner, the system can suggest one using signals such as CODEOWNERS, repository, namespace, pipeline or cloud account.

However, that attribution should be validated by the organisation.

Where workload identity (SPIFFE/SPIRE) is in place, the SVID of the service exposing the endpoint is a more reliable attribution signal than the namespace or cloud account.

If no one accepts ownership, there is a governance problem that no discovery tool can solve on its own.

 

You may also be interested in: API Governance: What it is and how to implement effective API governance step by step

 

A control loop for Shadow API Governance

As an operating pattern, Chakray structures the process around a continuous control loop:

  1. Discover. Collect signals and identify candidates that do not match the inventory.
  2. Normalize. Consolidate host, route, method, version and environment to avoid false duplicates.
  3. Correlate. Link the endpoint to its service, repository, likely owner, consumers and data.
  4. Classify. Assess exposure, sensitivity, write capabilities, authentication and criticality.
  5. Assign. Identify an accountable owner who can accept or reject the attribution.
  6. Validate. Review security, contracts, policies and governance requirements.
  7. Enforce. Apply the appropriate response: register, restrict, require authentication, temporarily block or isolate when the risk warrants it.
  8. Retire or govern. Formally incorporate the endpoint into the lifecycle or verify that it has genuinely stopped responding.

It is also important to distinguish between what can be detected and what can be enforced.

An endpoint discovered through network telemetry or cloud configuration may not pass through any enforcement point. The first remediation step is therefore to route the traffic through a PEP or close the alternative route.

Until then, observation is the only real control available.

The difference from a scanner is significant:

  • A scanner produces findings.
  • A control loop produces decisions and governed states.

 

Eight-step closed-loop Shadow API Governance process, from Discover to Retire or govern, with continuous feedback into the inventory

 

MCP expands the surface that needs to be inventoried

Agentic environments introduce another surface that conventional API catalogues may not accurately represent: Model Context Protocol.

MCP is an open standard that connects AI applications to systems containing data and tools. An MCP server can expose tools, resources and prompts that a host or agent can discover and use.

Not every MCP server is a shadow API. Nor is an MCP tool necessarily an API in the traditional sense.

From a governance perspective, however, the equivalent question is: what business capability can an agent discover and invoke, and who governs it?

A modern inventory strategy should therefore account for the following alongside traditional APIs:

  • MCP servers,
  • available tools,
  • the backend systems they invoke,
  • ownership,
  • permissions,
  • accessible data,
  • authorised agents or clients.

In this article, we use MCP sprawl descriptively to refer to the proliferation of these servers and capabilities outside a shared governance model. It is not a regulatory category or a formal OWASP risk.

The 28 July 2026 revision of the specification tightened authorisation and introduced routing headers (Mcp-Method, Mcp-Name), allowing routing and authorisation without parsing the request body.

This matters for governance because tool invocations become observable from the gateway, just like HTTP routes.

Furthermore, tools/list is a discovery endpoint that can be queried, and a change to a tool’s description (which enters the model’s context) constitutes a drift event just as significant as a deviation from an OpenAPI contract.

 

Read our article: Agentic Enterprise Architecture: how to govern autonomous integrations without restricting autonomy

 

AI can help prioritise, but it should not replace governance

Enhancing discovery with AI does not mean delegating security decisions to a model.

Artificial intelligence can add value by:

  • grouping apparently related routes,
  • detecting anomalous behaviour,
  • identifying potential duplicates,
  • suggesting owners,
  • classifying language or metadata,
  • prioritising findings in large queues.

However, the rules determining whether an endpoint can operate, what authentication it requires and what data it can expose should remain in explicit, auditable policies.

In other words, use AI to discover and prioritise, and policies to govern and enforce.

This principle prevents the system from replacing an opaque inventory with an equally opaque classification model.

 

Read more: How AI is integrated into API management platforms

 

Shadow APIs, zombie APIs and drift: three different problems

Not every inventory problem should be labelled a shadow API.

  • Shadow API: an active API that is not properly registered or governed.
  • Zombie API: a version or endpoint that should have been retired but remains available.
  • Drift: the actual implementation has diverged from the contract or configuration the organisation considers valid.

All three issues relate to API9:2023 Improper Inventory Management, but require different responses. OWASP recommends maintaining inventories of hosts, versions, environments, access and data flows, alongside clear retirement plans.

All three discrepancies are measured against the same axis: what is declared → what is deployed → what is used.

  • When they align, the inventory inspires confidence.
  • When they diverge, a governance event occurs.

These are specific cases of the same reconciliation process. Comparing what is declared, deployed and used reveals seven distinct zones, only one of which represents a reliable inventory.

 

Diagram reconciling what is declared, deployed and used, showing the seven resulting zones and highlighting the shadow API at the intersection of deployed and used

 

Which metrics should the programme track?

It is more useful to identify observable metrics first and then define a scoring model tailored to each organisation.

Metrics that can provide meaningful insights include:

  • Inventory coverage: the proportion of observed traffic or assets that can be associated with a governed record.
  • Unknown-call ratio: calls to endpoints with no clear match in the inventory.
  • Time-to-ownership: the time between discovery and an owner accepting responsibility.
  • Time-to-remediation: the time needed to onboard, correct, isolate or retire an asset.
  • Time-to-discovery: the time between endpoint deployment and its first appearance in the inventory.
  • Drift rate: runtime changes that do not match the declared contract or configuration.
  • Orphaned API count: known assets without a valid owner.
  • Deprecated-but-active: versions marked for retirement that continue to receive traffic.

There are no universal thresholds such as ‘95% means maturity’ or ‘four hours is the right SLA’.

Targets should be defined according to criticality, exposure and risk tolerance.

 

DORA, NIS2 and GDPR: how they actually relate to inventory

Shadow API governance can provide useful compliance evidence, but none of these frameworks prescribes a tool called Shadow API Governance.

DORA

DORA applies to financial entities within its scope.

Article 8 requires them to identify, classify and document ICT-supported functions, information assets and ICT assets, and to keep inventories updated regularly and whenever major changes occur. It also requires continuous identification of sources of ICT risk.

A dynamic API inventory can therefore support this identification and traceability model, but it would be inaccurate to claim that DORA explicitly requires a ‘continuous API inventory’.

NIS2

NIS2 requires entities within its scope to implement technical, operational and organisational measures proportionate to risk, explicitly including asset management among its cybersecurity measures.

GDPR

When an API processes personal data, Articles 25 and 32 of the GDPR require data protection by design and technical and organisational measures appropriate to the risk.

An unknown API processing personal data makes it harder to demonstrate that control.

The operational conclusion is straightforward: if the organisation does not know which interfaces exist, what data they process or who governs them, it will find it harder to demonstrate that the applicable controls actually work.

 

How to implement Shadow API Governance without creating another form of vendor lock-in

The mistake would be to confuse the governance plane with a specific discovery platform.

The architecture can use different tools to:

  • observe traffic,
  • analyse repositories,
  • collect cloud telemetry,
  • manage contracts,
  • enforce policies,
  • monitor systems,
  • manage identities.

The governance plane should withstand changes to those tools.

To achieve this, keep the canonical asset model, lifecycle, ownership, risk classification, policies and remediation criteria vendor-independent.

Open standards help, OpenAPI and AsyncAPI for contracts, OpenTelemetry for telemetry and Policy-as-Code where appropriate for expressing controls.

The tool should feed into governance.

 

How to implement the model in phases

The model should not begin by trying to discover every API and MCP server in the enterprise at once.

Phase 1. Define the source of truth

Establish what constitutes an API in the inventory and which fields are mandatory (owner, environment, service, contract, data, exposure and lifecycle).

Phase 2. Connect the signals with the broadest coverage

Typically, gateways, observability, cloud environments and repositories already provide much of the evidence needed.

Phase 3. Reconcile the catalogue with runtime

Identify what is declared but not observed, what is observed but not declared, and where multiple representations of the same asset exist.

Phase 4. Formalise ownership and remediation

Every finding must lead to a decision, not just an alert.

Phase 5. Incorporate MCP and agents

Extend the inventory to include MCP servers, tools and agentic consumers wherever they form part of the technology landscape.

Phase 6. Automate policies according to risk

Automate straightforward cases and retain human review for higher-impact decisions.

Phase 7. Measure and hand over the operating model

Define metrics, runbooks, RACI and responsibilities so the process can withstand changes in teams, partners and technology.

This final step turns a discovery project into a permanent governance capability.

 

Shadow API Governance in the agentic era: from static snapshots to AI-enhanced continuous discovery

 

Does every organisation need a continuous discovery model?

Not to the same extent.

A small organisation with few APIs and a single, tightly governed publishing process can maintain good visibility without building a complex continuous discovery architecture.

The model becomes more valuable when there are:

  • multiple gateways or cloud environments,
  • autonomous development teams,
  • acquisitions and legacy applications,
  • internal APIs outside the perimeter,
  • frequent deployments,
  • agents or automation that invoke services,
  • MCP servers,
  • stringent traceability requirements.

In these environments, the question is no longer ‘Do we have a catalogue?’

The right question is ‘Can we demonstrate that the catalogue represents the surface operating right now?’

 

Chakray: from API discovery to persistent governance

Detecting shadow APIs is a technical problem.

Keeping them governed as teams, vendors, systems and integration methods evolve is an architectural and operational challenge.

At Chakray, we address this second layer by combining API Governance, API Management, observability, API and integration security, and agentic architecture to build a model in which the inventory does not depend on a one-off audit or a specific tool.

The aim is to answer five questions about every newly discovered surface: What is it? Who owns it? What does it expose? Who uses it? And what should happen to it?

 

Explore our API and Integration Security capabilities

 

Frequently asked questions about Shadow API Governance

What is a shadow API?

An active API or endpoint that is not adequately represented in the organisation’s official inventory, ownership or governance model.

OWASP associates this type of problem with API9:2023 Improper Inventory Management.

How can shadow APIs be detected continuously?

By combining signals from runtime, gateways, observability, cloud environments, repositories, CI/CD and declared contracts.

The aim is to reconcile what is observed with the official inventory.

What is the difference between API sprawl and shadow APIs?

API sprawl describes the proliferation of APIs.

A shadow API is an asset operating outside the expected inventory or governance model. API sprawl can exist without every API being a shadow API, and a shadow API can exist even in a small ecosystem.

What changes with AI agents and MCP?

Agents can consume capabilities dynamically, and MCP introduces servers that expose tools, resources and prompts.

These surfaces are not automatically shadow APIs, but they must be incorporated into the inventory and ownership model when they provide access to business capabilities.

Can artificial intelligence govern shadow APIs automatically?

It can help detect anomalies, group assets, suggest ownership or prioritise risk, but critical authorisation, lifecycle and remediation policies should remain explicit and auditable.

How can you tell whether your API inventory is reliable?

Counting catalogue records is not enough.

They must be checked against actual traffic, deployments and telemetry, using indicators such as inventory coverage, unknown-call ratio, APIs without owners, drift and deprecated versions that remain active.