pub struct ToolPattern {
pub tool_name: String,
pub pattern_type: String,
pub pattern: Regex,
pub severity: SecuritySeverity,
pub description: String,
pub public_safe: bool,
pub context_keywords: Vec<String>,
pub false_positive_keywords: Vec<String>,
}
Expand description
Tool-specific pattern (e.g., Firebase, Stripe, etc.)
Fields§
§tool_name: String
§pattern_type: String
§pattern: Regex
§severity: SecuritySeverity
§description: String
§public_safe: bool
§context_keywords: Vec<String>
§false_positive_keywords: Vec<String>
Implementations§
Source§impl ToolPattern
impl ToolPattern
Sourcepub fn assess_confidence(&self, file_content: &str, line_content: &str) -> f32
pub fn assess_confidence(&self, file_content: &str, line_content: &str) -> f32
Check if this pattern should be treated as a high-confidence match given the context
Sourcepub fn effective_severity(&self) -> SecuritySeverity
pub fn effective_severity(&self) -> SecuritySeverity
Get severity adjusted for public safety
Trait Implementations§
Source§impl Clone for ToolPattern
impl Clone for ToolPattern
Source§fn clone(&self) -> ToolPattern
fn clone(&self) -> ToolPattern
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 ToolPattern
impl RefUnwindSafe for ToolPattern
impl Send for ToolPattern
impl Sync for ToolPattern
impl Unpin for ToolPattern
impl UnwindSafe for ToolPattern
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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