Thank you for your feedback.
Form temporarily unavailable. Please try again or contact to submit your comments.

Create domain-separated imports for the Qualys Host Detection Integration

Log in to subscribe to topics and get notified when content changes.

Create domain-separated imports for the Qualys Host Detection Integration

If you require imported host detection data to be in a specific domain, the user assigned to run the integrations must belong to that domain.

Before you begin

Role required: sn_qualys.admin

About this task

This set of tasks require coding or advanced ServiceNow expertise.

The import queues contain data attachments that the scheduled jobs (integrations) process. In a domain-separated environment, you must match the scheduled job with the correct import queue.


  1. Create a domain.
  2. For every domain you create, create a user and assign the user to that domain.
    Think of this user as a run_as placeholder for the domain in Qualys Host Detection Integration. It is the equivalent to the VR.System user in the global domain and must have the following roles: sn_vul_qualys.admin, import_admin, and sn_vul.vulnerability_write. This user needs access to data sources, transform maps, and vulnerability data.
    Note: Do not use this user for any other purpose.
  3. In each domain, create a scheduled job by copying Scheduled Vulnerablity Data Source Processor found under System Definition > Scheduled Jobs. Append the domain to the name to identify the scheduled job. Change the run_as user to the user you created in the previous step.
    Domain scheduled job form
  4. Note: Edit the following UI action so that the integration runs in the run_as user domain.
    Edit the Execute Now UI action in the Qualys Host Detection Integration to add this code block to the top of the file.
    //sys id below is of host detection integration
    if(current.sys_id == "5d9cf0daff540300c68c9f783894fa4d"){
    current.run_as = gs.getUserID
  5. Note: Edit the following script includes so that integration run in the run_as user domain.
    Edit the VulnerabilityIntegrationUtils script include methodaddIntegrationRun to add the highlighted code
    addIntegrationRun script include method
  6. Edit the VulnerabilityIntegrationUtils script include method addProcessRun to add the highlighted code.
    addProcessRun code
    addProcessRun script include method
  7. Edit the DataSourceVulnReportRefreshProcessor script include method _processFromDataSourceGroups to change this original code:
    Original _processFromDataSourcesGroups code
    Original _processFromDataSourceGroups original entry


    Edited _processFromDataSourcesGroups code
    Edited _processFromDataSourceGroups
  8. Edit the VulnerabilityDSAttachmentManager script include method, queueItem to add the following highlighted code blocks
    queueItem function
    _getNext function
    _processQueueEntry function
    processQueueEntry function
    At this point, you are ready for domain-separated host detection imports.