pub struct SecurityConfig {
pub trifecta: TrifectaPolicy,
pub block_private_ips: bool,
pub allowed_domains: Vec<String>,
pub blocked_domains: Vec<String>,
pub mark_untrusted_output: bool,
pub block_sends_after_private: bool,
}Expand description
Defenses against the lethal trifecta: private data, untrusted content, and a way to send data out. An agent holding all three can be turned into an exfiltration tool by instructions hidden in the content it reads — a calendar invite title, an email footer, a web page.
The mitigation is structural, not a filter: once both private data and untrusted content have entered a conversation, refuse to let it send.
Fields§
§trifecta: TrifectaPolicy§block_private_ips: boolRefuse HTTP requests to loopback, private, and link-local addresses.
Without this, http_fetch reaches your LAN and cloud metadata endpoints.
allowed_domains: Vec<String>If non-empty, HTTP requests may only go to these hosts (suffix match).
blocked_domains: Vec<String>Hosts that are always refused, checked before allowed_domains.
mark_untrusted_output: boolWrap third-party content in a marker telling the model to treat it as data rather than instructions. Weak on its own — defense in depth.
block_sends_after_private: boolBlock every outbound call once private data is in context, whether or not untrusted content has arrived.
This is a different control from trifecta, guarding a different
threat. The trifecta interlock stops an injection turning the agent
into an exfiltration tool; it deliberately allows sends that happen
before any third-party content exists, because nothing could have
influenced them yet. That still lets the agent put your private data
into a search query because you asked it to, or because it judged that
helpful — an ordinary privacy leak rather than an attack.
Turn this on when private data must not leave at all. It is restrictive: it makes “read my notes, then look something up” fail.
Trait Implementations§
Source§impl Clone for SecurityConfig
impl Clone for SecurityConfig
Source§fn clone(&self) -> SecurityConfig
fn clone(&self) -> SecurityConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more