struct PassiveScan

Defined in:

models/passive_scan.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(yaml : YAML::Any) #

[View source]

Instance Method Detail

def category : String #

[View source]
def category=(category : String) #

[View source]
def id : String #

[View source]
def id=(id : String) #

[View source]
def info : Info #

[View source]
def info=(info : Info) #

[View source]
def matchers : Array(Matcher) #

[View source]
def matchers=(matchers : Array(Matcher)) #

[View source]
def matchers_condition : String #

[View source]
def matchers_condition=(matchers_condition : String) #

[View source]
def techs : Array(YAML::Any) #

[View source]
def techs=(techs : Array(YAML::Any)) #

[View source]
def valid? #

A rule is usable when it has an id, a non-empty info name, and at least one matcher. The earlier @info != "" check compared an Info struct against a String, which is always true and therefore a no-op; the rewrite checks @info.name instead so rules with an empty name (effectively unusable for SARIF / human output) are dropped during load.


[View source]