pub struct TaintSettings {
pub protected_writes: Vec<String>,
pub metadata_tools: Vec<String>,
pub defined_servers: Vec<String>,
pub provenance: Option<bool>,
}Expand description
The taint: section. Absent in policies written before it existed.
Fields§
§protected_writes: Vec<String>Path globs whose writes need review once the session read untrusted content, in
addition to the built-in list, which a policy cannot shorten. No !
exclusions, for the same reason.
metadata_tools: Vec<String>MCP tools, by full name (mcp__<server>__<tool>), whose result is the
server’s own metadata rather than content an attacker writes, in
addition to the built-in list: their results do not taint the session,
and their output still feeds injected input (ADR-057).
defined_servers: Vec<String>MCP servers, by name, that an agent’s MCP configuration or OpenMoat’s
pins define. The built-in metadata tools are those of a server the
host provides itself (BUILTIN_METADATA_SERVER); one defined here
under that name is not it, and every tool of it taints the session.
The CLI adds the names it finds pinned; a policy may list more, which
can only make more results taint. metadata_tools still counts: a
person who lists a tool there trusts it by its full name.
provenance: Option<bool>File provenance (ADR-029): a file a session wrote after reading
untrusted content taints the sessions that later read or run it.
Absent means on; false turns it off.
Implementations§
Source§impl TaintSettings
impl TaintSettings
Sourcepub fn provenance_on(settings: Option<&Self>) -> bool
pub fn provenance_on(settings: Option<&Self>) -> bool
Whether file provenance is on under settings (the policy’s taint:
section, if any). On unless the section says provenance: false.