Files
coder/docs/workspaces
Nick VigilanteandCoder Prototypes e28931cfb1 docs: add how-to for rolling out a security update to every workspace (#31982)
Adds an admin how-to that walks through getting a patched package (for
example an updated `ca-certificates` after a certificate authority is
compromised) into every new and existing workspace. Until now the steps
were spread across image management, template versioning, update
policies, automatic updates, and bulk operations.

The new page
`docs/templates/managing-templates/roll-out-security-updates.md` covers:

1. Rebuilding the image and pinning a new tag or digest, and why a
re-pushed mutable tag can be skipped.
2. Publishing and promoting a template version (dashboard and CLI).
3. Making future starts use the active version: template update policy
(Premium), automatic updates, and autostop requirement (Premium).
4. Updating existing workspaces with a `coder list` | `coder update`
loop (first, because the dashboard handles 25 workspaces per page) or
bulk **Update…**. It warns that bulk **Start** keeps the current version
and that dormant workspaces are skipped.
5. Confirming with the `outdated:true` filter and checking the package
with `coder ssh`.
6. Other places to update, outside the image: dev containers,
`envbuilder` caches, persistent home volumes, and persistent VM disks.
It also covers prebuilt workspaces.

It also adds the page to the sidebar
(`docs/manifest/templates/managing-templates.yml`, regenerated
`docs/manifest.json`) and links to it from `image-management.md` and the
Bulk operations section of `workspace-management.md`. The page links to
existing pages instead of repeating them.

The CLI commands and their output were run against a local dev
deployment: `templates push`, the `coder list --search ...
outdated:true` table, the JSON/`jq`/`xargs coder update -y` loop, the
empty result, and `coder ssh ... -- dpkg-query`. Dashboard steps are
checked against the UI code only.

**Verified against**
- `site/src/pages/WorkspacesPage/WorkspacesPage.tsx`,
`WorkspacesPageView.tsx`, `WorkspacesTable.tsx`,
`BatchUpdateModalForm.tsx`, `batchActions.ts` (Bulk actions labels, bulk
Start uses the current version, bulk Update skips dormant and starts
stopped workspaces, default `user:me` filter)
- `site/src/api/api.ts` (`updateWorkspace`, `changeWorkspaceVersion`,
`startWorkspace`)
- `site/src/pages/TemplatePage/TemplatePageHeader.tsx`,
`TemplateLayout.tsx`, `TemplateVersionsPage/TemplateVersionsPage.tsx`,
`VersionRow.tsx`, `TemplateVersionEditorPage/TemplateVersionEditor.tsx`,
`PublishTemplateVersionDialog.tsx` (Edit files, Build, Publish, Promote
to active version, Promote…)
-
`site/src/pages/TemplateSettingsPage/TemplateGeneralSettingsPage/TemplateSettingsForm.tsx`,
`Sidebar.tsx` (Operations section, require-active-version label, Premium
badge, Save)
- `site/src/pages/WorkspaceSettingsPage/WorkspaceSettingsForm.tsx`,
`Sidebar.tsx` (Automatic Updates, Update Policy)
- `site/src/modules/workspaces/actions.ts`,
`site/src/utils/workspace.tsx`
- `coderd/database/dbauthz/dbauthz.go` (`InsertWorkspaceBuild`
require-active-version check, exemption for users who can update the
template)
- `enterprise/coderd/coderd.go`,
`enterprise/coderd/dbauthz/accesscontrol.go`, `codersdk/deployment.go`
(`access_control` Premium gating; bulk actions not license-gated)
- `coderd/autobuild/lifecycle_executor.go`, `coderd/workspaces.go`
(autostart uses the active version under the policy or `always`)
- `coderd/rbac/roles.go`, `docs/admin/users/groups-roles.md` (Template
Admin has workspace read only)
- `cli/templatepush.go` (`--activate` default true),
`cli/templateedit.go`, `cli/update.go`, `cli/start.go` (dormant
activation, active-version selection), `cli/list.go`,
`cli/cliui/filter.go` (`--all` ignores `--search`), `cli/ssh.go`
- `coderd/searchquery/search.go` (`outdated` filter)
- `examples/templates/docker/main.tf`,
`examples/templates/kubernetes/main.tf`
- `docs/templates/extending-templates/prebuilt-workspaces.md`,
`docs/admin/integrations/devcontainers/envbuilder/envbuilder-security-caching.md`,
`docs/workspaces/devcontainers/working-with-dev-containers.md`

**Open questions for the reviewer**
- `envbuilder` caching: `envbuilder` isn't in this repo, so I couldn't
confirm that changing the base image reference (for example to a new
digest) always avoids a cached image. The page says to change the
reference and links the upstream caching doc. An `envbuilder` expert
should confirm.
- Docker and Kubernetes pull behavior for re-pushed mutable tags is
described from the vendors' documented defaults and the example
templates. I didn't test it on a real cluster.
- `workspace-management.md` Bulk operations still says "top-right
**Actions** dropdown", but the UI label is **Bulk actions**. I left it
alone to avoid conflicting with #31137, which edits the same section.
Should it be fixed there or here?
- The template update policy has several names: "Template update
policies" in the docs, the UI checkbox "Require workspaces automatically
update when started.", and `--require-active-version`. `index.md` still
tells readers to enable "**Template Update Policies**", which doesn't
match the UI. Not changed here.
- Doc-check suggestion not applied: adding links to the new page from
`change-management.md` and `index.md#update-templates`, which is outside
this change's scope.
- Dashboard steps were checked against the UI code, not run in a
browser.

> Generated by Coder Agents.

Closes DOCS-1354


Supersedes #31810, reopened under a human author for attribution.

---------

Co-authored-by: Coder Prototypes <294797144+coder-prototypes@users.noreply.github.com>
2026-11-24 10:19:42 -05:00
..