Prompt
google api security shadow api detection
Latest observation
Oct 29, 2026
OpenAI APIWeb search: off
If you mean detecting shadow APIs in a Google Cloud / Google API ecosystem, the core idea is to find APIs that are deployed, exposed, or callable but not properly inventoried, governed, or monitored.
What is a shadow API?
A shadow API is an API endpoint that exists outside normal security and governance processes. Common examples:
- Old versions still deployed
- Internal services exposed accidentally
- Forgotten test/dev endpoints
- Unregistered APIs behind load balancers / gateways
- APIs deployed by teams without central approval
- Publicly reachable endpoints that were intended to be private
Security risks
- Unauthorized data exposure
- Bypassing auth controls
- Inconsistent logging/monitoring
- Unpatched vulnerable endpoints
- Attack surface expansion
Detection approach in Google Cloud
1) Inventory all API exposure points
Look across:
- API Gateway
- Apigee
- Cloud Run
- Cloud Functions
- GKE Ingress / Services
- External HTTP(S) Load Balancers
- Cloud Armor logs
- VPC Flow Logs
- Cloud Asset Inventory
- Security Command Center
2) Compare “known APIs” vs “actually reachable APIs”
Build a source of truth from:
- OpenAPI specs / Swagger docs
- Apigee proxies
- API Gateway configs
- Terraform / IaC state
- Service directories / CMDB
Then compare it to:
- Load balancer URL maps
- Cloud Run service URLs
- Public IPs / DNS records
- Discovered paths from traffic logs
- GKE exposed ingress routes
Any reachable endpoint not in the approved inventory may be a shadow API.
3) Use Google Cloud logs and assets
Useful Google Cloud data sources:
- Cloud Asset Inventory: enumerate resources and bindings
- Cloud Audit Logs: see who deployed/changed services
- Cloud Logging: identify active endpoints and unusual paths
- Security Command Center: surface misconfigurations and exposure findings
- VPC Flow Logs: confirm traffic to unexpected services
4) Detect suspicious patterns
Look for:
- Services with public ingress but no documented owner
- Unknown path prefixes in logs, e.g.
/api/v1/internal,/test,/beta - Old versions still receiving traffic:
/v1/,/v0/ - Endpoints without authentication middleware
- Services not referenced in DNS / API catalogs
- Traffic to non-standard ports or unknown hosts
- Cloud Run services with
allUsersinvoker - GKE ingresses exposed externally without controls
5) Automate with policy and scanning
Controls that help:
- Require APIs to be deployed via IaC
- Enforce authenticated ingress only
- Restrict public exposure with org policies
- Use centralized API gateways
- Require OpenAPI specs for registration
- Periodically crawl exposed endpoints from approved networks
- Add CI/CD checks for undocumented routes
Example detection signals
In Google Cloud, a shadow API might be identified if:
- A Cloud Run service is public, but not in your service catalog
- A new external load balancer appears without change approval
- Audit logs show a service deployed by an unexpected principal
- Logs show requests to paths not present in your API spec
- Cloud Asset Inventory shows a service with public IAM bindings and no owner label
Practical workflow
- Pull all deployed cloud services and exposure configs
- Pull approved API inventory from specs/repo/catalog
- Normalize hostnames, paths, versions, and owners
- Diff deployed/reachable vs approved
- Review unexplained endpoints manually
- Alert on new public endpoints and undocumented traffic
Useful Google Cloud services
- Cloud Asset Inventory
- Security Command Center
- Cloud Logging
- Cloud Audit Logs
- Apigee
- API Gateway
- Cloud Run
- Security Health Analytics
If you want a concrete implementation
I can help you with any of these:
- A Google Cloud shadow API detection checklist
- A BigQuery query to find suspicious API traffic
- A Cloud Asset Inventory script to enumerate exposed services
- A Security Command Center detection strategy
- A Terraform/IaC policy to prevent shadow APIs
If you want, I can give you a step-by-step detection method specifically for Google Cloud Platform or a sample script.