OBLYTECH Logo
OBLYTECH Logo

Calculate risk for application vulnerabilities automatically

Application Vulnerability Response calculates risk for application vulnerable items (AVIs) automatically through vulnerability calculators. Each calculator has a condition, and the first matching calculator is used. The base system includes a Basic Risk Calculator, enabled by default, and an Advanced Risk Calculator, inactive by default.

Calculators run when AVIs are created or changed

Enabled calculators set their target fields each time an AVI is created, and again whenever the associated configuration item (CI) or vulnerability changes. Check each condition against the AVIs you expect it to cover, because a broad condition can catch items you meant for another calculator.

Each calculator holds its own list of calculator rules. Each rule has a condition and an Order value. The rules are checked in Order, and the first rule whose condition matches sets the Risk Score field on the AVI. Two overlapping rules can therefore produce different scores depending on which one sits first.

A target field can have one active calculator at a time. Both base calculators write to Risk Score, so the Advanced Risk Calculator cannot run alongside the Basic Risk Calculator. To switch, make the Basic Risk Calculator inactive first.

If the base application is not configured on your instance yet, start with configuring Application Vulnerability Response before you change any calculator.

The Basic Risk Calculator sets scores from severity

The Basic Risk Calculator calculates Risk Score from normalized vulnerability severity. Its base rules assign each severity level, from None to Critical, a value between 0 and 100. Items with Unknown Severity receive a risk score of 100 by default, so decide whether that fits how your team ranks unknown items before you rely on the result.

You can adjust those values, add new calculator rules, or add new risk rules. An AVI displays Source Severity rather than normalized severity. When a score looks out of line with the Source Severity on the record, check the calculator rules, because the score follows the normalized value.

Severity alone cannot separate an internet-facing system from an internal one that carries the same finding. A calculator with a condition on the CI’s internet facing status can make that distinction, because condition filters can use any criteria you need.

To see what a rule is based on, select the rule and then select the Advanced view check box. The Value type drop-down box shows whether the rule is a Template or a Script. A template rule updates the risk score according to the condition in the rule. A script rule lets you add or update the script. Non-scripted rules typically create less performance impact than scripted rules, so use a template wherever it can express the condition.

The Advanced Risk Calculator weighs three inputs

The Advanced Risk Calculator contains a specialized rule called Default Risk Rule. It calculates Risk Score from vulnerability severity, the OWASP top 10 and the SANS top 25. Each of those inputs carries a value and a weight, and the weight sets how much that input counts toward the final score.

You can change the values the Default Risk Rule uses, change the weight given to each one, and customize the criteria for the rule. Change one weight at a time, then review AVIs across several severity levels. That way you can tell which input moved each score.

Record the weights you chose and the date you changed them next to the rule. A score is easier to explain later when the weights behind it are written down, especially after the people who set them have moved on.

Switching the Advanced Risk Calculator on is a deliberate change, because its scores replace those of the Basic Risk Calculator. Tell the people who read those scores before you enable it.

Recalculation triggers and the Notes trail

Beyond creation and normal change events, the Risk Score is recalculated when a configuration item moves from non-internet facing to internet facing. It is also recalculated when a CVE or third-party entry (TPE) on a vulnerability item is linked to a CVE Known Exploit Vulnerability (KEV). Scores on items that match these triggers can move without anyone editing the AVI.

From version 23.0, each risk score update adds an entry to the Notes section that names the calculator group and the calculator. For template or script rules, the calculator name carries the rule details in brackets, so you can see the basis for the score. From version 25.0.3, the system property sn_sec_cmn.risk_score_changes_add_worknotes is inactive by default. When it is active, Work notes also record risk score changes, and those entries are written only when the score actually changes. Confirm the current property value on your instance and release.

Setting up calculator rules in the right order

Use this sequence when you add a calculator or change an existing one. For the build steps themselves, see building a vulnerability calculator step by step.

  1. List the criteria the score should reflect. Typical criteria are the business impact of the vulnerability, the class of the configuration item, and the age of the AVI. Condition filters can express any of them.
  2. Choose the calculator that owns Risk Score. Make any other calculator that targets Risk Score inactive before you activate the new one.
  3. Order the rules from the narrowest condition to the broadest. The first match wins, so a broad rule placed first hides the narrower rules below it.
  4. Check the Value type for each rule. Open the rule, select Advanced view, and use Script only when a template cannot express the condition.
  5. Test on a sample of AVIs. Pick items across severity levels and CI classes. For each one, check the Risk Score and the Notes entry that names the calculator group and calculator.
  6. Record the rule order and the reason for each condition. Someone reading a score later can then trace why it came out the way it did.

For help planning this work, see ServiceNow implementation.

Exception rules defer AVIs and sit outside the calculators

Calculators set the Risk Score. Exception rules do a different job: they defer AVIs for a period. An exception rule has a name, a Valid from date, an Execution order, a Valid to date, and a Deferred until date. The Reason, Assignment group and Additional information fields record why the deferral exists and who tracks it, and the Condition field selects the AVIs the rule covers. The State field is read-only and shows Draft.

The Execute on existing data option controls timing. When it is deactivated, the scheduled job Associate existing AVIs with Auto Exception Rule runs daily and starts with new data. When it is enabled, a scheduled job runs one time on existing data on the Valid from date. On the Deferred until date, the remediation task closes, the AVIs leave it and reopen, and group rules are reapplied to them. For the full rule setup, see exception rules for remediation tasks.

Questions about tuning calculators and exception rules

Should I adjust the Basic Risk values or build a new calculator?

Adjust the existing values when the severity scale already matches how your team ranks work and you only need different numbers. Build a new calculator when the score has to reflect something severity cannot show, such as the business impact of the vulnerability or the class of the CI. A new calculator usually replaces the base one for the same target field.

When does the Advanced Risk Calculator earn its place?

It earns its place when scoring needs to weigh the OWASP top 10 and SANS top 25 alongside severity. If your team ranks by severity alone, the Basic Risk Calculator often gives enough detail. The Advanced version adds weights to maintain, so enable it when someone will review those weights on a regular schedule.

Does an exception rule change the Risk Score?

An exception rule defers matching AVIs and is separate from the calculators. When a score looks wrong, start with the calculator rules, then check the rule’s Condition to confirm which AVIs it selected.

What does adding a new risk rating type involve?

Risk ratings are calculated from the Risk Score Weights table, which you reach through the filter navigator. The table name is sn_sec_cmn_risk_score_weight in versions below 30.0 and sn_sec_calculator_risk_score_weight in 30.0 and later. Adding an entry for an existing type is a table change. A new type also needs its label, a new style for the new risk score, and updates to the scripts and business rules that calculate the risk rating on each table.