Repository navigation
deploy/sbx: the host agent refuses a SBX_UNIT_DIR that isn't a plain absolute path (follow-up to #948) - #950
Merged
Conversation
… plain absolute path Follow-up to rossoctl#948 (rossoctl#923): validate SBX_UNIT_DIR with install-host.sh's PLAIN_PATH_RE, beside the SBX_SRV check. rossoctl#948 defaulted it but never checked it, so a relative path or a trailing space made the credentials drop-in test read as off, and an egress template would be built without the host's CA (then refused at worker install). The regex is copied from install-host.sh, which reads the same drop-in, and the path-parity test now asserts the two are identical; the settings-refusal test covers a relative path, a trailing space and a trailing slash. Assisted-By: Claude Code Signed-off-by: Rong Chang <[email protected]>
ingpaolodettori-dev
approved these changes
Nov 20, 2026
ingpaolodettori-dev
left a comment
There was a problem hiding this comment.
Review — deploy/sbx: the host agent refuses a SBX_UNIT_DIR that isn't a plain absolute path (follow-up to #948)
Exactly the gap the #948 review named, done the way install-host.sh does it.
PLAIN_PATH_REisinstall-host.sh's pattern verbatim, and the new test pins the two definitions equal (it cuts the agent's trailing comment and compares the assignment with the installer's), so a later change to one script fails the suite instead of silently diverging — the same discipline the drop-in and CA paths already get.- The three refused forms are the ones that would have read as "credentials off" and rebuilt a CA-less snapshot: a relative path, a trailing space, a trailing slash. Each is refused exit 2 in
check_settings, before any call, and the pass message says so. - Rejecting a trailing separator also matches the installer's own rule, which is the right tie-break: whatever
--egressaccepted when it wrote the drop-in is what the agent must accept when it looks for it.
Checks 16/16 green. Author: webchang (MEMBER — maintainer). One commit, signed off.
webchang
added a commit
to webchang/moca
that referenced
this pull request
Nov 20, 2026
Carries rossoctl#941-rossoctl#946, rossoctl#948, rossoctl#950 and rossoctl#338's rossoctl#949/rossoctl#951 (API 1.33.0). One conflict: docs/operate/sandbox-service/install.md's settings table; upstream's table kept (its rossoctl#945 SBX_STORAGE_CLASS wording, the OIDC and proxy-hop rows) plus the fork's SBX_GATE_RECORD_SCHEMA row. The fork-only set is unchanged: the same 30 files. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Rong Chang <[email protected]>
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.
Follow-up to #948 (#923), from its review: the host agent now refuses an
SBX_UNIT_DIRthat is not a plain absolute path.#948 defaulted
SBX_UNIT_DIR(to/etc/systemd/system) but never checked it. A relative path or a trailing space made the credentials drop-in test,[[ -f "$(egress_dropin)" ]], read as "credentials off", so an egress template would be built without the host's CA and then refused at worker install.What changes
deploy/sbx/host-agent.sh:[[ "$SBX_UNIT_DIR" =~ $PLAIN_PATH_RE ]] || refuse …, beside theSBX_SRVcheck, before any call.PLAIN_PATH_REisinstall-host.sh's, copied, since both read the same drop-in.deploy/sbx/tests/host-agent.test.sh: the settings-refusal loop adds a relative path, a trailing space and a trailing slash (each exit 2, no call made), and the path-parity check now also asserts the two scripts'PLAIN_PATH_RElines are identical.Tests
On main, the new cases fail ("accepted SBX_UNIT_DIR=units", and the parity check); with the change,
host-agent.test.shpasses, as do the otherdeploy/sbxsuites.Assisted-By: Claude Code