Browse documentation

Technical documentation / Reference

Security notes

Feature docs index ยท Repository README

Protect credentials and local data

Codex refreshes OAuth before applicable use, performs network exchange outside auth locks, and rejects stale/competing refresh writes. Provider generations survive logout. See Provider authentication.

MCP names must be mcp__<server>__<tool>, at most 64 UTF-8 bytes total. Both components must be non-empty ASCII letters, digits, _, or -, without __. Server ids cannot end in _; tool names may. See MCP tools.

Understand tool boundaries

bash/shell guardrails are not OS-level isolation. Sandbox hostile repositories or untrusted prompts separately. File containment checks also do not prevent every filesystem race; see Tools and safety.

web URL open accepts only public HTTP(S): no auth, custom headers, cookies, bodies, redirects, JavaScript, or local/private destinations. Downloads are capped at 512 KiB, cached text at 40,000 bytes, and redacted output at 48 KiB. Resolved private, loopback, link-local, unspecified, and multicast IPs are rejected before network access; validated DNS addresses are pinned. URL open needs no Exa key. read rejects HTTP(S) targets.

Non-Codex web search sends research queries to Exa and validates returned source URLs. Exa controls retrieval of search extracts; its DNS and redirects are not locally pinned. Direct URL open uses the protected local transport instead. Cached open makes no network requests.

ast_grep uses embedded native parsing, not a subprocess or external CLI, so it has no child-process environment profile.

Subprocess environment boundaries

The child processes below use explicit deny-by-default environment profiles instead of inheriting all ambient variables. Every profile excludes credential-shaped ambient variables. The ambient user shell is the intentional exception.

WorkloadEnvironment and invocation
Ambient user shell (bash / shell)On Unix, inherits the full ambient environment and invokes /bin/bash -lc. On Windows, it uses PowerShell (pwsh, then powershell.exe) with -NoProfile -NonInteractive -Command. It has no OS-level sandbox.
Sanitized hooksOn Unix, invokes /bin/bash --noprofile --norc -c. On Windows, it uses PowerShell (pwsh, then powershell.exe) with -NoProfile -NonInteractive -Command. Both use the Shell profile: PATH, HOME, USER, LOGNAME, SHELL, TMPDIR, LANG, and the exact locale list below, plus the Windows startup baseline on Windows.
LSPPATH only.
MCP stdioPATH plus the Windows startup baseline on Windows, then the explicit configured MCP env overlay.

For the Shell profile, the locale entries are exactly LC_CTYPE, LC_NUMERIC, LC_TIME, LC_COLLATE, LC_MONETARY, LC_MESSAGES, LC_PAPER, LC_NAME, LC_ADDRESS, LC_TELEPHONE, LC_MEASUREMENT, LC_IDENTIFICATION, and LC_ALL; no other LC_* variables are included. The Windows startup baseline is exactly ComSpec, PATHEXT, SystemRoot, and WINDIR, where the profile includes it. These are environment controls, not OS-level sandboxing.

Edit this page on GitHub โ†—