Restore safe defaults for Codex sandbox and execution checkout#59
Open
Restore safe defaults for Codex sandbox and execution checkout#59
Conversation
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.
Motivation
codex.sandboxwasdanger-full-accessandworkflows.build/ship/deliver.allowDirtydefaulted totrue, causing untrusted runs to get full host filesystem/network access and execute directly in the source checkout.Description
workspace-writeby updatingDEFAULT_CONFIG.codex.sandboxinsrc/config.ts.allowDirtytofalseforbuild,ship, anddeliverinsrc/config.tsso execution checkouts are isolated unless--allow-dirtyor explicit config is used.src/runtime-config.ts,src/commands/build.ts,src/commands/ship.ts,src/commands/deliver.ts, andsrc/inspector.tsso output reflects the neutral/default policy and--safesemantics.README.mdguidance and tests undertest/config.test.ts,test/build.test.ts, andtest/deliver.test.tsnow assert isolated checkouts andworkspace-writesandbox by default.Testing
npx vitest run test/config.test.ts -t "provides stable deliver GitHub defaults"and it passed.npx vitest run test/build.test.ts -t "uses an isolated checkout and workspace-write by default when sandbox and allowDirty are not configured"and it passed.npx vitest run test/deliver.test.ts -t "uses an isolated checkout and workspace-write by default when sandbox and allowDirty are not configured"and it passed.Codex Task