RiskRanking-Severity

Impact of a finding, derived from the severity of the rule reporting it

Required inputs: IR

Adding this rule to the list of active RiskRanking actions creates a rank factor column in the Dashboard. The name of the list entry is shown as the column name.

Possible Messages

This rule has no predefined messages.

Options

The following places define options that affect this rule: Analysis-GlobalOptions

severity_scores

severity_scores

Type: dict[str, float]

Default:

{
   'High': 0.7,
   'Low': 0.3,
   'Medium': 0.5,
   'Unspecified': 0.5,
   'advisory': 0.3,
   'directive': 0.5,
   'disapplied': 0.1,
   'document': 0.2,
   'error': 0.9,
   'high': 0.9,
   'hint': 0.1,
   'instances': 0.1,
   'low': 0.3,
   'mandatory': 1.0,
   'medium': 0.6,
   'note': 0.2,
   'precondition': 0.8,
   'recommended': 0.3,
   'remark': 0.2,
   'required': 0.8,
   'unknown': 0.5,
   'warning': 0.6
}
The score of every severity, from 0.0 for a finding that does not matter to 1.0 for one that matters most.

The severities of the different coding standards form separate vocabularies, and all of them end up in this one map: an obligation level such as required says how binding a guideline is, a CERT severity such as high how serious the consequences are, and a CWE severity such as High how likely the code is to be exploitable. Adjust the scores to the standards the project is actually checked against.

Rules that do not state a severity report error, so scoring that value governs most of the rules that do not belong to a coding standard.

 

show_by_default

show_by_default : bool = False

Whether or not to show the column by default.
 

unknown_severity_score

unknown_severity_score : float | None = 0.5

The score of a severity that is not listed above, and of the issue kinds whose finding carries no severity: clones, cycles, dead entities and architecture violations. The severity configured for their rule does not reach the ranking, because only a style violation and a metric state one per finding. If unset, such issues get no value from this rule.