pub enum Defaults {
All(Verdict),
PerKind(BTreeMap<String, Verdict>),
}Expand description
Fallback verdicts when no rule matches: one verdict for everything, or a map
from action kind (shell, fs.read, fs.write, net, fetch,
web.search, tool.unknown, env.read, env.set, mcp, or "*") to a verdict; a fetch
without its own entry takes the net one. This is how “outbound network is
deny-by-default” is expressed, because deny rules are absolute and cannot
be punched through by allow rules (ADR-002).
Variants§
All(Verdict)
The same verdict for every kind.
PerKind(BTreeMap<String, Verdict>)
A verdict per kind name (net, fs.read, …), with * as the fallback.
Implementations§
Source§impl Defaults
impl Defaults
Sourcepub fn for_kind(&self, kind: Kind) -> (Verdict, String)
pub fn for_kind(&self, kind: Kind) -> (Verdict, String)
Verdict and synthetic rule id (default or default.<kind>) for a kind.
Sourcepub fn for_atom(&self, atom: &AtomicAction) -> (Verdict, String)
pub fn for_atom(&self, atom: &AtomicAction) -> (Verdict, String)
The default for an atom no rule matched: Self::for_kind, except that a
word that only looks like a host is no network evidence and gets
Self::unclassified (ADR-025).
Sourcepub fn unclassified(&self) -> Verdict
pub fn unclassified(&self) -> Verdict
What OpenMoat gives a call it cannot classify, or a word that only looks
like a host: defer under a catch-all ("*") of allow or defer, else
ask (ADR-025). Never allow, and never a deny nothing named.