pub struct CredentialFinding {
pub kind: CredentialKind,
pub offset: usize,
pub matched: String,
/* private fields */
}Expand description
A single detected credential finding.
offset is the byte offset in the original text where the pattern was found.
matched is the redacted label, e.g. [REDACTED:AwsAccessKey]. The raw
secret is never stored.
The end field is intentionally private; it is used by ScanResult::redact
to splice the original match without exposing raw length arithmetic to callers.
Fields§
§kind: CredentialKindCategory of the detected credential.
offset: usizeByte offset in the original text where the pattern begins.
matched: StringRedacted label replacing the secret, e.g. [REDACTED:AwsAccessKey].
Implementations§
Source§impl CredentialFinding
impl CredentialFinding
Sourcepub fn from_regex_match(offset: usize, end: usize) -> Self
pub fn from_regex_match(offset: usize, end: usize) -> Self
Construct a finding for a match produced by a policy-defined regex pattern.
Used by aa-gateway when custom data.sensitive_patterns regexes match.
The offset and end are byte positions returned by the regex engine.
Trait Implementations§
Source§impl Clone for CredentialFinding
impl Clone for CredentialFinding
Source§fn clone(&self) -> CredentialFinding
fn clone(&self) -> CredentialFinding
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CredentialFinding
impl Debug for CredentialFinding
impl Eq for CredentialFinding
Source§impl PartialEq for CredentialFinding
impl PartialEq for CredentialFinding
Source§fn eq(&self, other: &CredentialFinding) -> bool
fn eq(&self, other: &CredentialFinding) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CredentialFinding
Auto Trait Implementations§
impl Freeze for CredentialFinding
impl RefUnwindSafe for CredentialFinding
impl Send for CredentialFinding
impl Sync for CredentialFinding
impl Unpin for CredentialFinding
impl UnsafeUnpin for CredentialFinding
impl UnwindSafe for CredentialFinding
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