pub struct TaintTracker {
pub tainted: HashSet<String>,
pub taint_roots: HashMap<String, String>,
pub sanitized_roots: HashSet<String>,
pub sources: HashMap<String, String>,
}Expand description
Simple taint tracker for dataflow analysis
Fields§
§tainted: HashSet<String>§taint_roots: HashMap<String, String>§sanitized_roots: HashSet<String>§sources: HashMap<String, String>Implementations§
Source§impl TaintTracker
impl TaintTracker
pub fn mark_source(&mut self, var: &str, origin: &str)
pub fn mark_alias(&mut self, dest: &str, source: &str)
pub fn find_tainted_in_line(&self, line: &str) -> Option<String>
pub fn is_sanitized(&self, var: &str) -> bool
pub fn sanitize_root(&mut self, root: &str)
Trait Implementations§
Source§impl Default for TaintTracker
impl Default for TaintTracker
Source§fn default() -> TaintTracker
fn default() -> TaintTracker
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TaintTracker
impl RefUnwindSafe for TaintTracker
impl Send for TaintTracker
impl Sync for TaintTracker
impl Unpin for TaintTracker
impl UnsafeUnpin for TaintTracker
impl UnwindSafe for TaintTracker
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more