From c0a1643782118a7a81cc08062a0cc3abdf3a05db Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Wed, 11 Nov 2026 07:53:53 -0800 Subject: [PATCH] build(deploy): mark the sign-in widget's /api/v1 flow writes for BotID on previews BotID's client protected /cloud/zitadel/flow and its submit, but since #2359 the widget calls /cloud/zitadel/api/v1/flow. Its flow writes went unmarked, so the functions' checkBotId() refused every person signing in on a preview with auth.bot_suspected. The deployment suites pass the check through the protection bypass and never noticed. Co-Authored-By: Claude Opus 5.5 --- apps/cloud-console/src/bot-check.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/cloud-console/src/bot-check.ts b/apps/cloud-console/src/bot-check.ts index cdf1385354..ee1d03e88b 100644 --- a/apps/cloud-console/src/bot-check.ts +++ b/apps/cloud-console/src/bot-check.ts @@ -5,12 +5,15 @@ import { initBotId } from "botid/client/core"; * sign-in widget's two flow writes, which the add-on routes through the * cloud's functions (`signInApiBase`), where `checkBotId()` reads the mark. * Started when the add-on loads, before the widget sends anything. + * + * The paths are the ones the widget sends: its base, then the API's prefix. + * A call they miss goes unmarked, and the check refuses it as a bot. */ export function startBotCheck(): void { initBotId({ protect: [ - { path: "/cloud/zitadel/flow", method: "POST" }, - { path: "/cloud/zitadel/flow/*/submit", method: "POST" }, + { path: "/cloud/zitadel/api/v1/flow", method: "POST" }, + { path: "/cloud/zitadel/api/v1/flow/*/submit", method: "POST" }, ], }); }