pub enum Severity {
Info,
Low,
Medium,
High,
Critical,
}Expand description
Severity of a security finding.
Ordered from least to most severe. Supports comparison:
Severity::Critical > Severity::High is true.
Variants§
Info
Informational — no security impact, useful context.
Low
Low — minor issue, unlikely to be exploitable alone.
Medium
Medium — real risk, exploitable under certain conditions.
High
High — serious vulnerability, likely exploitable.
Critical
Critical — immediate risk, trivially exploitable.
Implementations§
Source§impl Severity
impl Severity
Sourcepub fn from_str_loose(s: &str) -> Option<Self>
pub fn from_str_loose(s: &str) -> Option<Self>
Parse from a case-insensitive string.
Returns None for unrecognized values.
Sourcepub fn colored_label(&self) -> &'static str
pub fn colored_label(&self) -> &'static str
ANSI-colored label for terminal output.
Sourcepub fn sarif_level(&self) -> &'static str
pub fn sarif_level(&self) -> &'static str
SARIF level string.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Severity
impl<'de> Deserialize<'de> for Severity
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 Ord for Severity
impl Ord for Severity
Source§impl PartialOrd for Severity
impl PartialOrd for Severity
impl Copy for Severity
impl Eq for Severity
impl StructuralPartialEq for Severity
Auto Trait Implementations§
impl Freeze for Severity
impl RefUnwindSafe for Severity
impl Send for Severity
impl Sync for Severity
impl Unpin for Severity
impl UnsafeUnpin for Severity
impl UnwindSafe for Severity
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.