Add sandbox-less mode with sandbox: false configuration#9758
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Updated JSON schema to allow boolean values for sandbox field - Modified extractSandboxConfig to handle sandbox: false - Updated validation to only refuse in strict mode (not in non-strict mode) - Added compile-time warning when sandbox: false is used - Added helper function isSandboxDisabled() - Updated applySandboxDefaults to preserve disabled state - Updated buildMCPGatewayConfig to return nil when sandbox disabled Next: Need to skip gateway startup step generation when sandbox disabled Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Added conditional check to skip "Start MCP gateway" step when sandbox: false - Gateway config is already nil when sandbox disabled (from Phase 1) - MCP config is still generated but without gateway section - Tests show good progress - no gateway step being generated - Still need to skip gateway Docker image download - Still need to skip gateway stop step Next: Complete gateway-related step cleanup and fix remaining integration tests Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
sandbox: false configuration
|
Minor cleanup items not blocking core functionality: Skip gateway Docker image download when sandbox disabled |
- Skip MCP gateway Docker image download when sandbox: false - Skip "Stop MCP gateway" step generation when sandbox: false - Skip "Parse MCP gateway logs" step generation when sandbox: false - All sandbox disabled tests passing - Verified compiled workflows have no gateway references or environment variables Addresses feedback: https://github.com/githubnext/gh-aw/pull/XXX#issuecomment-3739970970 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Completed all three cleanup items in commit 2b9a6b0:
All sandbox disabled tests passing. Verified compiled workflows contain:
|
|
@copilot review the whole changes for consistency and potentially missing scenario. Add a new agentic workflow that uses sandbox: false and analyzes the changes in the last day and extracts insights about how the team is evolving and posts it as a discussion. uses claude |
Created a new agentic workflow that demonstrates sandbox-less mode: - Uses Claude engine with sandbox: false - Analyzes last 24 hours of repository activity - Extracts insights about team evolution and working patterns - Posts findings as a GitHub Discussion - Direct MCP server access without gateway - Network access without firewall restrictions The workflow showcases practical use of sandbox: false for trusted analysis tasks where the overhead of gateway/firewall isn't needed. Verified compilation: - No "Start MCP gateway" step - No "Stop MCP gateway" step - No MCP_GATEWAY_* environment variables - firewall_enabled: false in metadata - Warning displayed about disabled security protections Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Completed full implementation review and added example workflow in commit d253b69. Consistency Review ✅Verified implementation is consistent across all components: Parsing & Configuration:
Compilation:
MCP Renderers:
Validation:
New Workflow: daily-team-evolution-insights.mdCreated practical example using Claude +
Verification: Compiled successfully with all expected characteristics (no gateway steps/vars, firewall disabled, warning displayed) Missing Scenarios CheckNo missing scenarios found - implementation handles:
|
Changed dev.md workflow to demonstrate sandbox-less mode: - Set sandbox: false to disable firewall and gateway - Changed strict: true to strict: false (required for sandbox: false) - Added network.allowed: ["*"] for unrestricted access - Workflow now runs with direct MCP server access Verified compilation: - No "Start MCP gateway" step - No "Stop MCP gateway" step - No MCP_GATEWAY_* environment variables - firewall_enabled: false in metadata - Warning displayed about disabled security protections Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Updated dev.md to use Changes made:
Verified: No gateway steps/variables, |
|
One still needs the docker image downloads. Do not download the gateway image. |
|
The implementation is already correct - Docker images are still being downloaded, but the gateway image is excluded. Current behavior with
Implementation in Verification: - name: Downloading container images
run: bash /opt/gh-aw/actions/download_docker_images.sh ghcr.io/github/github-mcp-server:v0.27.0 node:lts-alpineNo changes needed - the gateway image is already excluded while other images are still downloaded. |
|
@copilot format, lint go, lint js |
Ran make fmt, make lint, and make lint-cjs: - Fixed JSON schema formatting (arrays on single lines) - Removed trailing whitespace in docker.go - Fixed indentation in mcp_servers.go - Fixed indentation in sandbox_disabled_test.go All linters passing: - Go linter: ✓ 0 issues - JavaScript linter: ✓ All files use Prettier code style - All validations passed Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Completed formatting and linting in commit 1ba695b. Changes:
Results:
|
Implementation Plan for Sandbox-less Mode (
sandbox: false) - COMPLETE ✅Phase 1: Frontmatter parsing and validation ✅
extractSandboxConfigto handlesandbox: falseboolean formatSandboxConfigstruct to track disabled state (using existingDisabledfield)sandbox: falsein strict mode onlysandbox: falseis usedPhase 2: Compiler orchestrator changes ✅
applySandboxDefaultsto respectsandbox: falseisSandboxDisabled()to check for disabled stateisFirewallDisabledBySandboxAgent)Phase 3: MCP configuration changes ✅
buildMCPGatewayConfigto return nil when sandbox disabledPhase 4: Gateway and copilot execution steps ✅
Phase 5: Testing ✅
sandbox: falseparsingPhase 6: Code Quality ✅
Phase 7: Documentation & Example ✅
sandbox: false(daily-team-evolution-insights.md)sandbox: falsefor development/testingSummary
All core functionality complete. When
sandbox: falseis configured:✅ No "Start MCP gateway" step generated
✅ No "Stop MCP gateway" step generated
✅ No "Parse MCP gateway logs" step generated
✅ No gateway Docker image downloaded
✅ No
MCP_GATEWAY_*environment variables in workflow✅ MCP config generated without
gatewaysection✅ Direct copilot execution (no AWF wrapper)
✅ Firewall disabled automatically
✅ Compile-time warning displayed
✅ Refused in strict mode with clear error
✅ Code formatted and linted
Example Workflows
daily-team-evolution-insights.md: Production example using Claude
dev.md: Development/testing workflow using Copilot
sandbox: falsefor faster iteration during developmentThe implementation is complete, consistent across all components, formatted, linted, and all sandbox-disabled tests are passing.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.