Skip to content

Restore the sandbox.agent: false opt-out - #58693

Merged
pelikhan merged 5 commits into
mainfrom
copilot/reverse-deprecation-sandbox-agent
Sep 5, 2026
Merged

Restore the sandbox.agent: false opt-out#58693
pelikhan merged 5 commits into
mainfrom
copilot/reverse-deprecation-sandbox-agent

Conversation

Copilot AI commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Restore sandbox-free agent execution as an explicit non-strict opt-out. Strict mode continues to reject it, while non-strict workflows must enable the dangerous feature flag.

Changes

  • Validation

    • Require features.dangerously-disable-sandbox: true.
    • Reject missing, false, or non-boolean values.
    • Preserve the strict-mode error.
  • Deprecation reversal

    • Remove the deprecation warning.
    • Remove the codemod that deleted sandbox.agent: false.
  • Documentation

    • Update workflow syntax, migration guidance, reference documentation, and release notes.
features:
  dangerously-disable-sandbox: true
sandbox:
  agent: false
strict: false

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • github.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "github.com"

See Network Configuration for more information.

Generated by 👨‍🍳 PR Sous Chef · pi · gpt54 · 69.5 AIC · ⌖ 8.75 AIC · ⊞ 8.9K ·
Comment /souschef to run again

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title Restore sandbox.agent false opt-out Restore the sandbox.agent: false opt-out Sep 5, 2026
Copilot AI requested a review from pelikhan September 5, 2026 02:36
@pelikhan
pelikhan marked this pull request as ready for review September 5, 2026 02:41
Copilot AI balanced review requested due to automatic review settings September 5, 2026 02:41
Comment thread .github/aw/syntax-agentic.md Outdated
- `cli-proxy: true` - Enable AWF CLI proxy sidecar for secure read-only `gh` CLI access without exposing `GITHUB_TOKEN` (requires AWF v0.26.0+). Prerequisite for `integrity-reactions`; the compiler enables it automatically when `integrity-reactions: true` is set.
- `integrity-reactions: true` - Enable reaction-based integrity promotion/demotion. Maintainers can use 👍/❤️ reactions to promote content to `approved` and 👎/😕 to demote it to `none`. Compiler automatically enables `cli-proxy`. Requires `tools.github.min-integrity` to be set and MCPG >= v0.2.18. Defaults: endorsement reactions THUMBS_UP/HEART, disapproval reactions THUMBS_DOWN/CONFUSED, endorser-min-integrity: approved, disapproval-integrity: none.
- `dangerously-disable-sandbox-agent: "<justification>"` - Required when `sandbox.agent: false` is set. Must be a plain string justification (minimum 20 characters; expressions are not allowed) that explains why disabling the sandbox is safe for this workflow.
- `dangerously-disable-sandbox: true` - Required when `sandbox.agent: false` is set. This opt-out is rejected in strict mode.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot match The old feature name

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the syntax, validation, tests, and related documentation to use the legacy dangerously-disable-sandbox-agent feature name in commit 0184ae3.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The public CompileWorkflowData path can bypass strict-mode sandbox rejection, and existing ADRs still contradict the restored policy.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Restores sandbox.agent: false for explicitly opted-out, non-strict workflows.

Changes:

  • Requires features.dangerously-disable-sandbox: true.
  • Removes the deprecation warning and removal codemod.
  • Updates tests, documentation, migration guidance, and release notes.
File summaries
File Description
pkg/workflow/workflow_run_validation_test.go Updates feature flags and warning expectations.
pkg/workflow/sandbox.go Removes stored disable justification.
pkg/workflow/sandbox_validation.go Validates the new boolean opt-out.
pkg/workflow/sandbox_validation_test.go Removes justification-specific tests.
pkg/workflow/sandbox_test.go Tests valid and invalid feature values.
pkg/workflow/sandbox_agent_false_test.go Updates integration coverage for the opt-out.
pkg/workflow/sandbox_agent_disabled_test.go Tests strict rejection and warning removal.
pkg/workflow/pull_request_target_validation_test.go Updates warning expectations.
pkg/workflow/prompts_test.go Uses the new feature syntax.
pkg/workflow/importable_tools_test.go Uses the new feature syntax.
pkg/workflow/compiler_validators.go Removes the deprecation warning.
pkg/workflow/compiler_validators_test.go Verifies warning removal.
pkg/workflow/aw_info_steps_test.go Uses the new feature syntax.
pkg/constants/README.md Documents the renamed constant.
pkg/constants/feature_constants.go Defines the new feature flag.
pkg/cli/mcp_tools_management.go Removes the codemod from MCP help.
pkg/cli/fix_codemods.go Unregisters the removal codemod.
pkg/cli/fix_codemods_test.go Updates codemod registry expectations.
pkg/cli/codemod_sandbox_agent_false_removal.go Deletes the obsolete codemod.
pkg/cli/codemod_sandbox_agent_false_removal_test.go Deletes obsolete codemod tests.
pkg/cli/codemod_network_firewall_test.go Updates migration expectations.
docs/src/content/docs/reference/sandbox.md Documents the restored opt-out.
docs/src/content/docs/reference/gh-aw-as-mcp-server.md Updates the codemod list.
.github/aw/upgrade-agentic-workflows.md Updates migration guidance.
.github/aw/syntax-agentic.md Updates syntax documentation.
.changeset/restore-sandbox-agent-false.md Records the breaking change.
Review details
  • Files reviewed: 26/26 changed files
  • Comments generated: 2
  • Review effort level: Balanced

Comment on lines 90 to +94
if sandboxConfig.Agent != nil && sandboxConfig.Agent.Disabled {
justification, err := getSandboxDisableJustification(workflowData)
if err != nil {
flag := string(constants.DangerouslyDisableSandboxAgentFeatureFlag)
flag := string(constants.DangerouslyDisableSandboxFeatureFlag)
value, found := getFeatureValueCaseInsensitive(workflowData.Features, flag)
enabled, isBoolean := value.(bool)
if !found || !isBoolean || !enabled {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in the latest commit: CompileWorkflowData now applies effective strict-mode validation before generation, so sandbox.agent: false cannot bypass strict rejection. Added direct CompileWorkflowData coverage.

Comment on lines +40 to +42
Setting `sandbox.agent: false` disables the agent firewall while keeping the MCP gateway enabled. This removes a trust boundary and is only supported when `strict: false`.

To disable the agent sandbox, you **must** add `features.dangerously-disable-sandbox-agent` with a literal justification string of at least 20 characters. The justification must explain why the trust boundary is being removed and is stored for diagnostics and audit. The following values are rejected by the compiler:

- Boolean `true` — no longer accepted as a legacy shorthand
- Expressions such as `${{ inputs.reason }}` — must be a static literal
- Strings shorter than 20 characters after trimming whitespace
To disable the agent sandbox, you **must** set `features.dangerously-disable-sandbox: true`. Missing, false, and non-boolean values are rejected by the compiler.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in the latest commit: ADR-38325 and ADR-29483 are now marked superseded and explicitly point to the restored non-strict boolean opt-out policy and removed codemod.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@gh-aw-bot

Copy link
Copy Markdown
Collaborator
pr-sous-chef

@copilot Please take the next forward-progress pass on this PR.

  • A fresh review on the current head still calls out two follow-ups: ensure the public CompileWorkflowData path cannot bypass strict-mode sandbox rejection, and reconcile the restored policy with the existing ADR/docs set.
  • Please address that review feedback on HEAD, refresh the branch state if needed, and run the pr-finisher skill before handing back to maintainers.
  • In your handoff, summarize exactly which strict-mode path and ADR/doc updates were fixed, and whether any remaining blocker is only routine CI or maintainer approval.

Generated by PR Sous Chef: https://github.com/github/gh-aw/actions/runs/33940432105

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • github.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "github.com"

See Network Configuration for more information.

Generated by 👨‍🍳 PR Sous Chef · pi · gpt54 · 69.5 AIC · ⌖ 8.75 AIC · ⊞ 8.9K ·
Comment /souschef to run again

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>

Copilot AI commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author
pr-sous-chef
```...

Implemented the strict-mode and ADR follow-ups in commit ?: CompileWorkflowData now applies effective strict-mode sandbox rejection with direct coverage, and ADR-38325/ADR-29483 are marked superseded with the restored policy. Local fmt, lint, unit, full test, and recompile validation pass; remaining CI checks require a maintainer re-trigger.

pr-sous-chef
```...

Correction: the implementation commit is 5357dff.

Copilot AI requested a review from gh-aw-bot September 5, 2026 03:26
@pelikhan
pelikhan merged commit 5de8068 into main Sep 5, 2026
34 checks passed
@pelikhan
pelikhan deleted the copilot/reverse-deprecation-sandbox-agent branch September 5, 2026 03:50
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.88.5

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.

4 participants