[Fix] Deployment accepts malformed domain names - #2595
Open
roomote-roomote[bot] wants to merge 2 commits into
Open
[Fix] Deployment accepts malformed domain names#2595roomote-roomote[bot] wants to merge 2 commits into
roomote-roomote[bot] wants to merge 2 commits into
Conversation
roomote-roomote
Bot
requested review from
brunobergher,
daniel-lxs and
mrubens
as code owners
September 12, 2026 07:21
Contributor
… test - Reject embedded newlines/carriage returns in validate_domain before label splitting, since 'read' only consumes the first line of a here-string and previously let unvalidated trailing content through. - Add a regression case covering a domain with an embedded newline. - Restructure the deployment-scripts test to invoke bash with the runner script and candidate domain as explicit positional arguments instead of interpolating the script path into a '-c' shell string, clearing the CodeQL 'shell command built from environment values' finding while keeping the subprocess-boundary coverage intact.
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.
What changed
bashinstead of interpolating a path into a-cshell string.Why this change was made
The deployment CLI previously accepted malformed values such as
foo..example.comandfoo-.example.com, so operators received a later Terraform or provider failure after provisioning work had already begun. A follow-up review found that the label-splittingreadcall also stopped at the first newline, letting a value likeroomote.example.com\nnot-a-domainvalidate only its first line while an unvalidated remainder still reached generated Terraform/env values. A related CodeQL finding flagged the test harness for building a shell command from an uncontrolled path.Impact
Invalid app, preview, and managed DNS zone names — including newline-smuggled values — now fail immediately with the existing
invalid domainerror, while valid single-label and multi-label names continue to work. The test harness no longer constructs a shell command string from the script path, clearing the CodeQL alert while keeping the same subprocess-boundary coverage.