pub struct VerifiedFinding {
pub detector_id: String,
pub detector_name: String,
pub service: String,
pub severity: Severity,
pub credential_redacted: String,
pub location: MatchLocation,
pub verification: VerificationResult,
pub metadata: HashMap<String, String>,
pub additional_locations: Vec<MatchLocation>,
pub confidence: Option<f64>,
}Expand description
A finding after verification — the final output.
§Examples
use keyhog_core::{MatchLocation, Severity, VerificationResult, VerifiedFinding};
use std::collections::HashMap;
let finding = VerifiedFinding {
detector_id: "demo-token".into(),
detector_name: "Demo Token".into(),
service: "demo".into(),
severity: Severity::High,
credential_redacted: "demo_...2345".into(),
location: MatchLocation {
source: "filesystem".into(),
file_path: Some(".env".into()),
line: Some(1),
offset: 0,
commit: None,
author: None,
date: None,
},
verification: VerificationResult::Skipped,
metadata: HashMap::new(),
additional_locations: Vec::new(),
confidence: Some(0.9),
};
assert_eq!(finding.service, "demo");Fields§
§detector_id: StringStable detector identifier.
detector_name: StringHuman-readable detector name.
service: StringService namespace associated with the detector.
severity: SeverityDetector severity level.
credential_redacted: StringRedacted credential string suitable for output.
location: MatchLocationPrimary source location for the finding.
verification: VerificationResultVerification outcome for the credential.
metadata: HashMap<String, String>Extra metadata extracted from verification responses.
additional_locations: Vec<MatchLocation>Additional duplicate locations that resolved into the same finding.
confidence: Option<f64>Confidence score (0.0 - 1.0) combining entropy, keyword proximity, file type, etc.
Trait Implementations§
Source§impl Clone for VerifiedFinding
impl Clone for VerifiedFinding
Source§fn clone(&self) -> VerifiedFinding
fn clone(&self) -> VerifiedFinding
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 moreSource§impl Debug for VerifiedFinding
impl Debug for VerifiedFinding
Auto Trait Implementations§
impl Freeze for VerifiedFinding
impl RefUnwindSafe for VerifiedFinding
impl Send for VerifiedFinding
impl Sync for VerifiedFinding
impl Unpin for VerifiedFinding
impl UnsafeUnpin for VerifiedFinding
impl UnwindSafe for VerifiedFinding
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