Harden command construction (defense-in-depth)#4
Merged
Conversation
Three low-risk hardening fixes from a security review. None is exploitable today; each removes a latent footgun should an input source change. - ui.ts: validate the URL before openUrl hands it to a shell on Windows (`start` is a cmd builtin). Restrict to an https `*.vercel.run` origin with a shell-safe character set via a new exported `isOpenableUrl` predicate. - ready.ts: pass the loop count and port to the waitForPort probe as bash positional args ($1/$2) instead of string-interpolating them, matching the positional-arg pattern used elsewhere. - sync.ts: add `--` to the remote `rm -f` so no target can be read as an option (targets are always absolute, so this is belt-and-suspenders). Adds unit tests for isOpenableUrl and updates the removeFiles assertion. https://claude.ai/code/session_01GVqD2pepFwpZG7dNp9T9jh
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
suarezesteban
pushed a commit
that referenced
this pull request
Jun 10, 2026
suarezesteban
pushed a commit
that referenced
this pull request
Jun 10, 2026
Ships the changes from #4 and #5: hardened command construction, calmer auth/stop/timeout error paths, low-friction env-file injection, and honoring an explicit port in the project's dev script. - Add the v0.1.0-beta.4 release artifacts (sha256-checksummed bundle). - Point install.sh's default version at v0.1.0-beta.4. - Print the next step after a successful install when no PATH change is needed, so the happy path ends with what to run instead of silence. https://claude.ai/code/session_01GVqD2pepFwpZG7dNp9T9jh
Merged
suarezesteban
added a commit
that referenced
this pull request
Jun 10, 2026
Ships #4 and #5: hardened command construction, calmer auth/stop/timeout error paths, low-friction env-file injection, and honoring an explicit port in the project's dev script. - Add the v0.1.0-beta.4 release artifacts (sha256-checksummed bundle). - Point install.sh's default version at v0.1.0-beta.4. - Print the next step after a successful install when no PATH change is needed. https://claude.ai/code/session_01GVqD2pepFwpZG7dNp9T9jh
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.
Three low-risk hardening fixes from a security review of the CLI. None is exploitable today — each removes a latent footgun should an input source ever change.
ui.ts—openUrlgoes through a shell on Windows (startis a cmd builtin). It now validates the URL first via a new exportedisOpenableUrlpredicate: https-only,*.vercel.runorigin, strict shell-safe character set. Unit-tested, including lookalike hosts (evil-vercel.run) and shell metacharacters.ready.ts— thewaitForPortprobe now passesport/iterationsas bash positional args ($1/$2) instead of string interpolation, matching the positional-arg pattern used elsewhere (e.g.remoteTextEquals).sync.ts— the remoterm -finremoveFilesnow includes--so no target can ever be parsed as an option.pnpm lint,pnpm typecheck,pnpm test(147/149; 2 pre-existing environment-only failures as root) andpnpm buildpass.https://claude.ai/code/session_01GVqD2pepFwpZG7dNp9T9jh