Repository navigation
feat(sandbox): template lines and scripts for the sandbox settings - #28
Merged
Merged
Conversation
Add the OPENSHELL_* block, SANDBOX_ENV_ALLOWLIST, NAMESPACE_SCRUB_ENV and NAMESPACE_EXEC_FALLBACK to x/RDF_Map.prop, so they can be set from container env vars. New setOpenShell.sh (wired into runCS.sh and runConfiguration.sh) sets the OPENSHELL_* keys and appends one the template lacks instead of ignoring it. setChroot.sh handles the new SANDBOX_ENV_ALLOWLIST and NAMESPACE_* keys and now anchors its sed patterns, so a template comment that names a key is no longer overwritten. The SANDBOX_MODE comment now covers OPENSHELL.
This was referenced Nov 17, 2026
kunal0137
marked this pull request as ready for review
November 17, 2026 20:40
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.
Description
Config support for the sandbox changes in SEMOSS/Semoss#3336 (which replaces #3332 and supersedes #3191). Without this, the OpenShell settings can only be set by editing
RDF_Map.propby hand, because none of them is in the template or in any script, and a container env var has no effect on a key the template lacks.Merging this before or after the Semoss PR is safe: a Semoss build that does not know a key ignores its template line.
Changes Made
x/RDF_Map.prop: adds the 15OPENSHELL_*keys (blank, meaning the default shown in the comment above each),SANDBOX_ENV_ALLOWLIST,NAMESPACE_SCRUB_ENV(true) andNAMESPACE_EXEC_FALLBACK(fakechroot). TheSANDBOX_MODEcomment now coversOPENSHELL, and says that any other value meansFAKECHROOT.artifacts/scripts/setOpenShell.sh(new): sets eachOPENSHELL_*key from the env var of the same name. It appends a key the template lacks instead of ignoring it, and escapes&,@and\in values. Wired intorunCS.shandrunConfiguration.shaftersetSandbox.sh.artifacts/scripts/setChroot.sh: handlesSANDBOX_ENV_ALLOWLIST,NAMESPACE_SCRUB_ENVandNAMESPACE_EXEC_FALLBACK. The existingsedpatterns are now anchored (^KEY). They were not, so a template comment that mentionedSANDBOX_MODEorCHROOT_ENABLEwould have been rewritten at container start.AGENTS.md: the env var to script table lists the new variables, and the RDF_Map section points to the full settings list in the Semoss repo (docs/deployment/sandbox_configuration.md).How to Test
bash -n artifacts/scripts/setOpenShell.sh artifacts/scripts/setChroot.shsetChroot.shandsetOpenShell.shwith the env vars set, then check/opt/semosshome/RDF_Map.prop: each key isKEY<TAB>value, comments are unchanged, and a key removed from the file beforehand is appended.RDF_Map.propis unchanged by the two scripts.Notes
/opt/semosshome: values with&,@and\come through intact, settingOPENSHELL_CLIdoes not touchOPENSHELL_CLI_HOME, a second run changes nothing, and with no env vars set the file is unchanged. I did not build or start an image.NAMESPACE_SCRUB_ENVistruein the template and in the Semoss code default. ASANDBOX_MODE=NAMESPACEdeployment will start its python and node jails without the server's environment once it picks up the Semoss change.SANDBOX_ENV_ALLOWLISTorNAMESPACE_SCRUB_ENV=falseis the way back.openshellCLI install is in the Semoss Dockerfiles (feat: sandbox abstraction Semoss#3336), not here. The gateway, its mTLS bundle and any Kubernetes manifests live outside both repos (SEMOSS-deployment, not checked).SANDBOX_MODE=OPENSHELLneeds those as well as these settings. For more than one server node,REDIS_ENABLEDalso has to be on so nodes can find a user's sandbox (already in the template and insetRedis.sh).