Repository navigation
fix(observability): refuse a tab, newline, or backslash that names another host - #2388
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review blockedAutomated review did not run, so no review verdict was produced. Reason: The input-safety check rejected material in this revision. No detected value, path, or scanner output is reproduced here. Automatic review is on hold, including after source changes. Request a fresh re-review after resolving the failure; maintainers can also release the hold through an intentional scanner-policy update. Next step: If this is a genuine credential, remove and rotate it. If it is an intentional test fixture, a maintainer must review and qualify it. |
|
Codex review: needs real behavior proof before merge. What this changesThis PR rejects raw tabs, newlines, carriage returns, and backslashes in observability URLs during profile rendering and controller startup. Example: An operator configures http://good.example evil.com/x as the observability destination.
Review scores
ProductKind: Bug fix · Worth it: Needs a maintainer decision · Fix scope: Complete Merge readiness⛔ Blocked before merge - 5 items remain Keep this PR open: it addresses a current-main host-rewriting bug, but both prior findings remain and the broader rejection of host-preserving URLs needs an owner decision. Priority: P2 Decision needed
Before merge
Findings
Tests
Agent review detailsHow this fits togetherThe profile renderer produces Installation YAML, startup validates its observability destination, and an Installation-admin-authorized API read supplies the console's external link. flowchart TB
A[Operator profile] --> B[Profile renderer]
B --> C[Installation YAML]
C --> D[Startup URL validation]
D --> E[Authorized observability API]
E --> F[Console external link]
Technical reviewBest possible solution: Reject host-changing spellings through the existing validators, preserve approved host-stable inputs, and provide consistent startup diagnostics and recovery guidance. Do we have a high-confidence way to reproduce the issue? Current-main source admits parsed DNS destinations and returns normalized url.href without rejecting the reported characters; this read-only review ran no reproduction or tests. Is this the best way to solve the issue? Extending the existing renderer and startup validators addresses the right owners, but whole-string rejection exceeds the demonstrated host-rewriting case and startup classification remains incomplete. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 20b99cdc87a2. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (2 earlier review cycles)
Reviewed October 14, 2026, 12:15 AM ET / 04:15 UTC (Revision 3). |
# Conflicts: # docs/guides/deploy/breaking-changes-archive.md # docs/guides/deploy/breaking-changes.md
|
Free's clanker here (an AI agent working on Free's behalf). Thanks. I reviewed head The one blocker is a conflict. #2385 just landed (9031ae3) and added its notice at the same spot in Optional: The touched tests fail on main (configuration-startup 19/20, profile-renderer 66/67) and pass on the merged tree (20/20, 67/67), checked at the earlier head. |
Closes #2383
Problem
Installation startup stores
url.hrefforobservability.url. On parentc28bd23933b33fcb7a726afd8049d770321b0b31, a tab betweengood.exampleandevil.comis admitted and stored ashttp://good.exampleevil.com/x(hostgood.exampleevil.com). A newline is deleted the same way.http://evil.com\\.good.example/pathis stored ashttp://evil.com/.good.example/path(hostevil.com). Profile preflight copies the written string.http://grafana.example.internal/dis unchanged. A backslash in the query, as inhttps://grafana.example.test/d/operations?var-pattern=\d+, does not change the host.Change
Profile preflight and startup refuse a raw tab, newline, or carriage return anywhere in the observability URL, and a backslash before the query or fragment, before storing
href. A backslash in the query stays. A URL that already fails for userinfo keeps that message. Shorthand IPv4 refusal is unchanged. API and worker startup classify the new sentence asOBSERVABILITY_URL_INVALID.Verification
Parent
c28bd23933b33fcb7a726afd8049d770321b0b31admitted the tab, newline, and backslash URLs and stored the rewritten href above.Head
23673d101eb4b6769909785de876b813e95accad, which merges current main9031ae3d28e61b3bd50c7aeba9ca7b16a5548feb:node --test --test-name-pattern "Installation startup validates the optional external observability URL|API and worker refuse a bad observability host|profiles pass an optional observability URL|the codex profile carries a Codex model endpoint" tests/integration/configuration-startup.test.mjs tests/integration/profile-renderer.test.mjsExit 0. 4 passed, 0 failed. The tab, newline, carriage return, and host-backslash URLs fail preflight and startup with the new sentence. API and worker exit 1 with
OBSERVABILITY_URL_INVALIDand no diagnostic message.http://192.168.1.1is still stored ashttp://192.168.1.1/. A query backslash ongrafana.example.testis admitted and keeps that host. The Codex profile still carriesruntime.codexModelBaseUrl.Exit 0.
docs/guides/deploy/breaking-changes.md2472,docs/guides/deploy/breaking-changes-archive.md2499,docs/guides/deploy/installation-profiles.md2490,docs/reference/configuration.md1963.Risks
A profile or Installation whose observability URL contains a tab, newline, or a backslash before the query fails preflight or startup until that character is removed. A backslash in the query is kept. The notice moves the 2026-10-13 demo cluster CIDR entry onto the archive page.