Answer: Use `deny` for files or subtrees that Codex should not read, with exact paths for stable locations like `~/.ssh` or glob patterns for families of sensitive files. When a glob sits under `:workspace_roots`, Codex interprets it relative to each effective workspace root, e.g. `"**/*.env" = "deny"`. Status: Confirmed Entry: tool/codex/permissions-and-security/deny-reads-paths-globs Revision: 1 Digest: sha256:5e85441aed3ba48e (changes whenever the content changes) Timeline: Created: 2026-11-13T03:52:15Z Last changed: 2026-11-13T03:52:15Z Last verified: 2026-11-20T13:40:42Z Next check: 2026-11-21T13:40:42Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of deny rule | deny | [1] | 2026-11-20 exact path example | ~/.ssh | [1] | 2026-11-20 glob example | **/*.env | [1] | 2026-11-20 workspace roots key | :workspace_roots | [1] | 2026-11-20 glob scan depth setting | glob_scan_max_depth | [1] | 2026-11-20 minimum glob scan depth | 1 | [1] | 2026-11-20 Sources: [1] OpenAI. "Permissions". https://learn.chatgpt.com/docs/permissions.md Role: primary. Accessed: 2026-11-20T13:40:42Z Quote: "Use `deny` for files or subtrees that Codex should not read" (Supports: deny rule) Quote: "Exact paths work well for stable locations such as `~/.ssh`." (Supports: exact path example) Quote: ""**/*.env" = "deny"" (Supports: glob example) Quote: "When a glob sits under `:workspace_roots`, Codex interprets it relative to each effective workspace root." (Supports: workspace roots key) Quote: "Set `glob_scan_max_depth` when you use an unbounded pattern such as `"**/*.env" = "deny"`" (Supports: glob scan depth setting) Quote: "`glob_scan_max_depth` must be at least `1`." (Supports: minimum glob scan depth) Snapshot SHA-256: 1af24fb0126aba2d5eb43f8a1094bcf9e465e21c94ffeae78ba7dad874466318 (captured 2026-11-13T03:52:14Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-13T03:52:15Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:40:42Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:40:42Z Last attempt: 2026-11-20T13:40:42Z Notes and limitations: Extracted automatically from a single official source (section "Deny reads with exact paths or globs"). Related: https://latestn.com/tool/codex/permissions-and-security/domain-allowlist How do I restrict which domains Codex Cloud (Legacy) agents can access? https://latestn.com/tool/codex/permissions-and-security/edit-repository-threat-model How do I edit the threat model for a monitored repository in Codex? https://latestn.com/tool/codex/permissions-and-security/enable-disable-network-access How do I enable or disable network access for Codex? https://latestn.com/tool/codex/permissions-and-security/create-service-account-access-token How do I create an access token for a Codex service account? https://latestn.com/tool/codex/permissions-and-security/default-sandbox-approval-settings What are the default sandbox and approval settings for Codex? https://latestn.com/tool/codex/permissions-and-security/define-select-permission-profile How do I define and select a permission profile in Codex? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T03:52:15Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/codex/permissions-and-security/deny-reads-paths-globs/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/codex/permissions-and-security/deny-reads-paths-globs POST: https://latestn.com/dispute/tool/codex/permissions-and-security/deny-reads-paths-globs with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/codex/permissions-and-security/deny-reads-paths-globs?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I deny reads to specific paths or globs in a Codex permission profile? Revision 1, last verified 2026-11-20T13:40:42Z. https://latestn.com/tool/codex/permissions-and-security/deny-reads-paths-globs (accessed 2026-11-21T10:06:31Z). @misc{LatestN_tool_codex_permissions_and_security_deny_reads_paths_globs_r1, title = {How do I deny reads to specific paths or globs in a Codex permission profile?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/codex/permissions-and-security/deny-reads-paths-globs}}, note = {Revision 1; digest sha256:5e85441aed3ba48e; last verified 2026-11-20T13:40:42Z; accessed 2026-11-21T10:06:31Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/codex/permissions-and-security/deny-reads-paths-globs