CodexPro exposes a local workspace to an MCP client. Treat it like a developer tool with access to your source tree, not like a hosted SaaS app.
Security fixes target the latest published version only until the project reaches 1.0.0.
Please report security issues privately before opening a public issue. If the repository has GitHub private vulnerability reporting enabled, use that. Otherwise contact the maintainer listed by the project owner.
Do not include secrets, private repository contents, tunnel tokens, or .env values in reports.
CodexPro is not designed to bypass, avoid, pool, resell, or modify ChatGPT, Codex, OpenAI, or third-party model limits. Do not market, deploy, or configure it that way.
Each user should connect their own ChatGPT account, use only product surfaces available to that account, and follow the limits, safety rules, and terms for ChatGPT, Codex, OpenAI, and any third-party model provider they connect.
CodexPro can expose:
- file metadata and selected file contents from allowed workspaces
- git status and diffs
.ai-bridgeplanning files- optional shell command execution through the
bashtool, hidden when bash mode is off - optional write/edit capability depending on
CODEXPRO_WRITE_MODE, advertised only in workspace write mode - optional local handoff execution through
codexpro execute-handoff, run from the user's terminal only - optional local execute/review looping through
codexpro loop-handoff, run from the user's terminal only with a user-provided reviewer command and iteration limit
Review changes against these failure modes before release:
| Failure mode | Expected control |
|---|---|
| Public tunnel reachable without a secret | Public/non-loopback HTTP fails closed unless a CodexPro token is configured. |
| Raw CodexPro or Cloudflare token appears in UI, logs, docs, or package output | Tokens are redacted in profile/status output and tunnel tokens use local files for persistence. |
| ChatGPT can edit outside the intended repo | Allowed roots are explicit; path resolution rejects escapes, blocked globs, and symlink traversal. |
| ChatGPT can run arbitrary shell by default | Bash defaults to safe mode, can be disabled, and full mode is a trusted-local-only choice. |
| Handoff mode still exposes generic writes | Handoff/pro modes do not advertise generic write/edit; bounded handoff tools write .ai-bridge files only. |
| Local Codex history is treated as ChatGPT memory | Codex session access is opt-in metadata/read mode and never attaches to a live Codex app session. |
| Browser admin mutates live runtime unexpectedly | Admin profile changes apply on restart; active runtime policy stays stable for the current session. |
| Remote MCP tool runs Codex/OpenCode/Pi directly | Agent execution remains a user-started CLI/watch process on the local machine. |
| Autonomous loop drives ChatGPT Web or bypasses approvals | loop-handoff only runs local terminal commands over .ai-bridge files; it does not resume browser sessions, approve prompts, or expose a remote MCP executor. |
| Reviewer masks a failed external command | loop-handoff requires explicit reviewer verdict assignments and rejects reviewer PASS after failed executor, test, or reviewer commands unless the user opts into the supported executor/test override behavior. |
The main risks are:
- connecting an untrusted MCP client
- exposing the server through a public tunnel without auth
- running with
CODEXPRO_BASH_MODE=full - running with
CODEXPRO_WRITE_MODE=workspaceon an important repo - executing an untrusted
.ai-bridge/current-plan.mdor customexecute-handoff --command - running
loop-handoffwith an untrusted reviewer command or without a small--max-iters - adding overly broad allowed roots
- leaking a
codexpro_tokenor Cloudflare tunnel token - trusting a downloaded
cloudflaredbinary without understanding where it came from
Default daily mode:
codexpro start \
--root /path/to/repo \
--bash safe \
--tunnel cloudflareSafer planning-only mode:
codexpro start \
--root /path/to/repo \
--mode handoff \
--bash safe \
--tunnel cloudflareFor stable public hostnames, keep the CodexPro auth token stable but private:
codexpro start \
--root /path/to/repo \
--tunnel cloudflare-named \
--hostname codexpro.example.com \
--tunnel-name codexpro \
--token <long-random-token> \
--bash safe- Do not run public tunnels with
--no-auth. - Public tunnel mode and non-loopback binds fail closed if
CODEXPRO_HTTP_TOKENis missing. - Do not commit printed connector URLs that include
codexpro_token. - Do not commit Cloudflare tunnel tokens.
- Do not paste raw Cloudflare tunnel tokens into browser pages or screenshots. Use
--cloudflare-token-fileor the local page's Cloudflare token file field instead. - Use
--mode handofffor planning workflows where ChatGPT should not edit source files. Handoff mode does not advertise genericwrite/edittools. - Preview local handoff execution with
codexpro execute-handoff --dry-runbefore running an unfamiliar adapter or custom command. - Preview autonomous local loops with
codexpro loop-handoff --dry-run, keep--max-iterssmall, and prefer--require-human-confirmationuntil you trust the reviewer command. - Keep
execute-handofflocal. Do not wrap it in a remote MCP tool unless you add a stronger approval and sandbox story. - Keep
loop-handofflocal. Do not use it to automate ChatGPT Web, Codex approvals, account access, third-party Pro sites, quota limits, or product safety prompts. - Use default agent mode only with trusted ChatGPT sessions and repo-specific roots.
- Use
--no-bashwhen ChatGPT should never trigger shell commands in the workspace. - Use
--bash-session <id> --require-bash-sessionwhen bash should be enabled only for calls that explicitly target this local CodexPro terminal label. - Keep Codex session history access off unless needed.
--codex-sessions metadataonly lists local Codex JSONL metadata;--codex-sessions readallows bounded transcript reads. - Keep
CODEXPRO_CONTEXT_DIRas a workspace-relative hidden directory such as.ai-bridge; CodexPro rejects source, build, dependency, credential, and absolute context directories. - Use
--bash fullonly for trusted local repos. - Do not treat MCP session ids or bash session labels as Codex conversation ids. CodexPro does not execute inside a Codex app session.
- Prefer a repo-specific
--rootinstead of--allow-home. - Use
--no-install-cloudflared --cloudflared <path>if your organization requires a managed Cloudflare Tunnel binary.
For the one-command public tunnel flow, CodexPro can download the official Cloudflare cloudflared release into ~/.codexpro/bin on supported macOS, Windows, and Linux systems. It does not install a system service, does not use sudo/admin rights, and does not modify shell startup files.
Resolution order:
1. explicit --cloudflared path or CLOUDFLARED_BIN
2. cloudflared already available in PATH
3. ~/.codexpro/bin/cloudflared or cloudflared.exe
4. download official Cloudflare latest release unless --no-install-cloudflared is set
Use --install-cloudflared to refresh the local binary. Use --no-install-cloudflared to disable downloads.
CodexPro blocks common sensitive paths by default:
.envand.env.*.gitinternalsnode_modules- common private key names
- build/cache folders such as
dist,build,.next,coverage,.cache - symlinks that resolve outside the workspace or into blocked paths
These guards reduce risk. They are not an OS sandbox.