Skip to content

feat(sandbox): add structured direct execution - #636

Open
Nzoa-app wants to merge 7 commits into
yc-software:mainfrom
Nzoa-app:codex/structured-execution-boundary-v1
Open

feat(sandbox): add structured direct execution#636
Nzoa-app wants to merge 7 commits into
yc-software:mainfrom
Nzoa-app:codex/structured-execution-boundary-v1

Conversation

@Nzoa-app

@Nzoa-app Nzoa-app commented Aug 20, 2026

Copy link
Copy Markdown

Summary

  • add an additive structured runDirect contract with executable, argv, stdin, cwd, explicit environment, timeout, output limits, and cancellation
  • implement native no-shell execution for local, AWS microVM, and Sprites; unsupported backends fail closed
  • enforce descriptor-owned environment allowlists, fixed runtime PATH, process-group termination, bounded output, and strict output masking
  • quarantine resident credentials for all nonlegacy broker modes and remove insecure shell fallback
  • preserve the legacy shell execution route for legacy tools

Security properties

  • no sh -c, bash -c, shell=true, eval, string command parsing, globbing, redirection, or automatic shell fallback inside runDirect
  • broker errors and direct-execution errors are generic
  • direct-only services are not advertised on unsupported backends
  • remote helpers independently validate environment keys and kill the full process group on abort/timeout/output overflow

Validation

  • Node 24 typecheck
  • ESLint
  • Prettier check
  • Oxlint
  • 44 focused tests passing
  • gitleaks diff scan clean
  • targeted Semgrep clean
  • independent security review: no High/Medium findings

This is the upstream prerequisite for the Nzoa Employee incident remediation. It contains no credential values and does not start or restart any soak window.

@Nzoa-app

Nzoa-app commented Aug 20, 2026

Copy link
Copy Markdown
Author

@16francej Maintainer review/merge authority is required for this upstream security boundary.

Updated exact head: c0cbe06.

The latest surgical commit closes the cancellation gap discovered during the downstream cloud gate: caller abort now identifies the exact active Sprites exec session with a per-request UUID, requires authenticated fail-closed kill-stream completion, cleans up all post-dispatch transport/protocol failures, and terminates the supervised process tree even while structured stdin is still open.

Evidence on this exact head:

  • independent security review: PASS;
  • independent Sprites API/contract/concurrency review: PASS;
  • full Node 24 suite: 4,209 total / 4,045 pass / 0 fail / 164 declared skips;
  • focused direct-execution suite: 19 pass / 0 fail / 1 Linux-only skip;
  • TypeScript, ESLint, Prettier, git diff check, and gitleaks-on-diff: PASS.

Upstream main has since advanced by four commits to 090f490. A read-only merge-tree simulation is conflict-free, producing tree c93ff2eed0416a945f932bb3417576860c664960; focused tests on that combined tree passed 67 runnable / 0 failed / 1 Linux-only skip, and TypeScript passed.

Downstream Nzoa propagation, cloud deployment, Cloud Independence Gate, and replacement soak T0 remain blocked until this PR receives upstream acceptance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants