Back to controls

Ensure Cloud Run services are not publicly accessible

Cloud Run services that allow unauthenticated invocation are reachable without caller identity checks. Public access is sometimes intentional for websites or public APIs, but it should be explicitly approved and protected with compensating controls.

Category

Controls

Low

Applies to

Google Cloud

Coverage

1 queries

Asset types

1 covered

Overview

Cloud Run services that allow unauthenticated invocation are reachable without caller identity checks. Public access is sometimes intentional for websites or public APIs, but it should be explicitly approved and protected with compensating controls.

For internal services, APIs, webhooks, admin tools, and service-to-service workloads, require authenticated invocation and grant roles/run.invoker only to the users, groups, or service accounts that should call the service.

Remediation guidance

Remediation

Require authentication for the Cloud Run service and remove public allUsers / allAuthenticatedUsers invoker bindings unless the service is intentionally public and risk-accepted.

Google Cloud CLI

Remove public invoker access from the service:

gcloud run services remove-iam-policy-binding {{asset.name}} \
  --project {{asset.cloudAccountID}} \
  --region {{asset.region}} \
  --member allUsers \
  --role roles/run.invoker

If the service uses the newer Cloud Run invoker IAM check setting, ensure the invoker IAM check is enabled:

gcloud run services update {{asset.name}} \
  --project {{asset.cloudAccountID}} \
  --region {{asset.region}} \
  --invoker-iam-check

Grant invocation only to approved callers. Replace {{manual.invokerMember}} with a specific user, group, or service account principal.

gcloud run services add-iam-policy-binding {{asset.name}} \
  --project {{asset.cloudAccountID}} \
  --region {{asset.region}} \
  --member {{manual.invokerMember}} \
  --role roles/run.invoker

Validation

gcloud run services get-iam-policy {{asset.name}} \
  --project {{asset.cloudAccountID}} \
  --region {{asset.region}}

Rollout guidance

  1. Confirm whether the service is intended to be public. If yes, document the owner, business reason, and compensating controls.
  2. For private services, update clients to authenticate with IAM, service-to-service identity, or an approved API gateway.
  3. Monitor 401/403 responses after enforcing authentication to catch missed callers.
  4. Use organization policy and CI/CD checks to prevent accidental public services.

References

  • https://cloud.google.com/run/docs/authenticating/public
  • https://cloud.google.com/run/docs/securing/managing-access
  • https://cloud.google.com/sdk/gcloud/reference/run/services/update

Query logic

These are the stored checks tied to this control.

Publicly Accessible Cloud Run Services

Connectors

Google Cloud

Covered asset types

CloudRunService

Expected check: eq []

{
  cloudRunServices(where: { allowsUnauthenticatedInvocation: { eq: true } }) {
    ...AssetFragment
  }
}
Cyscale Logo
Cyscale is an agentless cloud-native application protection platform (CNAPP) that automates the contextual analysis of cloud misconfigurations, vulnerabilities, access, and data, to provide an accurate and actionable assessment of risk.

Stay connected

Receive new blog posts and product updates from Cyscale

By clicking Subscribe, I agree to Cyscale’s Privacy Policy


© 2026 Cyscale Limited

LinkedIn icon
Twitter icon
Facebook icon
crunch base icon
angel icon