feat(cli): draft SECURITY.md for owner review - #536
Conversation
…/codex/shared-codex-session
…/codex/security-policy-drafts
|
@codex review Please review the current head, |
|
Security review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
@codex review Please review the current head, |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
There was a problem hiding this comment.
💡 Codex Security Review
Here are some automated security review suggestions for this pull request.
Reviewed commit: 8c6eaccccc
Only the user who started this review can view the report in Codex.
ℹ️ About Codex security reviews in GitHub
This is an experimental Codex feature. Security reviews are triggered when:
- You comment "@codex security review"
- A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review
Once complete, Codex will leave suggestions, or a comment if no findings are found.
| [POLICY_PERMISSION_PROFILE]: { | ||
| filesystem: { | ||
| ":root": "read", | ||
| ":workspace_roots": "read", | ||
| ...(protectedCredentialHome === undefined |
There was a problem hiding this comment.
Security: Restrict policy reads to the selected repository
When an operator runs the new policy command on a malicious checkout, this profile gives Codex read access to the entire host filesystem. Repository-controlled policy text can reference an apparently relevant source file that is a symlink to /proc/self/environ, $HOME/.ssh/id_rsa, or another host file; opening it during the requested architecture inspection sends its contents into the inference turn. approvalPolicy: "never" and disabled tool networking do not block reads already allowed by the profile. Grant read access only to canonical repository/plugin/knowledge-base paths, and reject source symlinks resolving outside those roots.
Useful? React with 👍 / 👎.
Summary
Add
codex-security policyto draft a repository'sSECURITY.mdfrom its source code. It describes how the system works, builds a detailed threat model, and saves a shorter policy for its owner to review. It does not change repository files.This builds on #510, which shares the command helpers. This PR adds drafting and preview; #489 adds saved-draft review and application. #485 and #505 are already in
main.Changes
Testing
pnpm run typesandpnpm run format: passed.12345: 1,410 passed, 11 skipped, 0 failed in each run.pnpm packand the package checker: passed. Checked the installed SDK and CLI, bundled plugin and Codex executable, and a nested worker without a global Codex installation.Risk and rollout
Merge #510 first. This adds no npm dependencies and does not change saved scan results. The model has read-only file access, with network access, web search, apps, and MCP servers disabled. Preview checks the selected policy and its parent policies; regenerate after other relevant source changes. Generated decisions still need owner approval. Keep the detailed threat model and other draft files private until they have been reviewed for disclosure. This does not publish a package.
Public disclosure review
An automated review contains a report link that is visible only to its requester. That link and report are not reproduced here.