fix: trust-gate project hooks and exec policies

Merged
VI
7mo ago
+684-123

Summary

  • trust-gate project .codex layers consistently, including repos that have .codex/hooks.json or .codex/execpolicy/*.rules but no .codex/config.toml
  • keep disabled project layers in the config stack so nested trusted project layers still resolve correctly, while preventing hooks and exec policies from loading until the project is trusted
  • update app-server/TUI onboarding copy to make the trust boundary explicit and add regressions for loader, hooks, exec-policy, and onboarding coverage

Security

Before this change, an untrusted repo could auto-load project hooks or exec policies from .codex/ as long as config.toml was absent. This makes trust the single gate for project-local config, hooks, and exec policies.

Stack

Test

  • cargo test -p codex-core without_config_toml