feat: support base_permission_profile :danger-full-access via default_permissions#2292
Merged
Merged
Conversation
…_permissions Codex rejects extends = ":danger-full-access" but allows selecting the built-in directly via default_permissions. The override now accepts the third built-in: when set, rulesync emits default_permissions = ":danger-full-access", skips the managed [permissions.rulesync] profile entirely (there is no sandbox for filesystem/network rules to refine — canonical read/edit/write/webfetch rules are ignored with a warning), prunes a stale managed profile from a previous generate while preserving hand-written sibling profiles, and round-trips the baseline from the top-level default_permissions key on import. The extendable-baseline set stays [:read-only, :workspace] via the new CODEX_EXTENDABLE_BASELINE_PROFILES constant. Closes #2282 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Review follow-ups: the danger-mode branch no longer prunes the managed [permissions.rulesync] profile silently (hand-written keys such as network.unix_sockets live there per the FAQ), the ignored-categories warning now covers every non-bash category instead of a fixed list, and no empty [permissions] header is left behind when no sibling profiles exist (undefined deletes the owned key). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Owner
Author
|
@dyoshikawa Thank you! |
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.
Summary
Codex CLI ships three built-in permission profiles, but its config loader rejects
extends = ":danger-full-access", so rulesync accepted only the two extendable baselines — leaving no way to express "run Codex with full access" through the canonical model. Codex CAN select the built-in directly, though:default_permissions = ":danger-full-access"is valid at the top level (verified against the Codex permissions docs: "It must match a profile under[permissions]or a built-in", whileextends"cannot extend:danger-full-access").Changes
codexcli.base_permission_profilenow accepts":danger-full-access". The extendable-baseline set stays[":read-only", ":workspace"]via the newCODEX_EXTENDABLE_BASELINE_PROFILESconstant (still the single source for the import-sideextendscheck).:danger-full-accessis selected, generation emitsdefault_permissions = ":danger-full-access"and skips the managed[permissions.rulesync]profile entirely — with the sandbox removed there is nothing for filesystem/network rules to refine, so canonicalread/edit/write/webfetchrules are ignored for Codex CLI with a warning. A stale managed profile from a previous generate is pruned; hand-written sibling profiles are preserved. The othercodexclioverride keys (approval_policyetc.) keep flowing throughcomputeCodexcliOverridePatchunchanged.config.tomlwithdefault_permissions = ":danger-full-access"(no managed profile) round-trips intocodexcli.base_permission_profile: ":danger-full-access"from the top-level key, complementing the existingextends-based derivation.:danger-full-accessis now a valid override value.base_permission_profilesections indocs/reference/file-formats.mddescribe the direct-selection mode (synced toskills/rulesync/).Closes #2282
🤖 Generated with Claude Code