pub struct RuleSuppressor { /* private fields */ }Expand description
Parsed .keyhogignore.toml - a list of [[suppress]] rules,
each compiled into a RuleFormula.
Implementations§
Source§impl RuleSuppressor
impl RuleSuppressor
Sourcepub fn matches(&self, finding: &VerifiedFinding) -> bool
pub fn matches(&self, finding: &VerifiedFinding) -> bool
true when at least one rule matches and the finding should
be dropped. Empty suppressor → always false (no
suppressions, which matches Self::empty()’s contract).
Sourcepub fn matches_raw_match(&self, matched: &RawMatch) -> bool
pub fn matches_raw_match(&self, matched: &RawMatch) -> bool
Same predicate as Self::matches for a pre-verify RawMatch.
Used by keyhog watch, which filters before building VerifiedFinding.
Sourcepub fn matches_identity(
&self,
detector_id: &str,
service: &str,
severity: Severity,
file_path: Option<&str>,
credential_hash: &CredentialHash,
) -> bool
pub fn matches_identity( &self, detector_id: &str, service: &str, severity: Severity, file_path: Option<&str>, credential_hash: &CredentialHash, ) -> bool
Shared rule evaluation over the identity fields every suppress surface has (detector, service, severity, path, credential hash).
Trait Implementations§
Source§impl Debug for RuleSuppressor
impl Debug for RuleSuppressor
Source§impl Default for RuleSuppressor
impl Default for RuleSuppressor
Source§fn default() -> RuleSuppressor
fn default() -> RuleSuppressor
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for RuleSuppressor
impl !UnwindSafe for RuleSuppressor
impl Freeze for RuleSuppressor
impl Send for RuleSuppressor
impl Sync for RuleSuppressor
impl Unpin for RuleSuppressor
impl UnsafeUnpin for RuleSuppressor
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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