This is a highly requested feature. https://github.com/openai/codex/blob/main/codex-rs/execpolicy/README.md explains the bones of what we have today, though this logic needs to be polished and wrapped up in a way that is easy for end-users to take advantage of.