* ci: releases need a second approver and come only from attested builds
The Release workflow builds the packages from a commit on main (the merge commit of an update/
PR, or a commit given to a dispatch on main) and attests each file's provenance. A member of
code-server-release-team other than the person who started the run then approves the
release-approval environment. Only that job, as the coder-release-publisher App (key in Cloud
KMS), creates the tag and publishes the release with the attested files, in one step. Releases
are immutable, so the files can't change after that, and there is no draft for anyone to edit.
publish.yaml publishes nothing until it has checked that the release came from
coder-release-publisher, is immutable, and that every file was attested by release.yaml from main.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* ci: upload release-packages directly instead of copying it
package.tar.gz is now written into release-packages next to the platform packages, so every build
job attests and uploads one flat directory without a copy.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* ci: remove a doubled blank line in release.yaml
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* ci: mint the coder-automations App token with Cloud KMS
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* ci: validate the publish version before it reaches the shell
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
For the coder/code-server-aur update, generate a token using our GitHub
app instead.
For the others that open PRs against coder/code-server, just use
GITHUB_TOKEN since that apparently works. I also moved the env block to
the step that executes the `gh` cli rather than setting it job-level, mostly to
match the aur step, but also to make it clearer where the env var actually
applies.
PRs created through GITHUB_TOKEN apparently cannot trigger other
workflows, but I think it should be OK to trigger them manually (will
switch to the app if this becomes annoying).
* Use Docker Hub OIDC for publish workflow login
Replace the DOCKER_USERNAME/DOCKER_PASSWORD secrets with an OIDC
(workload identity federation) login to Docker Hub. The docker job now
grants id-token: write and passes the OIDC connection ID via the
DOCKERHUB_OIDC_CONNECTIONID repository variable.
* Run docker publish job in the release environment
Scopes the Docker Hub OIDC subject claim to
repo:coder/code-server:environment:release.
The base path of /proxy/<port> requests was computed by splitting the
request path on path.sep, which is a backslash on Windows, so the whole
path became the base. Requests were proxied to / on the target port and
redirects were rewritten against the wrong base. URL paths always use /.
authenticateOrigin() lowercases the host of the origin and
isTrustedOrigin() lowercases the domain of *.example.com entries, but
exact entries were compared as written, so an entry with an uppercase
letter (for example a Windows host name like DESKTOP-ABC123:8080) never
matched and requests from that origin were refused.
The browser writes some workspace files to the client disk during normal
use. The webview service worker stores resources that have an ETag in
Cache Storage, and responses from /vscode-remote-resource can end up in
the HTTP disk cache. --disable-file-downloads does not cover either.
With --disable-file-cache, the webview resource loader sends no ETag for
a resource outside the webview's own extension, so the service worker
does not store it. /vscode-remote-resource responds with
`Cache-Control: no-store` for files outside the extension directories.
Extension files keep their ETags, so webviews still load extension code
from the cache. The flag is off by default.
The --socket-fd flag never worked. The wrapper forks the process that
listens, but only the IPC channel was inherited as fd 3, so the socket
passed by the caller was not available to the child. Node then tried to
listen on the IPC pipe and failed with "listen EEXIST".
Pass the socket to the child as stdio entry 4 and tell the child to use
that fd in the handshake.
Node also reports no address for a Unix socket adopted by fd, which made
startup fail with "Server has no address". Log the listener as fd:<n>
in that case.
Add an integration test that starts the code-server binary with a Unix
or TCP socket as fd 3 and checks that /healthz answers over it.