module PassiveScanSeverity

Defined in:

passive_scan/severity.cr

Constant Summary

SEVERITY_LEVELS = {"critical" => 4, "high" => 3, "medium" => 2, "low" => 1}

Severity levels with their numeric values for comparison Higher numbers indicate more severe issues

Class Method Summary

Class Method Detail

def self.get_level(severity : String) : Int32 #

Get the numeric level for a severity string @param severity [String] The severity level @return [Int32] The numeric level, or 0 if unknown


[View source]
def self.meets_threshold?(actual_severity : String, min_severity : String) : Bool #

Check if a given severity meets the minimum threshold @param actual_severity [String] The actual severity of the finding @param min_severity [String] The minimum severity threshold @return [Bool] True if the actual severity meets or exceeds the threshold


[View source]
def self.valid?(severity : String) : Bool #

Check if a severity string is valid @param severity [String] The severity level to validate @return [Bool] True if the severity is valid


[View source]
def self.valid_levels : Array(String) #

Get all valid severity levels @return [Array(String)] Array of valid severity level strings


[View source]