Prompt
How do I discover shadow APIs in multi-cloud?
Latest observation
Discovering shadow APIs in a multi-cloud environment is mostly a visibility + inventory + traffic analysis problem. The goal is to find APIs that exist in cloud services, gateways, load balancers, containers, serverless apps, or SaaS integrations that are not in your official API inventory or gateway policies.
1) Start with a baseline inventory
Build a list of all known APIs from each cloud:
- AWS: API Gateway, ALB/NLB routes, Lambda URLs, App Runner, ECS/EKS ingress, CloudFront origins, private APIs
- Azure: API Management, Application Gateway, Functions, AKS ingress, Front Door, Static Web Apps
- GCP: API Gateway, Apigee, Cloud Run, Load Balancer, GKE ingress, Functions
- Also include:
- SaaS/webhooks
- Internal service-to-service endpoints
- Developer/test environments
- Shadow IT tools and third-party integrations
Compare this against:
- API catalogs / CMDB
- IaC repositories
- DNS records
- Certificate transparency logs
- Gateway configs
- Service mesh registries
2) Enumerate externally exposed endpoints
Look for APIs that are reachable from outside your environment:
- Scan owned IP ranges and domains
- Enumerate subdomains from DNS and certificate transparency data
- Identify:
/api,/v1,/graphql,/swagger,/openapi- unusual ports
- REST/GraphQL/gRPC endpoints
- Check cloud-native exposure points:
- public load balancers
- API gateways
- serverless HTTP triggers
- exposed Kubernetes ingress/controllers
Useful sources:
- Cloud asset inventories
- DNS providers
- WAF/load balancer logs
- CloudFront/Azure Front Door/CDN configs
- Certificate transparency logs
3) Analyze network and API traffic
Shadow APIs often appear in logs before they appear in inventories. Look at:
- API gateway logs
- reverse proxy logs
- load balancer access logs
- VPC/VNet flow logs
- service mesh telemetry
- cloud audit logs
- SaaS proxy logs
- EDR/NDR telemetry
Search for:
- requests to unknown hosts/domains
- endpoints not registered in your API management platform
- unusual user agents or automation patterns
- large volumes to low-visibility services
- direct-to-service traffic bypassing gateway
- east-west calls to undocumented internal services
4) Correlate cloud control-plane data
Use each cloud’s control plane to discover services that were deployed without being added to the official API inventory:
- New listeners, routes, or ingress objects
- New serverless endpoints
- New load balancers/origins
- Security groups / firewall rules exposing HTTP(S)
- New IAM roles/policies enabling API exposure
- DNS record changes
Flag resources that:
- are internet-facing
- accept HTTP methods
- have auth disabled or weak auth
- are in non-prod accounts but publicly reachable
- are linked to unknown teams or repos
5) Search source code and CI/CD
Shadow APIs are often introduced through application code before operations knows. Scan:
- OpenAPI/Swagger files
- route definitions
- GraphQL schemas
- function handlers
- ingress manifests
- Terraform/CloudFormation/Bicep/YAML
- deployment pipelines
- environment variables for hidden base URLs
Look for:
- undocumented endpoints
- test/staging routes promoted to prod
- hardcoded service URLs
- API versions not registered in catalog
- “temporary” endpoints that became permanent
6) Use API discovery tools
Consider tools that discover APIs from traffic and configs:
- API security platforms
- cloud security posture management tools
- runtime application self-protection / API protection
- service mesh observability tools
- network detection and response tools
- CMDB discovery agents
Prefer tools that can:
- learn from traffic
- parse OpenAPI/GraphQL/gRPC
- correlate cloud resource metadata
- detect auth and schema drift
7) Hunt for common shadow-API patterns
These are frequent indicators:
- endpoints with no gateway registration
- undocumented internal admin endpoints
- old versions still live (
/v1,/beta) - duplicate endpoints in different clouds
- “temporary” debugging routes
- direct object storage HTTP endpoints
- functions exposed via public URLs
- webhook receivers forgotten after a POC
- partner/integration endpoints left open
- container ingress with no catalog entry
8) Prioritize by risk
Not every shadow API is equally dangerous. Prioritize those that are:
- internet-facing
- unauthenticated or weakly authenticated
- returning sensitive data
- writable or admin-capable
- tied to privileged identities
- in production or connected to production data
- bypassing centralized monitoring
9) Operationalize the process
Make discovery continuous:
- monthly asset reconciliation
- CI/CD checks for new routes/endpoints
- automatic registration in API catalog
- alert on new public listeners or DNS records
- log-based detection of unknown API paths
- periodic cloud resource reviews
10) A practical workflow
A good repeatable workflow is:
- Pull inventories from all clouds.
- Gather DNS and certificate data.
- Compare against API catalog and IaC.
- Ingest gateway/load balancer/flow logs.
- Cluster unknown endpoints by host/path/auth pattern.
- Validate with owners and repo history.
- Register or retire the endpoint.
- Add detection rules so it doesn’t recur.
Example detection signals
Alert if:
- a new public endpoint appears outside the API gateway
- traffic hits an endpoint not in the API registry
- a new
/api/*route appears without a change ticket - a cloud function gets a public URL with no catalog entry
- a load balancer starts serving JSON on an unrecognized path
- DNS points to a new cloud service not approved for APIs
If you want, I can turn this into:
- a multi-cloud shadow API discovery checklist
- a step-by-step detection playbook
- or SIEM queries / Sigma-style rules for AWS, Azure, and GCP.
Brands