Repository navigation
fix!: validate workspace app URLs on the server (#31262) - #31934
Conversation
- Reject external app URLs with javascript, vbscript, data, blob, file, or filesystem schemes, or control characters, for template and sub-agent apps. - Skip invalid sub-agent apps and log the reason; the dev container still starts. - Strip the $SESSION_TOKEN placeholder from sub-agent app URLs. - Drop app status URIs that aren't http, https, or file. (cherry picked from commit 8b0c0cc)
| | `healthCheck` | object | Health check configuration (see below) | | ||
|
|
||
| An external app's `url` must include a scheme and a host, such as `zed://ssh/...` or `https://...`. | ||
| Coder rejects `javascript`, `vbscript`, `data`, `blob`, `file`, and `filesystem` URLs, and URLs that contain control characters. |
There was a problem hiding this comment.
The external app URL restrictions here (blocked javascript, vbscript, data, blob, file, and filesystem schemes and any control characters) also apply to template coder_app resources with external = true, because they share provisioner.ValidateExternalURL (provisioner/terraform/resources.go:527 and coderd/provisionerdserver/provisionerdserver.go:3740). This section reads as devcontainer-specific, so a template author who defines a coder_app with one of these URLs won't learn that it is now rejected. Consider noting in a shared workspace-app or template coder_app page that the same restrictions apply to external coder_app URLs, not only to dev container apps. (Coverage)
Documentation CheckNo blocking documentation issues found. One non-blocking suggestion on customizing-dev-containers.md. Findings for agents- id: coverage-1
persona: coverage
class: suggestion
blocking: false
file: docs/user-guides/devcontainers/customizing-dev-containers.md
line: 173
quote: "Coder rejects `javascript`, `vbscript`, `data`, `blob`, `file`, and `filesystem` URLs, and URLs that contain control characters."
evidence:
- provisioner/urls.go:14
- provisioner/terraform/resources.go:527
- coderd/provisionerdserver/provisionerdserver.go:3740
rule: null
problem: The same external app URL validation applies to template coder_app external URLs, but the docs describe it only for devcontainer apps.
fix: Note the shared restriction in a template or shared workspace-app docs page.
verified: trueAutomated review via Coder Agents. Reply to a finding's thread with the reason if the finding is wrong. |
…ment (#31994) The doc-check agent posted the raw JSON of its review request as the summary comment on #31385 ([comment](#31385 (comment))), so GitHub showed `{"commit_id": ..., "event": "COMMENT", "body": "## Documentation Check\n..."}` with escaped newlines. The inline review on that run posted correctly. Of the latest summary comments on 42 PRs reviewed since 2026-10-25, this is the only malformed one. This changes `.claude/skills/doc-check/output.md` so the agent: - writes the review request to `review.json` and leaves the review `body` empty, which matches what every other run does; - writes the summary to its own `summary.md`, never reuses `review.json` for it, and posts or edits it with exact `gh api ... -F body=@summary.md` commands; - checks, when it reads the comment back, that the body starts with `## Documentation Check` and ends with the marker, and fixes it with `PATCH` if not. ### Follow-up: workflow guard (not in this PR yet) A workflow job that fails the run when the sticky summary comment does not start with `## Documentation Check` is ready, but the bot that opened this PR can't push changes under `.github/workflows/`. The patch adds a `check-summary-comment` job (`needs: doc-check`, `pull-requests: read`) at the end of `doc-check.yaml`, after `delete-workspace`, so it stays clear of the hunks #31720 changes. It passed `actionlint` (with shellcheck) and `zizmor --offline` with no findings, and a dry run against live comments failed on #31385 and passed on #31896 and #31934. Related open PRs: #31649 (draft) also edits `output.md`, and #31720 edits `doc-check.yaml`. Whichever lands second may need a small rebase. Supersedes #31966, reopened under a human author for attribution. Co-authored-by: coder[bot] <137810501+coder[bot]@users.noreply.github.com>
Backport of #31262 to
release/2.38.Clean cherry-pick (
git cherry-pick -x 8b0c0cc35e), no conflicts.Validates workspace app URLs in coderd, not only in the provisioner: blocked schemes and control characters are rejected for external template and sub-agent apps,
$SESSION_TOKENis stripped from sub-agent app URLs, and app status URIs other thanhttp,httpsandfileare dropped. See #31262 for the full description and breaking changes.Ran
go test ./provisioner/ ./coderd/agentapi/and the app-related./coderd/provisionerdserver/tests on the branch: pass.