OBLYTECH Logo
OBLYTECH Logo

Work through configuration compliance risk score examples

A configuration compliance risk score example shows how ServiceNow turns a failed configuration test into a number. The default risk rule can be changed: you can add scanner criticality from Qualys or Tenable, weight business criticality by service, and add custom conditions on configuration items. The steps and arithmetic follow.

Plan the weights before you edit the rule

A rule with three or four criteria is hard to explain to a remediation owner unless you decide the ranking first. Write down which signals should move the score, which should count for more, and what a reader of the final number should conclude from it. Then set the weights to match that plan. Review the calculator rule options before you decide which criteria fit. Changing weights after the rule is in use is possible, but each change shifts scores that already exist, so getting the plan right on the first pass saves rework.

Prepare the risk rule for changes

The steps in this guide require the sn_vulc.admin role. Go to All > Configuration Compliance > Administration > Risk Calculators, then open the risk rule form. Clear the Active check box to deactivate the rule before you add or edit any criteria. Work through one criterion at a time, and click Submit after each one.

Add scanner criticality as a criterion

Scanners such as Qualys and Tenable supply their own risk scores for findings. Those scores are populated in the Criticality field on the sn_vulc_test table, and a risk rule can read that field directly. Customizing the criteria of the default risk rule starts with v13.0 of Configuration Compliance, so check your release before you look for the option.

Steps for source criticality

  1. Clear the Active check box on the risk rule.
  2. Click Add Criteria.
  3. From the Choose reference table list, select Test Result.
  4. From the Field list, select Test.Criticality.
  5. In the Weight field, enter an integer from 0 through 100.
  6. In the Define Value Weightages section, add the field values and assign a weightage percentage to each.
  7. Click Submit.

Enter the labels in Define Value Weightages exactly as the Criticality field stores them. The checks later in this guide cover whether they line up with the test results.

Weight business criticality by service

A configuration item often supports more than one business service, and those services do not necessarily carry the same criticality. The mapping between a CI and its services is stored in the Services [cmdb_ci_services] table. This criterion reads the service criticality through that mapping, so a failed test on a CI that supports a critical service can score higher than the same failure on a CI that supports a low-priority one, depending on the weights.

Steps for business criticality

  1. Open the risk rule form from the Calculator Rules section and clear the Active check box.
  2. Click Add Criteria.
  3. From the Choose reference table list, select Configuration Item Reference Table.
  4. From the Table list, select Service [cmdb_ci_service].
  5. From the Field list, select Business Criticality.
  6. In the Aggregation field, select Minimum or Maximum.
  7. In the Weight field, enter an integer from 0 through 100.
  8. In the Define Value Weightages section, add field values and assign weightages.
  9. Click Submit.

Minimum returns the service with the value 1 – Most critical when a CI supports several services. Maximum returns the service with the value 4 – Not critical. Choose Minimum when one critical service should lift the score. Choose Maximum when the score should reflect the least critical service the CI supports.

Add a custom condition for externally exposed CIs

Some CIs can be reached from outside your network and deserve more weight than internal ones. If your naming convention marks them, a custom condition can add that weight. The example in this area uses CI names that start with external.

Steps for a custom condition

  1. Open the risk rule form and clear the Active check box.
  2. Click Add Criteria.
  3. From the Choose reference table list, select Custom Conditions.
  4. From the Condition table list, select Configuration Item.
  5. In the Field Name field, enter CI Exposure.
  6. In the Weight field, enter an integer from 0 through 100.
  7. In the Condition field, select Name > starts with, and set the value to external.
  8. Click Submit.

The condition matches on the name of the CI, not on its network reach. A naming convention is a weak signal on its own, so treat a high score on one of these CIs as a reason to review it rather than as proof of exposure. Revisit the condition whenever the naming convention changes.

Work through a worked score calculation

Take one risk rule with two criteria, each weighted 50. The scanner criterion on Test.Criticality uses the example weightages Critical 100, High 70, Moderate 50, Low 30 and Minor 20. The business criticality criterion uses the service weightages 1 – Most critical 100, 2 – Somewhat critical 70, 3 – Less critical 20 and 4 – Not critical 30. These values are illustrative, and your own weightages will differ. The two weights add up to 100, so the result stays on the same 0 to 100 scale as the weightages.

Three test results show how the formula behaves:

  • Scanner value Critical and service value 3 – Less critical: (50 × 100 + 50 × 20) / 100 = 60.
  • Scanner value High and service value 2 – Somewhat critical: (50 × 70 + 50 × 70) / 100 = 70.
  • Scanner value Low and service value 1 – Most critical: (50 × 30 + 50 × 100) / 100 = 65.

The third result scores higher than the first, even though its scanner value is Low, because the top service criticality carries half of the total. Set the weights to match the ranking you want. When you change a weightage and reapply the calculator, scores for existing test results change to match, so record the current values before you edit.

For help planning this work, see ServiceNow implementation.

Check how scores roll up to remediation tasks

Test results roll up into a remediation task risk score, and the formula changed in v15.0 of Configuration Compliance. Before v15.0, the rollup takes the maximum test result score at 85 percent and adds the factor multiplied by 15. From that release onward, it takes the maximum score at 80 percent, the average score at 5 percent, and the factor multiplied by 15. Confirm which formula applies on your instance before you compare scores.

The factor depends on how many test results the task holds. It is 0.2 for fewer than 10 results, 0.4 for 10 to 99, 0.6 for 100 to 1000, and 0.8 for 1001 to 9999. The largest counts use a factor of 1. The average risk score has a default weight of 0, so it contributes nothing until you set a weight for it. From v15.0 onward, a passed test result keeps its risk score, which the product uses to show risk mitigated.

Compare the rollup with the remediation task process in Configuration Compliance before you change any weights, since weights feed directly into the task score.

Checks before you rely on the new score

Run these checks after you submit the criteria and before you select the Active check box again. Each one catches a different kind of error, and together they show whether the score tells the story you planned.

  • Confirm that the Criticality values on test results match the labels in your Define Value Weightages section.
  • Recalculate a handful of known test results by hand and compare the result with the stored score.
  • Check the Services [cmdb_ci_services] mapping for the CIs that feed the business criticality criterion.
  • Record the weightages you changed, so you can explain a shift in scores later.
  • Review the assignment rules for the groups that will receive the tasks, using the assignment rule setup steps.

Select the Active check box again after these checks pass. If a result needs to stay open for a reason outside the score, consider routing it through exception requests rather than changing the weights.

Questions about customized risk scores

Can a Qualys score and a Tenable score sit in the same rule?

Both scanners populate the Criticality field on the sn_vulc_test table, so a single criterion on Test.Criticality reads whichever scanner wrote the value. Check how each scanner labels its severities before you set the weightages, because a rule built around one scanner’s labels may leave the other scanner’s values without a weight.

What does a Default entry do in a weight breakdown?

The example weight breakdowns include a Default entry with its own weight. Confirm on your instance how an unlisted field value is scored before you depend on the default, since the example does not show how unlisted values are looked up.

Why does the rollup include an average risk score if its weight starts at zero?

The average risk score is an optional input to the remediation task rollup. Because its default weight is 0, it has no effect until you assign a weight. Assign one when the typical result in a task should count alongside the highest-scoring result.

How do I choose between scanner criticality and business criticality?

Use scanner criticality when the score should follow the severity the scanner reports. Use business criticality when it should follow the services a CI supports. A combined rule, as in the worked calculation above, lets the weights set the balance between the two.

Will a custom condition still match a CI after a rename?

The condition reads the name currently stored on the CI, so a rename changes whether the condition matches. Review the affected CIs after any change to names that start with external, and confirm the weights still reflect the exposure you intend.