pub struct Finding {
pub id: String,
pub rule_id: String,
pub message: String,
pub severity: Severity,
pub location: SourceLocation,
pub language: Language,
pub snippet: Option<String>,
pub suggestion: Option<String>,
pub confidence: Confidence,
pub category: FindingCategory,
pub fingerprint: Option<String>,
pub properties: Option<HashMap<String, Value>>,
}Expand description
A security or code quality finding
Fields§
§id: String§rule_id: String§message: String§severity: Severity§location: SourceLocation§language: Language§snippet: Option<String>§suggestion: Option<String>§confidence: ConfidenceConfidence level (how certain we are this is a real issue)
category: FindingCategoryCategory of finding (security, quality, performance, style)
fingerprint: Option<String>Stable fingerprint for baseline comparison (sha256 hash)
properties: Option<HashMap<String, Value>>Additional properties (e.g., import_hits, import_files_sample for OSV findings)
Implementations§
Source§impl Finding
impl Finding
Sourcepub fn compute_fingerprint(&mut self)
pub fn compute_fingerprint(&mut self)
Compute a stable fingerprint for this finding Based on: rule_id + relative path + normalized snippet
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 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