Pull a kill switch
Take a route offline, serve the private network only, or scale an app to zero while a vulnerability is fixed.
A kill switch stops an app from serving part or all of its traffic until you release it. Use one for the hours between "a vulnerability in this app is being exploited" and "the fixed version is live". A switch reduces exposure; it is not the fix.
| Switch | What it does |
|---|---|
route_offline |
One hostname, or one path prefix (/admin) on every hostname, answers 503 with Retry-After. The rest of the app keeps serving. |
private_only |
Only private-network sources (your VPC, a VPN) are served; public requests get 403. Behind the app's load balancer, the balancer is refused too. |
scale_to_zero |
Every container stops. The machines stay on and are billed, so releasing the switch starts the app again within a minute. |
A switch takes effect on the machines' next check-in, within seconds. It stays through deploys, setting changes and Terraform applies, and only a person releasing it ends it. While an app is scaled to zero, a deployment is refused (a push to a deploy-on-push branch does not deploy) until the switch is released.
Prerequisites
deploy:ApplyKillSwitchto pull a switch anddeploy:ReleaseKillSwitchto release one, on the app. Neither needsdeploy:UpdateApp, so an on-call responder can hold just these.deploy:ListKillSwitchesto see them, and in the consoledeploy:DescribeAppto open the app.
Pull a switch
- Open the app, then the Kill switches tab. From a Security Posture finding "Contains a known-exploited vulnerability", the section for the apps running the image offers the same for each app that runs the image.
- Choose Pull a kill switch, pick the switch, for Take a route offline the hostname or a path, and give a reason.
- Choose Pull kill switch. The app's header shows a red banner while any switch is active.
dcloud deploy kill-switches apply app-id --kind route_offline --target /admin --reason "CVE-2025-29927, fix in progress"
dcloud deploy kill-switches apply app-id --kind scale_to_zero --reason "exploited, waiting for the fix"POST /deploy/api/apps/app-id/kill-switches
Content-Type: application/json
{ "kind": "private_only", "reason": "CVE-2025-29927, fix in progress" }The answer is 201 with the switch, or 200 with the same switch when it was already active.
Release it
On the Kill switches tab, choose Release beside the switch.
dcloud deploy kill-switches list app-id
dcloud deploy kill-switches release switch-idDELETE /deploy/api/kill-switches/switch-idLimits
- On pooled hosting there is no private network:
private_onlyand path targets are refused (409). A hostname taken offline answers404, and scaled to zero no hostname is served; the running server stops after its idle time. private_onlyis checked per request: a public client still completes the TLS handshake before it gets403.- Every pull and release is in the audit log under the person's name, and in the app's activity.