pub struct TaintTracker { /* private fields */ }Expand description
Tracks taint propagation across tool calls in a bout.
The tracker keeps a registry of tainted values and their labels. When data
flows from one move to another, propagate extends the chain so we can
trace the full path a tainted value took through the ring.
Implementations§
Source§impl TaintTracker
impl TaintTracker
Sourcepub fn taint(
&mut self,
value: &str,
source: TaintSource,
sensitivity: Sensitivity,
)
pub fn taint( &mut self, value: &str, source: TaintSource, sensitivity: Sensitivity, )
Register a value as tainted with the given source and sensitivity.
This marks the value as carrying sensitive data from the specified origin. Like marking a fighter’s gloves before a bout.
Sourcepub fn check_taint(&self, value: &str) -> Vec<&TaintLabel>
pub fn check_taint(&self, value: &str) -> Vec<&TaintLabel>
Check if a value (or any tainted substring) is tainted.
Returns all matching taint labels. Uses simple substring matching — if a tainted value appears anywhere inside the checked string, or if the checked string appears inside a tainted value, the taint is detected. No fancy footwork needed.
Sourcepub fn propagate(&mut self, from: &str, to: &str)
pub fn propagate(&mut self, from: &str, to: &str)
Propagate taint from one value to another.
When data flows from one move’s output to another move’s input, this copies all taint labels from the source to the destination, extending each label’s propagation chain. Like blood on the canvas spreading from one round to the next.
Trait Implementations§
Source§impl Clone for TaintTracker
impl Clone for TaintTracker
Source§fn clone(&self) -> TaintTracker
fn clone(&self) -> TaintTracker
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more