core-agent-ide/codex-rs/execpolicy/src
zhao-oai fe7a3f0c2b
execpolicycheck command in codex cli (#7012)
adding execpolicycheck tool onto codex cli

this is useful for validating policies (can be multiple) against
commands.

it will also surface errors in policy syntax:
<img width="1150" height="281" alt="Screenshot 2025-11-19 at 12 46
21 PM"
src="https://github.com/user-attachments/assets/8f99b403-564c-4172-acc9-6574a8d13dc3"
/>

this PR also changes output format when there's no match in the CLI.
instead of returning the raw string `noMatch`, we return
`{"noMatch":{}}`

this PR is a rewrite of: https://github.com/openai/codex/pull/6932 (due
to the numerous merge conflicts present in the original PR)

---------

Co-authored-by: Michael Bolin <mbolin@openai.com>
2025-11-20 16:44:31 -05:00
..
decision.rs migrating execpolicy -> execpolicy-legacy and execpolicy2 -> execpolicy (#6956) 2025-11-19 19:14:10 -08:00
error.rs migrating execpolicy -> execpolicy-legacy and execpolicy2 -> execpolicy (#6956) 2025-11-19 19:14:10 -08:00
execpolicycheck.rs execpolicycheck command in codex cli (#7012) 2025-11-20 16:44:31 -05:00
lib.rs execpolicycheck command in codex cli (#7012) 2025-11-20 16:44:31 -05:00
main.rs execpolicycheck command in codex cli (#7012) 2025-11-20 16:44:31 -05:00
parser.rs migrating execpolicy -> execpolicy-legacy and execpolicy2 -> execpolicy (#6956) 2025-11-19 19:14:10 -08:00
policy.rs execpolicycheck command in codex cli (#7012) 2025-11-20 16:44:31 -05:00
rule.rs migrating execpolicy -> execpolicy-legacy and execpolicy2 -> execpolicy (#6956) 2025-11-19 19:14:10 -08:00