pub struct AnalysisProfile {
pub profile: ProfileMeta,
pub sources: Vec<TaintSource>,
pub sinks: Vec<TaintSink>,
pub transforms: Vec<TaintTransform>,
pub sanitizers: Vec<TaintSanitizer>,
}Expand description
A complete analysis profile loaded from TOML.
Fields§
§profile: ProfileMetaProfile metadata.
sources: Vec<TaintSource>Taint sources — where untrusted data enters.
sinks: Vec<TaintSink>Dangerous sinks — where tainted data must not reach.
transforms: Vec<TaintTransform>Transforms — APIs that propagate (or don’t propagate) taint.
sanitizers: Vec<TaintSanitizer>Sanitizers — APIs that kill specific taint categories.
Implementations§
Source§impl AnalysisProfile
impl AnalysisProfile
Sourcepub fn merge(profiles: Vec<AnalysisProfile>) -> Result<Self, String>
pub fn merge(profiles: Vec<AnalysisProfile>) -> Result<Self, String>
Load and merge multiple profiles. Validates taint ID uniqueness.
Sourcepub fn is_sink(&self, api: &str) -> Option<&TaintSink>
pub fn is_sink(&self, api: &str) -> Option<&TaintSink>
Check if an API name is a declared sink.
Sourcepub fn is_source(&self, api: &str) -> Option<&TaintSource>
pub fn is_source(&self, api: &str) -> Option<&TaintSource>
Check if an API name is a declared source.
Sourcepub fn kills_taint(&self, api: &str, category: &str) -> bool
pub fn kills_taint(&self, api: &str, category: &str) -> bool
Check if an API kills taint for a given category.
Sourcepub fn rule_count(&self) -> usize
pub fn rule_count(&self) -> usize
Total number of rules across all categories.
Trait Implementations§
Source§impl Clone for AnalysisProfile
impl Clone for AnalysisProfile
Source§fn clone(&self) -> AnalysisProfile
fn clone(&self) -> AnalysisProfile
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AnalysisProfile
impl Debug for AnalysisProfile
Source§impl Default for AnalysisProfile
impl Default for AnalysisProfile
Source§fn default() -> AnalysisProfile
fn default() -> AnalysisProfile
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for AnalysisProfile
impl<'de> Deserialize<'de> for AnalysisProfile
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AnalysisProfile
impl RefUnwindSafe for AnalysisProfile
impl Send for AnalysisProfile
impl Sync for AnalysisProfile
impl Unpin for AnalysisProfile
impl UnsafeUnpin for AnalysisProfile
impl UnwindSafe for AnalysisProfile
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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