feat(sandbox): inject DENO_CERT into sandbox child environment#1441
Merged
Conversation
|
All contributors have signed the DCO ✍️ ✅ |
|
🌿 Preview your docs: https://nvidia-preview-pr-1441.docs.buildwithfern.com/openshell |
Sandbox processes running on Deno couldn't TLS-verify connections to services signed by OpenShell's per-sandbox ephemeral CA because Deno doesn't consult `SSL_CERT_FILE` / `NODE_EXTRA_CA_CERTS`. Deno reads its own `DENO_CERT` env var (additive PEM bundle, same shape as `NODE_EXTRA_CA_CERTS`) for that. Add `DENO_CERT` to `child_env::tls_env_vars` pointing at the standalone OpenShell CA cert (not the combined system+sandbox bundle, since DENO_CERT is additive). The three callers in `process.rs` / `ssh.rs` iterate the array, so the size bump from 5 to 6 entries flows through without caller changes. Updates the security best-practices doc to enumerate `DENO_CERT` alongside the other trust-store env vars. Tracks: brevdev/dex-ui#5 Signed-off-by: Alec Fong <alecf@nvidia.com>
1487ce8 to
6950203
Compare
Collaborator
Author
|
I have read the DCO document and I hereby sign the DCO. |
Collaborator
Author
|
recheck |
|
Label |
johntmyers
approved these changes
May 19, 2026
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.
Summary
Inject
DENO_CERTinto the sandbox child environment alongside the existing trust-store env vars so Deno-based agents can TLS-verify connections to services signed by OpenShell's per-sandbox ephemeral CA.Related Issue
Tracks: brevdev/dex-ui#5 (dex-ui-side tracking ticket; the fix belongs here)
Changes
crates/openshell-sandbox/src/child_env.rs::tls_env_vars— add("DENO_CERT", ca_cert_path)to the array, bumping its length from 5 to 6.DENO_CERTat the standalone OpenShell CA cert path, not the combined system+sandbox bundle. Per Deno's docs,DENO_CERTis additive (merged with the system trust roots), same shape asNODE_EXTRA_CA_CERTS— the combined-bundle path would double-count system CAs.docs/security/best-practices.mdx— listDENO_CERTin the auto-detect TLS row.The three callers in
process.rsandssh.rsiterate the array, so the size bump is type-only — no caller changes needed.Testing
cargo test -p openshell-sandbox --lib child_env— 3/3 green, including the updatedapply_tls_env_sets_node_and_bundle_pathsassertion.cargo fmt --check -p openshell-sandboxclean.cargo clippy -p openshell-sandbox --lib --tests -- -D warningsclean.mise run pre-commit— failed locally on an unrelatedz3.hmissing system dep for a different crate (Z3 SMT solver bindings); the workspace-wide pre-commit needs Z3 installed on the host. CI should pick it up.Checklist
architecture/page enumerates these env vars; the user-facing list lives indocs/security/best-practices.mdx, which is updated)