mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-18 16:02:10 +00:00
36c9f8612b
The list_tokens handlers in scripts.rs and flows.rs accepted only the raw DB pool, with no ApiAuthed extraction or check_scopes call. Any authenticated token for the workspace — regardless of its scope restrictions — could enumerate token metadata (label, prefix, scopes, owner email, timestamps) for any script or flow path, bypassing the path-scoped read checks enforced by sibling endpoints like get_script_by_path and get_flow_by_path. Both handlers now extract ApiAuthed and call check_scopes for scripts:read:<path> / flows:read:<path> before querying. Fixes WIN-2047 Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>