Security for Codex Development: Use a permission profile

Part 9 of 17

Use a permission profile

A permission profile is a named policy for what commands can read, write and reach. Extending the built-in :workspace profile keeps workspace editing, and adding deny entries makes .env files, ~/.ssh, ~/.aws and other credential folders unreadable to everything Codex runs (Codex docs).

It’s the only way to deny reads from your own config, so make it the default with default_permissions, keep approval_policy = "on-request", and don’t also set the older sandbox_mode keys, because Codex uses those instead when any loaded config sets them.

The audit’s fix section has a baseline config.toml with each setting explained.