pub struct Finding {Show 14 fields
pub id: String,
pub severity: Severity,
pub category: Category,
pub confidence: Confidence,
pub name: String,
pub location: Location,
pub code: String,
pub message: String,
pub recommendation: String,
pub fix_hint: Option<String>,
pub cwe_ids: Vec<String>,
pub rule_severity: Option<RuleSeverity>,
pub client: Option<String>,
pub context: Option<ContentContext>,
}Fields§
§id: String§severity: Severity§category: Category§confidence: Confidence§name: String§location: Location§code: String§message: String§recommendation: String§fix_hint: Option<String>§cwe_ids: Vec<String>CWE IDs associated with this finding
rule_severity: Option<RuleSeverity>Rule severity level (error/warn) - determines CI exit code behavior. This is assigned based on configuration, not the rule definition.
client: Option<String>AI client that owns this configuration (Claude, Cursor, Windsurf, VS Code). Set when scanning with –all-clients or –client options.
context: Option<ContentContext>Content context (documentation, code block, etc.) for false positive reduction.
Implementations§
Source§impl Finding
impl Finding
pub fn new(rule: &Rule, location: Location, code: String) -> Self
Sourcepub fn with_context(self, context: ContentContext) -> Self
pub fn with_context(self, context: ContentContext) -> Self
Set the content context for this finding
Sourcepub fn with_client(self, client: Option<String>) -> Self
pub fn with_client(self, client: Option<String>) -> Self
Set the client for this finding
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
Source§impl From<&Finding> for FindingSummary
impl From<&Finding> for FindingSummary
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