OBLYTECH Logo
OBLYTECH Logo

Configuration Compliance Calculator Rules and Risk Scores

A calculator in Configuration Compliance sets starting values on a test result, usually the Risk Score. Calculators are checked in order and the first matching one applies. Inside each calculator, its own rules are checked the same way, so order and conditions decide which score a result receives.

How calculators decide which values to set

An imported finding arrives with several fields still empty. A calculator works those values out from the result’s own data. Each calculator carries a condition, and the first one whose condition is met is the one that applies. For the wider concept behind the configuration item that a result is matched to, see the CMDB class explainer.

Inside a calculator sits a list of calculator rules. Each rule has its own condition and an order number. When the calculator runs, the rules are tested from the lowest order upward, and the first match updates the field. Order matters in practice. A narrow rule for a high-stakes class of asset should sit above a broad rule that would otherwise catch the same results first.

Calculators can also set other fields on a test result, not only the Risk Score.

Remediation task rules are evaluated after CI matching, risk score calculation and assignment rules.

The Default Risk Calculator and the base severity values

The base system includes one calculator, called Default Risk Calculator, and its job is to set the base Risk Score on each test result. Out of the box, it holds rules that map each severity level, from None through Critical, to a value between 0 and 100.

The base rules also give an unknown severity a score of 100. In practice that pushes an unclassified finding up a queue. The base system assigns this value automatically.

The severity values can be adjusted, and new calculator rules can sit beside them. For how the resulting scores are used to order work, see how vulnerability prioritisation works.

Building a risk rule with weighted inputs

To make the risk score weigh more than severity alone, open the Default Risk Calculator, set its target field to Risk Score, and select New Risk Rule. The record that results is a specialised calculator rule. It works out the Risk Score from several values at once.

The two inputs included by default are Business Criticality and Criticality. Each input carries a weight that sets how much it counts toward the base score. From version 13.0 of the application, the criteria the default risk rule uses can be customised, not only the weights.

Element What it controls
Target field of Default Risk Calculator Must be set to Risk Score before a risk rule can be created from it
Risk rule inputs Business Criticality and Criticality by default; customisable from version 13.0
Weight on each input How much that input counts when the base Risk Score is set
Weightage percentage on each field value A figure from 0 to 100 for each value, for example each severity level

The weightage percentage is the finer control. Each value of a field can be given its own figure. In the worked example, a criticality weight of 50 combined with value weightages of 100 (Critical), 50 (High), 20 (Medium) and 0 (None) gives contributions of 50, 25, 10 and 0. A value’s weightage scales the input’s weight. Check how a proposed weighting moves a handful of known results before you apply it across an import.

A calculator rule can instead set its values with a script. Non-scripted rules generally place a smaller performance load on the instance, so start with a template and move to a script when the logic cannot be written as conditions and values.

When calculators run and how to reapply changes

Calculators run in three situations. The first is when a test result is created. The second is when the configuration item or configuration test linked to the result changes. The third is when someone uses the Calculate Risk Score related link on an existing result. That link appears once at least one calculator is enabled. From version 22.0 of Vulnerability Response, the Vulnerability Manager Workspace and the IT Remediation Workspace offer a Calculate Risk Score button on the record view as well.

Some changes recalculate the score without anyone asking. A change to the criticality value on an imported result triggers a fresh calculation. So does a configuration item moving from non-internet facing to internet facing.

Editing a rule does not, by itself, rewrite the scores already on existing results, because a rule edit is not one of the triggers above. After you change a calculator, use the Reapply Calculator button on its record to recalculate the results that meet its conditions. Large volumes take time, so plan the run for a quiet period. Use it as a test before relying on a change.

The steps for setting up a calculator are short:

  1. Open All > Configuration Compliance > Administration > Risk Calculators and select New.
  2. Enter a name and description, then submit. The calculator appears in the list.
  3. Open the calculator and select New to add a calculator rule.
  4. On the “When this condition is met” tab, build the conditions with the condition builder.
  5. On the “Set these values” tab, choose Template and pick the fields and values, or choose Script.
  6. Submit, then use Reapply Calculator to test the change against imported findings.

Creating or editing a calculator requires the sn_vulc.admin role.

Reading the change history on a test result

From version 14.13 of Configuration Compliance, each change to a risk score is written into the Notes section of the test result. The entry names the calculator group, the calculator, and the field values with their weightage and contribution. It ends with the final risk score. For a template-based rule, the calculator name carries the template details in brackets. A script-based rule carries its script details in the same way.

To check whether a given rule is template or script, open it, select the Advanced view check box, and read the Value type field.

Work notes are separate. The property sn_sec_cmn.risk_score_changes_add_worknotes controls whether score changes also post there; from version 15.2.1 it is inactive by default.

Risk rollup calculators for tasks and test configurations

Calculators set the score on a single test result. Rollup calculators work one level up. They summarise the test results beneath a configuration test or a remediation task and write the summary into that record’s Risk Score field. They are found under All > Configuration Compliance > Administration, as Risk Score Rollup Calculators.

Each rollup calculator has a name, a description, the table it applies to, and an Include deferral setting. That setting decides whether deferred test results count toward the rollup. The weights are set per input, and the defaults are shown below.

Rollup input Default weight What it measures
Maximum risk score 85 The highest score among the results considered
Average risk score 0 The average of the scores of the results considered
Count of test results 15 How many results are considered

Rollup calculators are scheduled jobs that run hourly. The defaults give the maximum score the largest share of the weight, and the count a smaller share. The default weights apply to remediation tasks in the same way: 85 percent of the score comes from the maximum risk score of the test results considered, and 15 percent from how many test results are counted. Its risk rating then reads on a 1 to 5 scale, from Critical (1) down to None (5). For how rolled-up scores feed the queue, see the remediation explainer.

Editing a rollup calculator needs the sn_vulc.admin role. Its values can also be edited as a script in the Advanced view. For the other pages in this section, see the Vulnerability Response hub.

Frequently asked questions

Which calculator runs when more than one matches?

The first one in order whose condition is met is the one applied. Inside a calculator, the same rule applies to its calculator rules. Set the order on purpose, so a narrow rule for a high-stakes asset does not sit below a broad rule that catches the same results first.

Why has a score not changed after I edited a calculator rule?

The triggers that run calculators are creation of a test result, a change to its linked configuration item or configuration test, and the Calculate Risk Score link. A rule edit is not among them. Use the Reapply Calculator button on the calculator record to refresh the results that meet its conditions, then read the Notes section for the change entry.

Do I need a script to build a calculator?

Usually not. Template rules choose fields and fixed values from lists, and they carry a smaller performance load than scripts. A script is for logic a template cannot express, and writing or changing one requires platform and application expertise.

How does a result get matched to a configuration item before it is scored?

Remediation task rules are evaluated after CI matching, risk score calculation and assignment rules, so matching comes before the scoring steps. The matching rules are explained on the CI lookup rules page.