pub struct SastFinding {Show 14 fields
pub rule_id: String,
pub severity: Severity,
pub message: String,
pub file_path: PathBuf,
pub line: usize,
pub column: Option<usize>,
pub end_line: Option<usize>,
pub end_column: Option<usize>,
pub code_snippet: Option<String>,
pub fix_suggestion: Option<String>,
pub category: String,
pub cwe_ids: Vec<String>,
pub source: String,
pub language: String,
}Expand description
A security finding from SAST (Static Application Security Testing) analysis.
Unlike Vulnerability which represents dependency/supply-chain issues,
SastFinding represents security issues found directly in source code.
Fields§
§rule_id: StringRule identifier (e.g., “python.lang.security.audit.exec-detected”)
severity: SeveritySeverity level
message: StringHuman-readable description of the issue
file_path: PathBufSource file path
line: usizeLine number (1-based)
column: Option<usize>Column number (1-based, optional)
end_line: Option<usize>End line number (optional)
end_column: Option<usize>End column number (optional)
code_snippet: Option<String>Code snippet showing the problematic code
fix_suggestion: Option<String>Suggested fix or remediation
category: StringCategory (e.g., “injection”, “crypto”, “auth”)
cwe_ids: Vec<String>CWE identifiers (e.g., [“CWE-89”, “CWE-564”])
source: StringSource tool name (e.g., “opengrep”, “bandit”, “gosec”)
language: StringProgramming language (e.g., “python”, “go”, “c”)
Implementations§
Source§impl SastFinding
impl SastFinding
Trait Implementations§
Source§impl Clone for SastFinding
impl Clone for SastFinding
Source§fn clone(&self) -> SastFinding
fn clone(&self) -> SastFinding
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 SastFinding
impl Debug for SastFinding
Source§impl<'de> Deserialize<'de> for SastFinding
impl<'de> Deserialize<'de> for SastFinding
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 SastFinding
impl RefUnwindSafe for SastFinding
impl Send for SastFinding
impl Sync for SastFinding
impl Unpin for SastFinding
impl UnsafeUnpin for SastFinding
impl UnwindSafe for SastFinding
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