pub struct SecurityIssue {
pub issue_type: IssueType,
pub severity: Severity,
pub title: String,
pub description: String,
pub affected_component: Option<String>,
pub cve_id: Option<String>,
pub recommendation: Option<String>,
pub metadata: HashMap<String, String>,
}Expand description
A single security issue found during scanning
Fields§
§issue_type: IssueTypeIssue type
severity: SeveritySeverity level
title: StringIssue title
description: StringDetailed description
affected_component: Option<String>Affected component (dependency, resource, etc.)
cve_id: Option<String>CVE ID if applicable
recommendation: Option<String>Recommended fix
metadata: HashMap<String, String>Additional metadata
Implementations§
Source§impl SecurityIssue
impl SecurityIssue
Sourcepub fn new(
issue_type: IssueType,
severity: Severity,
title: String,
description: String,
) -> Self
pub fn new( issue_type: IssueType, severity: Severity, title: String, description: String, ) -> Self
Create a new security issue
Sourcepub fn with_affected_component(self, component: String) -> Self
pub fn with_affected_component(self, component: String) -> Self
Set affected component
Sourcepub fn with_cve_id(self, cve_id: String) -> Self
pub fn with_cve_id(self, cve_id: String) -> Self
Set CVE ID
Sourcepub fn with_recommendation(self, recommendation: String) -> Self
pub fn with_recommendation(self, recommendation: String) -> Self
Set recommendation
Sourcepub fn with_metadata(self, key: String, value: String) -> Self
pub fn with_metadata(self, key: String, value: String) -> Self
Add metadata
Trait Implementations§
Source§impl Clone for SecurityIssue
impl Clone for SecurityIssue
Source§fn clone(&self) -> SecurityIssue
fn clone(&self) -> SecurityIssue
Returns a duplicate of the value. Read more
1.0.0 · 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 SecurityIssue
impl Debug for SecurityIssue
Source§impl<'de> Deserialize<'de> for SecurityIssue
impl<'de> Deserialize<'de> for SecurityIssue
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 SecurityIssue
impl RefUnwindSafe for SecurityIssue
impl Send for SecurityIssue
impl Sync for SecurityIssue
impl Unpin for SecurityIssue
impl UnsafeUnpin for SecurityIssue
impl UnwindSafe for SecurityIssue
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> 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