security: release v1.14.6 with SEC-200 scope hardening#966
Open
EhabY wants to merge 1 commit into
Open
Conversation
Mark security-sensitive settings as `scope: "machine"` so workspace and folder `settings.json` can no longer override them. This closes a path where a malicious workspace could redirect command execution (`coder.headerCommand`, `coder.tlsCertRefreshCommand`), swap the CLI binary or its source, inject CLI/SSH flags, substitute TLS material, or override identity and credential-storage settings. Bump to v1.14.6 and add the corresponding CHANGELOG entry. Also drop the release-workflow gate that required tags to come from `main` so a fix can be cut from a release branch.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Cuts v1.14.6 off the
v1.14.5tag with the SEC-200 fix for users on the stable channel. The same change is being delivered onmainin a separate PR.Closes the SEC-200 attack path where a malicious
.vscode/settings.jsoncould override security-sensitive Coder settings — most notably the two command-execution settings (coder.headerCommand,coder.tlsCertRefreshCommand) called out in the original report.The fix is metadata-only: each affected setting gets
"scope": "machine". VS Code itself drops workspace and folder values formachine-scoped settings, so the malicious workspace value never reaches our code. No runtime guard is needed.This PR also relaxes the release workflow so this release branch can publish without being merged into
mainfirst.Why
machineand notwindow(the default)VS Code's default scope is
window, which means workspace and foldersettings.jsoncan override the user setting. That's precisely the SEC-200 attack vector. Any setting whose value can cause command execution, redirect network traffic, swap credentials, or substitute the CLI binary must not be controllable by a project file — only by the user who installed the extension.Why
machineand notapplicationBoth
applicationandmachineblock workspace/folder overrides, so both close SEC-200. The differences:applicationmachineWe pick
machinebecause most of these settings are inherently machine-specific:cmd.exe /c …headerCommandwould sync over to a Mac via Settings Sync (application) and silently break.binaryDestination,tlsCertFile,tlsKeyFile,tlsCaFile,proxyLogDirectoryare absolute paths that differ per machine.proxyBypass,tlsAltHostdepend on the local network environment.machinekeeps the security guarantee while letting per-machine values stay per-machine, including via VS Code's Remote SSH user-level settings.Settings updated
coder.headerCommandmachinecoder.tlsCertRefreshCommandmachinecoder.binarySourcemachinecoder.binaryDestinationmachinecoder.disableSignatureVerificationmachinecoder.enableDownloadsmachinecoder.sshFlagsmachine-o ProxyCommand=…(exec)coder.globalFlagsmachinecoder.tlsCertFilemachinecoder.tlsKeyFilemachinecoder.tlsCaFilemachinecoder.tlsAltHostmachinecoder.insecuremachinecoder.proxyLogDirectorymachinecoder.proxyBypassmachinecoder.defaultUrlmachinecoder.autologinmachinedefaultUrlcould auto-login elsewherecoder.useKeyringmachineAlready
machine:coder.sshConfig.CI change
Drops the
Verify tag is on mainstep from.github/workflows/release.yamlso thisrelease/v1.14.6branch can publish a tagged release without first being merged intomain. The same change lands onmainin the companion PR.Companion PR
The same scope-hardening change is being delivered against
mainseparately (under## Unreleased).Release plan
After merge:
v1.14.6on the merged commit at the tip ofrelease/v1.14.6.Test plan
pnpm typecheck— clean on the equivalentmainbranch (this branch's source matches v1.14.5 unchanged; onlypackage.jsonmetadata fields and CHANGELOG are touched).pnpm test— 1670 passed / 1 skipped on the equivalentmainbranch with identical scope changes..vscode/settings.jsonsettingcoder.headerCommand; confirm VS Code reports it as unsettable at workspace scope and the value is ignored..vsixand confirm a user-levelcoder.headerCommandstill works.