Skip to content

v1.17.0

Choose a tag to compare

@github-actions github-actions released this 13 Oct 13:46
· 15 commits to main since this release
v1.17.0
492e4ba

This release fixes a high-severity security issue where a crafted vscode:// link could run commands on your machine. Update as soon as possible. It also warns you when workspace startup scripts fail, fixes OAuth sign-in on deployments that enforce token scopes, and applies the recommended SSH connection settings in Devin Desktop.

🔒 Security

Command injection through deep links

Fixes GHSA-7r9p-h64p-j4vv: a crafted vscode://coder.coder-remote/open link could store a deployment URL that contains shell commands. The extension wrote that URL into the SSH ProxyCommand, and your shell ran the commands on that connection and every later one, even after an upgrade. The link could name your own deployment, so no trust prompt appeared and the connection looked normal.

These versions are affected:

  • 1.14.0 on macOS and Windows, where coder.useKeyring is on by default
  • 1.14.1 through 1.16.2 with coder.useKeyring enabled
  • 1.16.3 and 1.16.4 with default settings

The extension now:

  • Quotes and checks the deployment URL in SSH commands. URLs that contain shell metacharacters or % are rejected every time the extension builds the ProxyCommand, so a URL that an earlier version stored can't run.
  • Checks URLs before you sign in. Sign-in, auto-login, and links reject those URLs before authenticating, along with URLs that include a username, password, query, or fragment.
  • Keeps the URL of a deployment you're signed in to. A link that names the same origin with a different path no longer replaces the stored URL.
  • Runs workspace app commands without a local shell. The extension used to open a local terminal, wait five seconds, and type the app's command into it. The terminal now runs coder ssh <workspace> -- <command> directly and ends when the command finishes.
  • Validates names from the deployment. Workspace, owner, and agent names and deployment hostnames are validated before the extension uses them in SSH hosts, CLI arguments, and file paths. Agent names with underscores or leading or trailing hyphens keep working. On Windows, a hostname that can't be a folder name, such as one ending in a period, stops the connection with an error.
  • Keeps deployment-provided text out of notifications. If a value fails validation, the notification describes the problem without showing the value, and Open Coder Output shows the details.
  • Shows the relay name in the network status tooltip as plain text, and lets the tooltip's links run only its own commands.

Important

  • If an earlier version stored a URL that's now rejected, or a URL with a non-ASCII hostname, you're asked to sign in once more.
  • Sign-in rejects URLs that include a username and password. If a proxy in front of your deployment needs credentials, send them with coder.headerCommand.
  • Running a workspace app's command requires Coder CLI 2.23.0 or later. Older CLIs show an error.

Highlights

Startup script warnings

If the agent's startup scripts fail or time out, the extension now shows a warning. Before, these failures appeared only in the Coder output channel. The connection still succeeds. (#1129, closes #1125)

Warning that names two failed startup scripts and their exit codes, with Show Logs and Open in Dashboard buttons
The warning shown when startup scripts fail

  • If the deployment reports per-script status, the warning names the failed scripts and their exit codes.
  • After a timeout, the warning notes that the scripts might still be running.
  • Show Logs opens each failed script's logs in its own terminal. Open in Dashboard opens the workspace page.
  • Scripts that fail after you connect also trigger the warning.
  • To turn off the warning, set coder.disableNotifications.

Two terminals, one per failed startup script, each showing that script's log output
The logs that Show Logs opens, one terminal per failed script

OAuth on deployments that enforce scopes

Coder 2.38 and later can enforce OAuth token scopes, and sign-in failed on those deployments. The extension now requests the scopes that it and the coder CLI need. (#1138, #1147)

  • If you're already signed in with OAuth, your session keeps working until it expires, and then asks you to sign in again.
  • If the deployment has dynamic client registration turned off, the default from Coder 2.37, sign-in uses a session token instead and tells you why.
  • Signing out, or signing in again, revokes the old OAuth tokens at the server.

Note

OAuth becomes the default sign-in method in a future release. If your deployment has dynamic client registration turned off, ask your Coder administrator to turn it on. For instructions, see OAuth2 provider.

Improvements

  • Coder sees which editor you use. Session tracking reports your editor, such as Cursor or Windsurf, instead of always reporting vscode. Requires Coder and the Coder CLI 2.38.0 or later. (#1136)
  • Connection logs when a server is unreachable. An unreachable server never fails for good, so the buffered connection logs added in 1.16.4 were never written out. After six failed reconnect attempts in a row, about 15 seconds with the default backoff, the extension writes them to the Coder output channel once per outage and keeps retrying. (#1132, closes #1112)

Bug fixes

  • The CLI uses your extension session. If CODER_SESSION_TOKEN was set in the environment VS Code started in, it overrode the extension's session, so CLI commands and SSH connections failed or ran as a different user. Every CLI command the extension runs, including the SSH ProxyCommand and the terminals it opens, now ignores that variable and uses the session the extension set up. A --token in coder.globalFlags still takes precedence. (#1147)
  • No credentials in the logs. A failed request could log its session token, OAuth tokens, or client secret, and the buffered connection logs replayed them into the Coder output channel. The extension now redacts credentials from everything it logs, including the buffered logs. (#1147)
  • SSH settings apply in Devin Desktop. Devin Desktop (formerly Windsurf) reads its SSH connection settings from remote.devinSSH.*, or remote.windsurfSSH.* on Windsurf 2.0 to 2.3, so the timeouts the extension set under remote.SSH.* had no effect there. Each editor now gets only the settings its Remote SSH extension reads, both when you connect and from Coder: Apply Recommended SSH Settings. (#1146, fixes #1145)
  • SSH config Include works on Windows with unusual paths. If the config directory path contained *, ?, or [, OpenSSH for Windows didn't match the escaped Include path, so it skipped the Coder hosts. (#1131)

Full changelog: v1.16.4...v1.17.0