pub struct Finding {
pub url: String,
pub check: String,
pub title: String,
pub severity: Severity,
pub detail: String,
pub evidence: Option<String>,
pub remediation: Option<String>,
pub scanner: String,
pub timestamp: DateTime<Utc>,
pub metadata: Option<Value>,
}Expand description
A single security or informational observation produced by a scanner.
Fields§
§url: StringCanonical URL that was scanned.
check: StringMachine-readable slug identifying the check (e.g. "cors.wildcard").
title: StringShort, human-readable title.
severity: SeveritySeverity classification.
detail: StringFull description — what was found and why it matters.
evidence: Option<String>The raw evidence: header value, JSON snippet, etc.
None when no meaningful snippet is available.
remediation: Option<String>Concrete remediation advice.
scanner: StringWhich scanner produced this finding (e.g. "cors", "csp").
timestamp: DateTime<Utc>Wall-clock time when the finding was recorded (UTC).
metadata: Option<Value>Optional extra fields scanners may attach (request IDs, CVE refs, etc.).
Implementations§
Source§impl Finding
impl Finding
Sourcepub fn new(
url: impl Into<String>,
check: impl Into<String>,
title: impl Into<String>,
severity: Severity,
detail: impl Into<String>,
scanner: impl Into<String>,
) -> Self
pub fn new( url: impl Into<String>, check: impl Into<String>, title: impl Into<String>, severity: Severity, detail: impl Into<String>, scanner: impl Into<String>, ) -> Self
Convenience constructor — timestamp is set to Utc::now().
Sourcepub fn with_evidence(self, evidence: impl Into<String>) -> Self
pub fn with_evidence(self, evidence: impl Into<String>) -> Self
Builder: attach raw evidence.
Sourcepub fn with_remediation(self, rem: impl Into<String>) -> Self
pub fn with_remediation(self, rem: impl Into<String>) -> Self
Builder: attach remediation advice.
Sourcepub fn with_metadata(self, meta: Value) -> Self
pub fn with_metadata(self, meta: Value) -> Self
Builder: attach arbitrary JSON metadata.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Finding
impl<'de> Deserialize<'de> for Finding
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Finding
impl RefUnwindSafe for Finding
impl Send for Finding
impl Sync for Finding
impl Unpin for Finding
impl UnsafeUnpin for Finding
impl UnwindSafe for Finding
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