Skip to content

Verify the CLI with the new release key, and bundle signatures for past releases - #391

Merged
ethanndickson merged 5 commits into
mainfrom
ethan/new-release-signing-key
Nov 19, 2026
Merged

ethanndickson merged 5 commits into
mainfrom
ethan/new-release-signing-key

Conversation

@ethanndickson

@ethanndickson ethanndickson commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Relates to SEC-1419

Relates to coder/vscode-coder#1194

Coder releases are now signed with a new key, and the signature is served as <binary>.v2.asc. This swaps the bundled public key for the new one and downloads .v2.asc instead of .asc, so the previous key is no longer trusted.

Deployments released before the new key have no .v2.asc, and would otherwise hit the confirmation prompt on every CLI download. Coder has since signed the 2.29.0 to 2.39.4 releases with the new key, so we'll just ship those signatures with the plugin. When the deployment doesn't serve a signature, we'll use the bundled one for its version and platform, and verify the CLI with it the same way as any other signature. Anything else falls through to the existing releases.coder.com fallback and prompt.

These are the same signatures releases.coder.com serves for those releases, so bundling them just saves the network call, and it still works when that fallback is turned off. They're all in one file, src/main/resources/META-INF/release-signatures.json, which adds about 0.6 MB to the plugin.

I've tested this against two real deployments running locally, by driving the same calls the plugin makes at sign-in from a throwaway test. On 2.39.4 the CLI was verified with the .v2.asc the deployment serves, and on 2.29.0, which has no .v2.asc, it was verified with the bundled signature. Neither showed the prompt.

@ethanndickson

Copy link
Copy Markdown
Member Author

@codex review

@ethanndickson

Copy link
Copy Markdown
Member Author

@codex security review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-18T03:43:57.637805Z 53385c8 Manual request
🔒 Security Review ✅ Completed 2026-11-16T10:00:11.537195Z c8bfad1 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: c8bfad131a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: c8bfad131a

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@linear-code

linear-code Bot commented Nov 16, 2026

Copy link
Copy Markdown

SEC-1419

@ethanndickson
ethanndickson marked this pull request as ready for review November 16, 2026 11:24
@ethanndickson ethanndickson changed the title Verify the CLI with the new release key, or past release digests Verify the CLI with the new release key, and bundle signatures for past releases Nov 17, 2026
@ethanndickson

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 41b9fb1ab0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ethanndickson ethanndickson left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agent review, written in the style of this repo's past reviews. The prerelease comment is the only one that changes behaviour; the other two are nits.

🤖

return DownloadResult.NotFound
}
val source = javaClass.getResource(BUNDLED_SIGNATURES) ?: return DownloadResult.NotFound
val signature = bundledSignatures(source)["${semVer.major}.${semVer.minor}.${semVer.patch}"]

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A prerelease or dev build (v2.33.0-rc.1, v2.32.0-devel+abc1234) is cut down to major.minor.patch here, so it picks up the signature of the stable release. That signature can't match, so the user gets the "Could not verify the authenticity ... it may be tampered with" warning for a CLI that just has no signature. Should we skip the bundle for those versions, like the VS Code extension does in coder/vscode-coder#1194?

🤖

val source = javaClass.getResource(BUNDLED_SIGNATURES) ?: return DownloadResult.NotFound
val signature = bundledSignatures(source)["${semVer.major}.${semVer.minor}.${semVer.patch}"]
?.get(context.settingsStore.defaultCliBinaryNameByOsAndArch)
?: return DownloadResult.NotFound

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: downloadSignature logs when the deployment has no signature, but a miss here is silent. Should we log it too? It would show in the logs why the prompt came up.

🤖

Comment thread CHANGELOG.md Outdated
Comment on lines +27 to +30
- Verify the Coder CLI with Coder's new release signing key, using the `.v2.asc` signature next to the binary. The
previous key is no longer trusted. CLIs from deployments released before the new key are verified with the
signatures that Coder made for those releases with the new key, which ship with the plugin. Any other CLI asks
for confirmation before it runs, as a missing signature did.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: this is a lot for a changelog entry, and I had to read the last sentence a few times. Could we keep it to what the user needs to know? Something like:

- Verify the Coder CLI with Coder's new release signing key. The previous key is no longer trusted. Coder 2.29.0 to
  2.39.4 were released before the new key, so the plugin ships with new signatures for them.

🤖

@ethanndickson

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 2b05d912df

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ethanndickson ethanndickson left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Second round of the agent review, on 2b05d91. The three comments from the first round are addressed. What is left is non-blocking.

🤖


fun bundledSignature(buildVersion: String): DownloadResult {
val source = javaClass.getResource(BUNDLED_SIGNATURES) ?: return DownloadResult.NotFound
val version = buildVersion.trimStart('v').substringBefore('+')

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: downloadReleasesSignature just above still cuts the version to major.minor.patch. So with the releases.coder.com fallback allowed, an rc build misses the bundle here, then fetches the signature of the stable release, and still ends up with the "may be tampered with" warning, right? That function is unchanged from main, so this could be a follow-up. Should both lookups use the same version key?

🤖

Comment thread CHANGELOG.md Outdated
Comment on lines +27 to +28
- Verify the Coder CLI with Coder's new release signing key. The previous key is no longer trusted. Coder 2.29.0 to
2.39.4 were released before the new key, so the plugin ships with new signatures for them.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: a 2.39.4 deployment already serves its own .v2.asc (the PR description says so), so "released before the new key" is not true for the whole range. Maybe just "The plugin ships with new signatures for Coder 2.29.0 to 2.39.4."?

🤖


listOf(
"v2.29.0+de07351b8" to "Could not verify the authenticity",
"v2.29.0-devel+de07351b8" to "No signatures were found",

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: this row checks that a prerelease does not use the bundle, which the test name does not say. Would two small tests read better? Feel free to ignore.

🤖

@ethanndickson

Copy link
Copy Markdown
Member Author

@codex review

@ethanndickson ethanndickson left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Third round of the agent review, on 53385c8. The round 2 comments are addressed: both signature lookups now use the same release version, the changelog sentence is corrected, and the test is split in two. No new comments, this looks good to me.

🤖

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: 53385c8e0f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Trust only the new release key and fetch the .v2.asc signature. When a
release has no signature, accept the CLI if its SHA-256 matches a bundled
list of release digests for that version and platform.
Coder signed the 2.29.0 to 2.39.4 releases with the new release key. Ship
those signatures in release-signatures.json and verify the CLI with the one
for its version and platform. This replaces the release digest list and the
workflow that compared it with coder/vscode-coder.
A development build or a release candidate shares its major.minor.patch
with a release but not its bytes, so the bundled signature of that release
can only fail. Look the signature up by the full version, so such a build
has no bundled signature and gets the same prompt as any other CLI without
one.

Log when no signature is bundled, and shorten the changelog entry.
The fallback cut the build version to major.minor.patch, so a
development build or a release candidate fetched the signature of the
stable release and failed verification. Use one release version for the
bundled signature and for the fallback, so such a build has no signature
in either place.

Correct the changelog entry: the 2.29.0 to 2.39.4 releases were not all
made before the new key.
@ethanndickson
ethanndickson force-pushed the ethan/new-release-signing-key branch from 53385c8 to bca802a Compare November 19, 2026 01:21
@ethanndickson
ethanndickson merged commit 71bf80d into main Nov 19, 2026
8 checks passed
@ethanndickson
ethanndickson deleted the ethan/new-release-signing-key branch November 19, 2026 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants