pub struct Finding {Show 17 fields
pub rule: String,
pub namespace: Namespace,
pub targets: Vec<Target>,
pub severity: Severity,
pub path: PathBuf,
pub line: usize,
pub column: usize,
pub span: Span,
pub message: String,
pub confidence: Confidence,
pub cwe: Option<u32>,
pub help: Option<String>,
pub exploit: Option<String>,
pub remediation: Option<String>,
pub edits: Vec<TextEdit>,
pub fix_safety: Option<FixSafety>,
pub source_hash: Option<String>,
}Expand description
One report from one rule.
Fields§
§rule: StringRule id, such as GB201.
namespace: NamespaceWhich family produced the rule.
targets: Vec<Target>The runtimes this finding applies to.
severity: Severity§path: PathBufPath relative to the project root.
line: usize1-based line of span.start. Zero when the finding is about the file as a whole.
column: usize1-based column of span.start. Zero when the finding is about the file as a whole.
span: Span§message: String§confidence: ConfidenceHow strongly the rule believes the finding.
cwe: Option<u32>The CWE this finding belongs to, when one applies.
help: Option<String>§exploit: Option<String>Exploit scenario, for reviewers and agents.
remediation: Option<String>Step-by-step remediation guidance.
edits: Vec<TextEdit>Machine-applicable edits. Empty means “suggestion only”.
fix_safety: Option<FixSafety>How safe the edits are. Absent means review-required.
source_hash: Option<String>Hash of the source the finding was produced from. Internal to --fix: it is
not part of the report schema.
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 Forget for Finding
impl Freeze for Findingwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Target>: Freeze,
PhantomData<TextEdit>: Freeze,
impl Move for Finding
impl RefUnwindSafe for Finding
impl Send for Findingwhere
RawVecInner: Send,
impl Sync for Findingwhere
RawVecInner: Sync,
impl Unpin for Finding
impl UnsafeUnpin for Findingwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Target>: UnsafeUnpin,
PhantomData<TextEdit>: UnsafeUnpin,
impl UnwindSafe for Findingwhere
RawVecInner: UnwindSafe,
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