Repository navigation
Bind Guardian reviews to the action's target environment - #47630
Merged
copyberry[bot] merged 1 commit intoSep 23, 2026
Merged
copyberry[bot] merged 1 commit into
copyberry[bot] merged 1 commit into
Conversation
## Why Actions targeting a secondary environment could be reviewed with the primary environment's denied-read restrictions. Each review needs the permission context of the environment that owns the action, including when a Guardian session is reused across environments. ## What changed - Carry `environment_id` through environment-scoped approval requests and their planned-action JSON. - Select and label permission context using the target environment, explicitly stating when it has no denied-read paths or globs. - Reject reviews for unavailable target environments and reject environment IDs longer than 256 bytes before Guardian inference, while preserving manual approval routing for oversized IDs. ## Testing Add coverage for `exec_command`, `apply_patch`, and `request_permissions` reviews switching environments while preserving the existing review prefix. Extend tests for environment-specific restrictions, unavailable environments, action serialization, and the 256-byte ID boundary. GitOrigin-RevId: ad3292edddb1c6f5b180142c6857cba6f1308328
copyberry
Bot
force-pushed
the
copyberry/codex-internal-to-codex-oss/ad3292edddb1c6f5b180142c6857cba6f1308328
branch
from
September 23, 2026 19:03
f7f811f to
851d9e9
Compare
copyberry
Bot
deleted the
copyberry/codex-internal-to-codex-oss/ad3292edddb1c6f5b180142c6857cba6f1308328
branch
September 23, 2026 19:03
This branch was successfully deployed
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Bind Guardian reviews to the action's target environment
Why
Actions targeting a secondary environment could be reviewed with the primary environment's denied-read restrictions. Each review needs the permission context of the environment that owns the action, including when a Guardian session is reused across environments.
What changed
environment_idthrough environment-scoped approval requests and their planned-action JSON.Testing
Add coverage for
exec_command,apply_patch, andrequest_permissionsreviews switching environments while preserving the existing review prefix. Extend tests for environment-specific restrictions, unavailable environments, action serialization, and the 256-byte ID boundary.