Answer: You choose what the Codex Security SDK scans by setting the `target` option: pass an array of paths inside the repository to scan selected paths, use `DiffTarget.refs` to scan committed changes between two Git revisions, or use `DiffTarget.workingTree` to scan staged and unstaged changes against a base revision. The default target is the complete repository, and you can skip files or directories with `excludePaths`. Status: Confirmed Entry: tool/codex/features/choose-scan-target Revision: 2 Digest: sha256:9008a6e9fb1a6505 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:53:52Z Last changed: 2026-11-18T13:36:07Z (base default: — → HEAD) Last verified: 2026-11-20T13:42:24Z Next check: 2026-11-21T13:42:24Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of default target | complete repository | [1] | 2026-11-20 selected paths option | target: ["services/billing", "packages/auth"] | [1] | 2026-11-20 exclude paths option | excludePaths: ["examples/"] | [1] | 2026-11-20 committed changes target | DiffTarget.refs | [1] | 2026-11-20 working tree target | DiffTarget.workingTree | [1] | 2026-11-20 head default | HEAD | [1] | 2026-11-20 base default | HEAD | [1] | 2026-11-20 Sources: [1] OpenAI. "Codex Security TypeScript SDK". https://learn.chatgpt.com/docs/security/sdk.md Role: primary. Accessed: 2026-11-20T13:42:24Z Quote: "The default target is the complete repository." (Supports: default target) Quote: "target: ["services/billing", "packages/auth"]," (Supports: selected paths option) Quote: "set `excludePaths: ["examples/"]` in the scan" (Supports: exclude paths option) Quote: "Use `DiffTarget.refs` to scan committed changes between two locally available" (Supports: committed changes target) Quote: "Use `DiffTarget.workingTree` to scan staged and unstaged changes against a base" (Supports: working tree target) Quote: "The head defaults to `HEAD`." (Supports: head default) Quote: "The base defaults to `HEAD`." (Supports: base default) Snapshot SHA-256: e3edd6a6028564a55a3b57aa22f470079e659955017b0e8c18087940c6b27015 (captured 2026-11-17T14:07:44Z) 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-17T14:07:45Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:42:24Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:42:24Z Last attempt: 2026-11-20T13:42:24Z Notes and limitations: Extracted automatically from a single official source (section "Choose a scan target"). Related: https://latestn.com/tool/codex/features/cloud-without-repo-background Can I use Codex Cloud without a repository, and can it keep working while my computer is asleep? https://latestn.com/tool/codex/features/codex-customization-layers What customization layers does Codex support, such as skills, MCP, and subagents? https://latestn.com/tool/codex/features/codex-environment-types What is the difference between Local, Worktree, and Cloud Codex environments? https://latestn.com/tool/codex/commands-and-shortcuts/run-first-scan How do I run my first Codex Security CLI scan on a local repository? https://latestn.com/tool/codex/commands-and-shortcuts/use-token-with-codex-cli How do I use a Codex access token with Codex CLI? https://latestn.com/tool/codex/features/build-requirement-for-scanning Does a Daybreak Defense Factory project need to be built for scanning? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-18T13:36:07Z | changed | base default: — → HEAD | [1] 2026-11-18T13:36:07Z | changed | head default: — → HEAD | [1] 2026-11-18T13:36:07Z | changed | working tree target: — → DiffTarget.workingTree | [1] 2026-11-18T13:36:07Z | changed | committed changes target: — → DiffTarget.refs | [1] 2026-11-18T13:36:07Z | changed | exclude paths option: — → excludePaths: ["examples/"] | [1] 2026-11-18T13:36:07Z | changed | supported target types: repository, path, committed-diff, and working-tree targets → — | [1] 2026-11-18T13:36:07Z | changed | working tree option: DiffTarget.workingTree → — | [1] 2026-11-18T13:36:07Z | changed | committed changes option: DiffTarget.refs → — | [1] 2026-11-18T13:36:07Z | changed | default target: The default target is the complete repository. → complete repository | [1] 2026-11-13T03:53:52Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/codex/features/choose-scan-target/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/features/choose-scan-target POST: https://latestn.com/dispute/tool/codex/features/choose-scan-target with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/codex/features/choose-scan-target?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I choose which paths or changes the Codex Security SDK scans? Revision 2, last verified 2026-11-20T13:42:24Z. https://latestn.com/tool/codex/features/choose-scan-target (accessed 2026-11-21T09:54:46Z). @misc{LatestN_tool_codex_features_choose_scan_target_r2, title = {How do I choose which paths or changes the Codex Security SDK scans?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/codex/features/choose-scan-target}}, note = {Revision 2; digest sha256:9008a6e9fb1a6505; last verified 2026-11-20T13:42:24Z; accessed 2026-11-21T09:54:46Z} } 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/features/choose-scan-target