From 495e4435db81ecb4e44fc372ae45fe68abdd0334 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Fri, 13 Nov 2026 17:49:54 +0000 Subject: [PATCH] docs: note hash-based script reads are unauthed by design (#12429) * docs: note hash-based script reads are unauthed by design Co-Authored-By: Claude Opus 5.5 * docs: mention raw/h skips token scopes too Co-Authored-By: Claude Opus 5.5 --------- Co-authored-by: Claude Opus 5.5 --- backend/windmill-api-scripts/src/scripts.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/windmill-api-scripts/src/scripts.rs b/backend/windmill-api-scripts/src/scripts.rs index cefc89e205..ce45c05bf6 100644 --- a/backend/windmill-api-scripts/src/scripts.rs +++ b/backend/windmill-api-scripts/src/scripts.rs @@ -123,6 +123,10 @@ pub fn workspaced_service() -> Router { .route("/delete/h/{hash}", post(delete_script_by_hash)) .route("/delete/p/{*path}", post(delete_script_by_path)) .route("/delete_bulk", delete(delete_scripts_bulk)) + // By hash, a script is read without the folder/path ACL that `/get/p` and `/raw/p` + // apply (`get/h` only does with `?authed=true`), and `raw/h` also skips the token-scope + // check. Ideally these would be authorized too, but the hash acts as the secret: a member + // reaching one (e.g. via a flow they can read) is by design, not a vulnerability. .route("/get/h/{hash}", get(get_script_by_hash)) .route("/raw/h/{hash}", get(raw_script_by_hash)) .route("/deployment_status/h/{hash}", get(get_deployment_status))