D6Defect 6 of 17, in the order they close

Cloud Run ingress is left at all

harbour-api is fronted by a load balancer, but its run.app URL still answers the internet.

Severity
critical
Closes in
phase 3, Close the bypasses
Closed by
Cloud Run ingress settings
Breaks
1 journey
  • Your VPC
  • Run by Google
  • Firewall and access rules
  • Allowed traffic
  • Where it breaks
Shoppersbrowser · appCloudflareCDN + WAFExternal ALB+ Cloud Armorharbour-apiCloud Runingress: allD6Anyonefound the URLharbour-api-x7k2.a.run.appno CDN, no WAF, no Cloud Armorthe side door: everything on the top row is skipped

Only what D6 touches. Red is the defect and what it lets through; switch to fixed to see the same parts with only D6 closed. Struck IDs are closed.

As found--ingress=all

Wide by design - scroll it sideways.

Notes

open one at a time

1.

What it can cause

Anyone with the run.app URL reaches the API with no CDN, no WAF and no Cloud Armor in the way.
  • Anyone with the run.app URL reaches the API with no CDN, no WAF and no Cloud Armor in the way.
  • An attack the front door blocks succeeds at the side door, and the load balancer's logs never show it.
  • The URL is not a secret. It turns up in build logs, error messages and old app versions.
2.

Why it is wrong

A protection is only as good as the narrowest path around it. A WAF on the load balancer does nothing for a door that skips the load balancer.

That URL is a second front door with no CDN, no WAF, and no Cloud Armor. Anyone who finds it skips every protection on the chain.

The idea

A protection is only as good as the narrowest path around it. A WAF on the load balancer does nothing for a door that skips the load balancer.

3.

How you would find it

gcloud run services describe harbour-api --region=asia-southeast1 --format=yaml | grep ingress
detect
gcloud run services describe harbour-api \  --region=asia-southeast1 \  --format=yaml | grep ingress # then confirm the bypass actually answerscurl -sI https://harbour-api-xxxx.a.run.app/ \  | head -1
4.

The change that closes it

--ingress=internal-and-cloud-load-balancing - only the LB and the VPC can reach it
As found
--ingress=all
Fixed
--ingress=internal-and-cloud-load-balancing - only the LB and the VPC can reach it
fix
gcloud run services update harbour-api \  --region=asia-southeast1 \  --ingress=internal-and-cloud-load-balancing
5.

When to fix it

Phase 3, Close the bypasses

Phase 3, Close the bypasses, together with D8. Makes the protections that already exist actually apply. Cheaper than adding new ones.

Cannot start until

Nothing. It can start as soon as its phase does.

Unblocks

  • D1One allow rule opens everything · phase 6
6.

Journeys it breaks

A shopper loads a product page