Integrating Acunetix 360 with ServiceNow

ServiceNow is an issue tracking system that helps organisations to manage issues. It also helps businesses prioritize and share tasks across departments. This means you can find precise indicators of problems to prevent issues and predict future issues.

This topic explains how to configure Acunetix 360 to send a detected vulnerability to ServiceNow.

For further information, see What Systems Does Acunetix 360 Integrate With?.

ServiceNow Fields

This table lists and explains the ServiceNow fields in the New ServiceNow Integration window.

Button/Section/Field

Description

Name

This is the name of the configuration that will be shown elsewhere.

Mandatory

This section contains fields that must be completed.

URL

This is the ServiceNow instance URL.

Username

This is the name of the user. If you are using a personal access token (see below), leave this field blank.

Password

This is the password that is used for the ServiceNow account.

Title Format

This is the string format that is used to create the vulnerability title.

Optional

This section contains optional fields.

Severity

This is the severity of the bug.

Category

This is the category in which to assign cases. The options are: Inquiry/Help, Software, Hardware, Network, and Database.

Caller ID

This is the ID of the person who reports the incident.

Due Days

This is the number of days from the date the issue was created to the date it’s due.

Assigned To ID

This is the ID of the user to whom the issue is assigned.

Custom Fields

This section contains user-defined custom fields.

New Custom Field

Click to create a new custom field.

Name

Enter a name for the new custom field.

Value

Enter a value for the new custom field.

Dropdown

Click the dropdown to change the input type. The options are:

  • Text
  • Password
  • Textarea
  • File upload

Create Sample Issue

Once all relevant fields have been configured, click to create a sample issue.

How to Integrate Acunetix 360 with ServiceNow
  1. Log in to Acunetix 360.
  2. From the main menu, click Integrations, then New Integration.

  1. From the Issue Tracking Systems section, click ServiceNow. The New ServiceNow Integration window is displayed.

  1. In the Name field, enter a name for the integration.
  2. In the Mandatory section, complete the connection details:
  • URL (ServiceNow Server)
  • Username (The name must be unique)
  • Password
  • Title Format
  1. In the Optional section, complete as required.
  2. Click Create Sample Issue to confirm that Acunetix 360 can connect to the configured system. A confirmation message is displayed to confirm that the sample issue has been successfully created.

  1. In the confirmation message, click the Issue number link to open the issue in your default browser.
  2. If the ServiceNow integration is not configured correctly, Acunetix 360 will correctly route descriptive error messages to you. Here is a sample error message.

  1. Click Save to save the integration.
How to Export Reported Vulnerabilities to Projects in ServiceNow

There are several ways to send issues to ServiceNow with Acunetix 360:

  • You must have Manage Issue permission.
  • From the main menu, click Issues, then All Issues. The Issues window is displayed.
  • Select one or more issues you want to send.
  • Click Send To, then ServiceNow.

  • A popup is displayed, with a link to the issue you have sent to ServiceNow. If there is an error, this information will be displayed instead.

  • You can send an issue from the Recent Scans window:
  • From the main menu, click Scans then Recent Scans.

  • Next to the relevant scan, click Report. The report is displayed.
  • Scroll down to the Technical Report section.
  • From the list of detected vulnerabilities, click to select an issue and display its details.

  • Click Send To, then ServiceNow

  • If you have previously submitted this vulnerability to ServiceNow, it will already be accessible. You cannot submit the same issue twice.
  • If you view opened problem logs in ServiceNow, they look like this.

How to Register an Acunetix 360 ServiceNow Integration Webhook
  1. From the main menu, click Integrations, then Manage Integrations. The Integrations window is displayed.
  2. Next to the relevant ServiceNow integration, click Edit. The Update ServiceNow Integration window is displayed.

if_Gnome-Dialog-Information-64_55568.png

Information

Resolved Status is a ServiceNow incident status to match when the webhook script has been added. They must be the same (see relevant step below).

  1. In the Webhook URL field, click Copy to clipboard ().
  2. From the main menu, click Notifications. The Notifications window is displayed.
  3. Next to the relevant Scan Completed event notifications, click Edit.
  4. Add the ServiceNow integration into the Integration Endpoints field.

  1. Open ServiceNow. In the Filter Navigation textbox search for 'business rules

  1. Under System Definition, click Business Rules. The Business Rules window is displayed.

  1. Click New.

  1. Select Table then Incident [incident].
  2. Enable the Advanced checkbox.
  3. In the When to Run tab, from the When dropdown, select after.
  4. Enable the Update checkbox.
  5. Click the Advanced tab.
  6. Modify the script below and fill in the script condition as illustrated:

Condition: current.incident_state.changesTo(6)

6 = Resolved

7 = Closed

if_Gnome-Dialog-Information-64_55568.png

Information

Note that the Resolved status in the ServiceNow integration must be matched with the script condition.

Script:

(function executeRule(current, previous /*null when async*/) {

    /*

     * Incident states

     * Resolved = 6

     * Closed = 7

     *

     * condition for sending incident

     * for resolved incidents use this

     * current.incident_state.changesTo(6)

     *

     * for closed incident use this:

     * current.incident_state.changesTo(7)

     */

   

    // change endpoint variable with your webhook url in servicenow integration

    // navigate to servicenow integration https://online.acunetix360.com/integrations/integrations/

    // paste your webhook url in the endpoint variable. It's a link similar to this: https://online.acunetix360.com/integrations/serviceNowWebhook?key=XXX&identifier=XXX

    var endpoint = ‘PASTE YOUR SERVICENOW WEBHOOK HERE’;

   

    gs.info("Incident close code = " + current.close_code);

    gs.info("Incident number = " + current.number + " and id = " + current.sys_id + " will be sent.");

    //add current incident number to endpoint query

    endpoint = endpoint + "&caseNumber=" + current.sys_id;

    try {

        var request = new sn_ws.RESTMessageV2();

        request.setHttpMethod('post');

        request.setEndpoint(endpoint);

        request.setRequestBody("{}");

        var response = request.executeAsync();

        response.waitForResponse(60);

        var httpResponseStatus = response.getStatusCode();

        gs.info("http response status_code: " + httpResponseStatus);

    } catch (ex) {

        var message = ex.getMessage();

        gs.info(message);

    }

})(current, previous);

  1. Save it
  2. In Acunetix 360, start a scan, after the scan is completed. Navigate to ServiceNow.
  3. If there are no incidents, check the filter in the incident page. It should be set to All.

  1. Update issue to a Resolved or Closed state which was chosen earlier.

  1. In Acunetix, from the main menu, click Scans, then Waiting for Retest. The Issues window is displayed, showing the issues waiting to be rescanned. The scanning process will begin soon, depending on the availability of the scanning agents.  

The Issue status will be changed to Fixed(Unconfirmed).

At this step, make sure that the Scan Completed event is defined for ServiceNow, otherwise it won’t update the incident.

  1. After the retest starts, if the issue is retested correctly and if vulnerability exists, it will be reopened by the system. If the vulnerability is fixed, no action will be taken.

if_Gnome-Dialog-Information-64_55568.png

Information

Note that in the issue's history, if you see a message, 'The issue could not be retested.', it won’t be reopened in ServiceNow.

 

« Back to the Acunetix Support Page