Skip to content

fix(coderd): require update permission to recreate devcontainers (#25812)#26320

Merged
f0ssel merged 1 commit into
release/2.29from
backport/25812-to-2.29
Jun 12, 2026
Merged

fix(coderd): require update permission to recreate devcontainers (#25812)#26320
f0ssel merged 1 commit into
release/2.29from
backport/25812-to-2.29

Conversation

@f0ssel

@f0ssel f0ssel commented Jun 11, 2026

Copy link
Copy Markdown
Member

Backport of #25812 to release/2.29 (SEC-84 / DEVEX-399).

Conflict resolution: 2.29 has no WorkspaceAgentAndWorkspaceParam middleware, so the handler authorizes against httpmw.WorkspaceParam(r). The authorization test resolves the agent ID via the workspace API since dbfake.WorkspaceResponse has no Agents field on this branch. Dropped the out-of-scope TestWorkspaceAgentDeleteDevcontainer (DELETE endpoint does not exist on 2.29).

🤖 Backport prepared by Coder Agents on behalf of @f0ssel.

- The httpmw upstream from this endpoint only checks for read perms to the
workspace agent. Recreating a dev container should require `update`
perms since it mutates state. This also matches the behavior of the
`DELETE` endpoint
@f0ssel f0ssel merged commit 18ded82 into release/2.29 Jun 12, 2026
28 checks passed
@f0ssel f0ssel deleted the backport/25812-to-2.29 branch June 12, 2026 00:17
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants