[][src]Struct super_analyzer_core::static_analysis::code::Rule

struct Rule {
    regex: Regex,
    permissions: Box<[Permission]>,
    forward_check: Option<String>,
    max_sdk: Option<u32>,
    whitelist: Box<[Regex]>,
    label: String,
    description: String,
    criticality: Criticality,
    include_file_regex: Option<Regex>,
    exclude_file_regex: Option<Regex>,
}

Vulnerability searching rule.

Fields

regex: Regexpermissions: Box<[Permission]>forward_check: Option<String>max_sdk: Option<u32>whitelist: Box<[Regex]>label: Stringdescription: Stringcriticality: Criticalityinclude_file_regex: Option<Regex>exclude_file_regex: Option<Regex>

Methods

impl Rule[src]

pub fn regex(&self) -> &Regex[src]

Gets the regex of the rule.

pub fn permissions(&self) -> Iter<Permission>[src]

Gets the permissions required for this rule to be checked.

pub fn forward_check(&self) -> Option<&String>[src]

Gets the potential forward check of the rule.

pub fn max_sdk(&self) -> Option<u32>[src]

Gets the maximum SDK affected by this vulnerability.

pub fn label(&self) -> &str[src]

Gets the label of the vulnerability.

pub fn description(&self) -> &str[src]

Gets the description of the vulnerability.

pub fn criticality(&self) -> Criticality[src]

Gets the criticality for the vulnerabilities found by the rule.

pub fn whitelist(&self) -> Iter<Regex>[src]

Gets the whitelist regex list.

pub fn has_to_check(&self, filename: &str) -> bool[src]

Returns if this rule has to be applied to the given filename

Trait Implementations

impl Debug for Rule[src]

impl<'de> Deserialize<'de> for Rule[src]

Auto Trait Implementations

impl Send for Rule

impl Sync for Rule

impl Unpin for Rule

impl UnwindSafe for Rule

impl !RefUnwindSafe for Rule

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> Same<T> for T[src]

type Output = T

Should always be Self