pub struct SecretScanCheck { /* private fields */ }Expand description
Denies when scan finds a credential in the payload, naming the detector,
the field and the offset, never the value (B-9, B-10).
Blocking: a secret in the payload must stop the action regardless of any
trust level. Needs no optional feature and no regex.
Implementations§
Source§impl SecretScanCheck
impl SecretScanCheck
Sourcepub const ID: &'static str = "secret-scan"
pub const ID: &'static str = "secret-scan"
The check id, as it appears in a decision’s check_ids.
Sourcepub fn new(rules: SecretRules) -> Self
pub fn new(rules: SecretRules) -> Self
A scan check with custom rules.
Sourcepub fn rules(&self) -> &SecretRules
pub fn rules(&self) -> &SecretRules
The rules this check scans with.
Trait Implementations§
Source§impl Check for SecretScanCheck
impl Check for SecretScanCheck
Source§fn evaluate(&self, ctx: &ActionContext) -> Option<Decision>
fn evaluate(&self, ctx: &ActionContext) -> Option<Decision>
Evaluate the context.
Some short-circuits the gate; None passes on.Source§fn config_fingerprint(&self) -> String
fn config_fingerprint(&self) -> String
A stable fingerprint of this check’s identity and parameters, folded
into the gate’s config hash. Defaults to
id; a check with
tunable parameters should override this to include them, so a recorded
decision can be bound to the exact gate configuration that produced it.Source§impl Clone for SecretScanCheck
impl Clone for SecretScanCheck
Source§impl Debug for SecretScanCheck
impl Debug for SecretScanCheck
Source§impl Default for SecretScanCheck
impl Default for SecretScanCheck
impl Eq for SecretScanCheck
Source§impl PartialEq for SecretScanCheck
impl PartialEq for SecretScanCheck
impl StructuralPartialEq for SecretScanCheck
Auto Trait Implementations§
impl Freeze for SecretScanCheck
impl RefUnwindSafe for SecretScanCheck
impl Send for SecretScanCheck
impl Sync for SecretScanCheck
impl Unpin for SecretScanCheck
impl UnsafeUnpin for SecretScanCheck
impl UnwindSafe for SecretScanCheck
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