pub struct TaintRegistry { /* private fields */ }Expand description
Registry of tainted (sensitive) data values
Implementations§
Source§impl TaintRegistry
impl TaintRegistry
Sourcepub fn register(
&mut self,
value: &str,
rule_name: &str,
level: SensitivityLevel,
) -> TaintId
pub fn register( &mut self, value: &str, rule_name: &str, level: SensitivityLevel, ) -> TaintId
Register a sensitive value and auto-generate encoded variants
Sourcepub fn contains(&self, text: &str) -> bool
pub fn contains(&self, text: &str) -> bool
Check if a text contains any tainted value (exact match against all variants)
Sourcepub fn check_encoded(&self, text: &str) -> bool
pub fn check_encoded(&self, text: &str) -> bool
Check for encoded variants in text by decoding base64/hex/url segments
Sourcepub fn entry_count(&self) -> usize
pub fn entry_count(&self) -> usize
Get the number of tracked entries
Sourcepub fn get(&self, id: &TaintId) -> Option<&TaintEntry>
pub fn get(&self, id: &TaintId) -> Option<&TaintEntry>
Get a taint entry by ID
Sourcepub fn lookup(&self, value: &str) -> Option<TaintId>
pub fn lookup(&self, value: &str) -> Option<TaintId>
Find the taint ID for a given value or variant
Sourcepub fn entries_iter(&self) -> impl Iterator<Item = (&TaintId, &TaintEntry)>
pub fn entries_iter(&self) -> impl Iterator<Item = (&TaintId, &TaintEntry)>
Iterate over all entries
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TaintRegistry
impl RefUnwindSafe for TaintRegistry
impl Send for TaintRegistry
impl Sync for TaintRegistry
impl Unpin for TaintRegistry
impl UnsafeUnpin for TaintRegistry
impl UnwindSafe for TaintRegistry
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