create_vulnerable_item
Create a Vulnerable Item (sn_vul_vulnerable_item) with the vulnerability reference intact. A before business rule clears the vulnerability reference on REST inserts, which silently disables the "Link to Remediation Tasks" automation…
Instructions
Create a Vulnerable Item (sn_vul_vulnerable_item) with the vulnerability reference intact. A before business rule clears the vulnerability reference on REST inserts, which silently disables the "Link to Remediation Tasks" automation; this tool re-applies the reference via PATCH after insert and verifies it stuck. Requires both vulnerability and cmdb_ci so the remediation-task rule engine can group the item. ServiceNow regenerates short_description as " detected on " on insert, so a value passed here cannot be used to tag items or to select them later (e.g. in a remediation task rule condition) — use source instead; the result reports overwritten fields. [Write — requires WRITE_ENABLED=true]
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| state | No | State filter. Single value or comma-separated list. 1=Open, 2=Under Investigation, 10=Awaiting Implementation, 11=In Review, 12=Deferred, 101=Resolved, 3=Closed | |
| source | No | Detection source label (e.g. scanner name) | |
| cmdb_ci | Yes | 32-char sys_id of the affected CI | |
| assigned_to | No | Assignee sys_id | |
| description | No | Detailed description | |
| vulnerability | Yes | 32-char sys_id of the vulnerability entry (sn_vul_entry, e.g. an NVD entry) | |
| assignment_group | No | Assignment group sys_id | |
| short_description | No | Usually overwritten: the "Update short description" business rule sets it to "<vulnerability> detected on <CI>" on insert. Use `source` to tag test or imported items. |