fix(coderd): require deployment-wide workspace read for WatchAllWorkspaceBuilds endpoint - #26985
Merged
Conversation
…kspacebuilds The experimental /api/experimental/watch-all-workspacebuilds endpoint streamed build events for every workspace in the deployment without any per-item authorization. Any authenticated user could enumerate all workspace names and observe build activity across organizations they do not belong to. Gate the endpoint on deployment-wide workspace read (rbac.ResourceWorkspace.All(), granted by Owner or Template Admin) so the firehose is only accessible to sufficiently privileged users. Addresses SEC-A6B05AB854 / ANT-2026-22462.
sreya
approved these changes
Jul 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds an RBAC auth check to the
WatchAllWorkspaceBuildsendpoint/function. Even though this endpoint is gated behind an experimental feature flag, and currently only used for scaletesting, it should still require some additional level of permissions. Currently any authenticated client can hit that endpoint and receive updates for all workspace builds for the whole deployment.With this PRs changes the endpoint will be gated behind the deployment wide workspace read all permission, which is limited to just deployment owners and template admins. Org admins and lower would no longer be able to use this endpoint.