OBLYTECH Logo
OBLYTECH Logo

Build a Vulnerability Response CI lookup rule

A Vulnerability Response CI lookup rule matches host information from a third-party vulnerability import to the correct configuration item record. You build it in the CI Lookup Rules module by choosing a lookup method, naming the source and search fields, and setting its order. Lower order values are evaluated first.

What a CI lookup rule matches

The CI Lookup Rules module holds the rules that take host information from a third-party vulnerability integration and look for the matching record. The host data is compared against discovered items, configuration item classes that have not been matched yet, and the Configuration Management Database (CMDB). The match is what ties a scanned host to a CMDB record.

The attributes your integration sends are the starting point for each rule. The asset attribute is part of the payload that arrives from the scanner. Confirm the attribute names and the values for real hosts before you write a condition. The Discovered Items table holds payload examples you can use as a reference.

Planning the rule before you open the form

Sketch the rule on paper first. Note the scanner attribute it reads, the lookup method, the table or class it searches, and the existing rule you plan to deactivate once the new one proves itself. A short plan makes the order and Applies to decisions easier later.

Several checks belong in that plan:

  • Role: the person creating the rule needs the sn_vul.vulnerability_admin role.
  • Application type: confirm whether the rule serves Vulnerability Response, Application Vulnerability Response, or an integration that supports both.
  • Excluded classes: decide whether any CI classes should be skipped, using the ignore setting covered later on this page.
  • Test set: pick a small group of hosts whose correct CI records you already know.

For help planning this work, see ServiceNow implementation.

New to the module? Read the plain-language overview of Vulnerability Response first.

Creating the rule in the CI Lookup Rules form

  1. Go to All > Security Operations > CMDB > CI Lookup Rules.
  2. Select New.
  3. Enter a Name that describes what the rule matches.
  4. Choose a Lookup method: Script or Field matching.
  5. If you chose Script, choose a Type. If you chose Field matching, enter Search on table and Search on field.
  6. Enter the Order.
  7. Choose the Source, then the Source field.
  8. Build the Condition, which depends on the scanner attribute you identified during planning.
  9. Set Applies to.
  10. Select the Active check box when the rule should run.
  11. Select Submit.

The Source field accepts any field, but the platform treats its value as a string. Compare values as text when you write the condition.

Choosing between field matching and script lookup

Field matching for direct identifiers

Field matching searches the table named in Search on table, using the field named in Search on field. The search field can sit on the CI record or on a related record, such as a network adapter. Use it when the identifier already exists as a plain value, because the rule needs no custom code.

Script lookup for logic a field cannot express

Script lookups begin with a Type. Pre-built types cover common cases such as an IP address or a DNS name, and a custom script handles anything they do not. The form shows an editable sample script that matches the Type you chose. Put your logic inside the default function from the template and follow its comments.

The process function receives three parameters: rule, sourceValue, and sourcePayload. Split a complicated match into two rules with different order values if that makes each piece easier to check.

Order, Active, and Applies to: avoiding conflicts between rules

Rules with the lowest order are evaluated first. Assign order numbers with gaps, such as 10, 20, and 30, so a later rule can slot in without renumbering the set.

Editing a working rule in place makes it hard to roll back. Duplicate the rule, adjust the duplicate, and test it against your test set. Once the duplicate behaves as expected, clear Active on the original. Deleted rules cannot be recovered, so the deactivated original stays as a fallback. The habits that lead teams into trouble here are covered in common Vulnerability Response mistakes and how to avoid them.

Applies to has no value by default. Set it to Discovered Item for Vulnerability Response rules and to Discovered Application for Application Vulnerability Response rules. Leaving it blank on an integration that supports both applications, such as the Vulnerability Response Integration with Wiz, lets both background jobs apply changes to the same rules. That overlap can set the reapply flag incorrectly. After each job completes, the system resets the flag for the rules that job ran, so an explicit value keeps the two jobs apart.

Ignoring CI classes and filtering decommissioned CIs

Two system properties change which CIs the lookup run considers. To skip certain CI classes, such as load balancers in the cmdb_ci_lb class, set sn_sec_cmn.ignoreCIClass. To filter decommissioned configuration items out of Security Operations CMDB lookup runs, set sn_sec_cmn.filterOutDecommissionedCI to true, which is also its default value.

An excluded class will not be matched during the run. Enter the classes as a comma-separated list in the property’s Value field, and the list takes effect on the next import. If a rule returns nothing for one class, check the ignore property before you change the rule’s logic.

Worked example: layering a field rule and a fallback rule

Suppose a scanner sends a host name and an IP address with each finding, and your CMDB stores the IP address on network adapter records. Create a field matching rule that searches the adapter data for the IP address. Create a second rule that matches on host name, and give it a higher order value. Run both against the test set and check that hosts the first rule does not find reach the second rule.

Reapplying lookup rules to discovered applications

Reapplying a lookup rule updates existing CIs, meaning scanned applications and product models, on discovered application records. Use it after you change or add a rule, so existing records reflect the new logic.

  1. Go to the discovered applications table.
  2. Apply a filter that narrows the set, such as a single application name.
  3. Select the items you want, or leave the selection as the filter returns it.
  4. Select Reapply Lookup Rules.

The reapply option is disabled when no filter is applied, so filtering is a required step. Review the first results, then widen the filter. The reapply menu for existing discovered applications sits under All > Security Operations > CMDB > Lookup Rules.

Checks to run after a rule goes live

  • Confirm the rule appears in the CI Lookup Rules list with the order and Active state you planned.
  • Reapply the rule to a narrow filter and compare the matches with your test hosts.
  • Spot-check the scanner payload for several hosts and confirm the matched CI is the one you expect.
  • Look for duplicate or orphaned records after the run, and trace any you find back to the rule that produced them.
  • Record the rule name, order, lookup method, and Applies to value in your change notes.

When a rule matches fewer hosts than expected, work through the causes in order. Confirm the rule is active. Compare its order with the other rules, since an earlier rule may already claim the item. Check the Condition against a real payload value, including case and format. Then check the ignore and decommissioned properties for the class involved. This order tends to find the cause faster than rewriting the script.

For how these checks fit a larger rollout, see the implementation roadmap. For the wider habits that keep a program running cleanly, read Vulnerability Response best practices.

Questions about decommissioned CIs, auto-promotion, and lookup targets

Does Application Vulnerability Response close items for decommissioned CIs?

Starting with v25.0.3 of Application Vulnerability Response, a new auto-close rule named CI Decommissioned closes the vulnerable items and detections tied to decommissioned CIs. Confirm that the rule exists on your instance, since its behavior depends on the application version you run.

What happens if I reapply lookup rules while an integration is running?

The reapply action can return either a background job URL or an error message, and the error appears while the integration is running. Wait for the run to finish, then reapply the same filter.

Which setting decides whether discovered applications match to product models?

The sn_vul.use_product_model system property is set to true by default. Where the Value field on a CI lookup rule is true, the product model is the lookup target. Where it is false, the configuration item (scanned apps) is the target. To switch the property to configuration items, a user with the sn_vul.app_sec_manager role goes to All > System Properties > All, locates sn_vul.use_product_model, opens the record, sets the Type field to false, and selects Update.

After a switch, align the rules. Select Active on the rules that target Configuration item, then select Update. Clear Active on the rules that target Product model, then select Update.

What does auto-promoting CIs change?

The sn_sec_cmn.autoPromoteFields system property holds a JSON string. Editing that string lets CI lookup rules auto-promote Security Operations CMDB CIs to matching entries in the cmdb_ci table. The property is active by default, and its default pairs map dscy_switchport, cmdb_ci_network_adapter, and cmdb_ci_nic to cmdb_ci, and cmdb_ci_ip_address to nic. Keep the JSON valid before you save, and check a test record afterward to confirm the promoted CI carries the values you expected.