fix: require approval for project-level sandbox config (C-1)#51
Merged
Conversation
Project ./odek.json could set sandbox_env, sandbox_image, sandbox_network,
and sandbox_volumes to exfiltrate host secrets (via ${VAR} expansion), pull
an attacker-controlled image, or widen network access.
This change adds a manual approval gate:
- LoadConfig records project sandbox overrides in ResolvedConfig.
- New approveProjectSandbox mirrors the MCP approval pattern:
TTY prompt, persisted per-project trust, and ODEK_APPROVE_PROJECT_SANDBOX=1.
- Wired into run, repl, serve, subagent, mcp, telegram, schedule.
Fixes C-1 in sec_findings.md.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
odek | 656cd5e | Commit Preview URL Branch Preview URL |
Jul 18 2026, 09:09 AM |
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.
Mitigates C-1 from the security audit in sec_findings.md.
Problem
Project-level
./odek.jsoncould setsandbox_env,sandbox_image,sandbox_network, andsandbox_volumesto:${VAR}expansion insandbox_env.All of this happened before the first LLM call, with no approval.
Fix
Adds a manual approval gate for project-level sandbox config, mirroring the existing MCP-server approval pattern:
internal/config/loader.gorecords project sandbox overrides inResolvedConfig.ProjectSandboxOverride.cmd/odek/project_sandbox_approval.goprovides:y= once,t= trust this project,N= deny.~/.odek/project_sandbox_approvals.json(0600).ODEK_APPROVE_PROJECT_SANDBOX=1bypass for CI/non-interactive use.run,repl,serve,subagent,mcp,telegram,schedule.Tests
TestLoadConfig_ProjectSandboxOverride/TestLoadConfig_NoProjectSandboxOverridecmd/odek/project_sandbox_approval_test.goTestReport_ProjectSandboxRequiresApprovalgo test ./... -count=1andgo test -race ./internal/config/ ./cmd/odek/ -count=1pass.Notes
sec_findings.mdis intentionally left gitignored/uncommitted per project convention.