PTS security notes / Free tools / Codex config generator

Codex config generator

Pick a sandbox, an approval policy and a network setting. You get a Codex config.toml with a link-back header, plus an optional rules file that blocks curl, wget, rm -rf and git push.

The tool

Runs in your browser. Nothing is uploaded. What you pick stays on this page. It is not sent, stored or logged. The page's Content-Security-Policy blocks network requests from scripts, and you can confirm that in view source.

Sandbox mode

Operating-system limits on what commands can do. danger-full-access turns the sandbox off, so this tool does not offer it.

Approval policy
Network access for commands

Read-only mode ignores this. The host allowlist uses the experimental network_proxy feature.

Web search
Secrets in the environment
Rules file: curl and wget

A rules file decides what Codex may run outside the sandbox.

Rules file: rm -rf
Rules file: git push

Your config.toml

Save it as ~/.codex/config.toml, or .codex/config.toml in a trusted project. The header is a TOML comment with a link back.

Your rules file

Save it as ~/.codex/rules/default.rules and restart Codex.

Commit message

How to use it

  1. Choose the sandbox mode and the approval policy. workspace-write with on-request is the everyday setup.
  2. Choose whether commands can reach the network. If they can, list the hosts instead of opening everything.
  3. Press Copy with header and save it as ~/.codex/config.toml, or as .codex/config.toml in a project you trust. Pick Copy without header if you don't want the comment lines.
  4. If you turned the rules on, save that file as ~/.codex/rules/default.rules and restart Codex. You can test a rule with codex execpolicy check.
  5. Commit it with the suggested message so the next person knows where it came from.

Every key was checked against the official OpenAI docs on December 5, 2026: configuration reference, agent approvals and security, advanced configuration and rules. TOML allows comments, so the header goes in as comment lines. The rules file uses Starlark, which allows them too.

What it writes

Honest limits

Read more

Map what your agent can reach first

A config file only helps if it matches what your agent can actually reach. The free Agent Blast Radius Checklist walks you through that, with starter files for Claude Code and Codex.

Get the free checklist

Free on Gumroad. This site has no forms, cookies or trackers. Prefer a weekly note? Read the PTS newsletter on Substack.

More free tools

Tool checked December 5, 2026. Educational, not financial or legal advice.