pub struct FunctionSummary {
pub function_name: String,
pub source_parameters: HashSet<usize>,
pub sink_parameters: HashSet<usize>,
pub propagation_rules: Vec<TaintPropagation>,
pub return_taint: ReturnTaint,
pub has_internal_vulnerability: bool,
}Expand description
Summary of a function’s taint behavior
Fields§
§function_name: StringFunction name
source_parameters: HashSet<usize>Which parameters can introduce taint (parameter index)
sink_parameters: HashSet<usize>Which parameters flow to sinks within this function
propagation_rules: Vec<TaintPropagation>Taint propagation rules
return_taint: ReturnTaintDoes the return value carry taint?
has_internal_vulnerability: boolDoes the function contain an internal vulnerability (source -> sink)?
Implementations§
Source§impl FunctionSummary
impl FunctionSummary
Sourcepub fn from_mir_function(
function: &MirFunction,
callee_summaries: &HashMap<String, FunctionSummary>,
closure_registry: Option<&ClosureRegistry>,
) -> Result<Self>
pub fn from_mir_function( function: &MirFunction, callee_summaries: &HashMap<String, FunctionSummary>, closure_registry: Option<&ClosureRegistry>, ) -> Result<Self>
Generate a summary for a function using intra-procedural analysis
pub fn to_dataflow_summary(&self) -> DataflowSummary
Trait Implementations§
Source§impl Clone for FunctionSummary
impl Clone for FunctionSummary
Source§fn clone(&self) -> FunctionSummary
fn clone(&self) -> FunctionSummary
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 moreAuto Trait Implementations§
impl Freeze for FunctionSummary
impl RefUnwindSafe for FunctionSummary
impl Send for FunctionSummary
impl Sync for FunctionSummary
impl Unpin for FunctionSummary
impl UnsafeUnpin for FunctionSummary
impl UnwindSafe for FunctionSummary
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