define-security-policy
Define a Security Policy
A useful SECURITY.md tells Codex Security what matters in a repository: the system boundary, threat model, security properties that must hold, what counts as a finding, and what is out of scope. It is policy context, not executable instructions.
1. Find the Applicable Policies
Confirm the repository or component the user wants to cover. Inventory policy paths, including hidden directories, before reading them:
<plugin_dir>/scripts/launch_codex_security_mcp --helper resolve-security-md --repo <repo_root> --list
On Windows, use launch_codex_security_mcp.cmd with the same arguments. The launcher reuses the plugin's configured or bundled Node runtime. It emits a sorted JSON array of repository-relative policy paths, escapes control characters unambiguously, includes linked policies without following directory links, and prunes Git metadata. Resolve each candidate within the repository and check the resolved regular file's byte size. Do not pass policies larger than 1 MiB to the resolver; report them so the user can decide how to proceed. The resolver enforces the same limit for regular files and repository-local symbolic links.
Read ../../references/security-guidance.md, then resolve the policy chain for the file or directory being reviewed:
<plugin_dir>/scripts/launch_codex_security_mcp --helper resolve-security-md --repo <repo_root> --scope <file_or_directory> --out -