Skip to main content

Dangerous

Trait Dangerous 

Source
pub trait Dangerous: Sealed + Sized {
    // Required methods
    fn bypass_approvals_and_sandbox(
        self,
        allow: &DangerousClient,
    ) -> Result<Self>;
    fn bypass_hook_trust(self, allow: &DangerousClient) -> Result<Self>;
}
Expand description

Bypassing codex’s safety controls, for the builders that support it.

Sealed: this exists to gate an existing capability, not to be implemented elsewhere.

Required Methods§

Source

fn bypass_approvals_and_sandbox(self, allow: &DangerousClient) -> Result<Self>

Disable every approval prompt and the sandbox (--dangerously-bypass-approvals-and-sandbox).

The model’s shell commands run with the permissions of the calling process, against the real filesystem, with nothing to contain a mistake.

§Errors

Error::DangerousNotAllowed if ALLOW_DANGEROUS_ENV is not set at the moment of the call.

Source

fn bypass_hook_trust(self, allow: &DangerousClient) -> Result<Self>

Let configured hooks run without the trust prompt (--dangerously-bypass-hook-trust).

§Errors

Error::DangerousNotAllowed if ALLOW_DANGEROUS_ENV is not set at the moment of the call.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§