Configure an Existing Project for the WhiteHat Jenkins Plugin

To configure an existing project, perform the following steps:

  1. Navigate to the Jenkins dashboard and select your existing project.

    jenkins plugin config project 1

  2. Click Configure.

    jenkins plugin config project 2

  3. Click Post-build Action.

    jenkins plugin config project 3

  4. Click the Add post-build action dropdown.

  5. Select WhiteHat Sentinel Plugin from the list.

    jenkins plugin config project 4

  6. If using your own Sentinel API Key, select Override Global Credentials.

    jenkins plugin config project 5

  7. Type the URL for your Sentinel server in the text field.

  8. Type in your API key to be used globally for the project. To find out how to generate an API key on Sentinel see Generating an API key.

  9. Click Test Connection to ensure that the credentials authenticate successfully.

  10. Select the site asset for which you want to run the Sentinel scan. You can initiate both static SAST and dynamic DAST scans from the Jenkins plugin.

    jenkins plugin config project 6

  11. Optionally, select an application asset to initiate a SAST scan. If you select both, then the appropriate scan type will run for the selected asset.

  12. Optionally, select Add New to add an additional asset.

  13. Add an Application name for the selected asset in the text field.

    jenkins plugin config project 7

  14. Select the code language from the Choose language drop down, or select Discover my language to automatically detect the provided language.

  15. Select the appropriate Appliance from the drop down.

  16. If you have selected a Sentinel source asset (application) above, select the revelevent codebase from the drop down. If you select a SAST asset, but do not select a codebase, Sentinel scans the application using whatever information exists in Sentinel. If you do not select either a DAST asset (site) or a SAST asset (application), no scan will be initiated. Scheduling a scan via the Jenkins plugin overrides any pre-configured schedule. To upload a codebase, perform the following steps:

    1. Type the Codebase name into the text field.

    2. Click Add.

    3. Click Done and the codebase will be available to select from the codebase dropdown.

  17. Optionally, if you have added more than one SAST asset, click Add New to add an additional codebase.

  18. Set the defaults for this post-build. To use the Jenkins build select Use Jenkins build.

    jenkins plugin config project 8

  19. Select the Archive radio button to archive your Jenkins workspace.

    1. Type a name for the archive in the Archive name field.

    2. Type in the extensions for excluded file types.

    3. Type in the extensions for included file types.

      If you specify excluded file types, all file types not listed will be included. If you specify included file types, all file types not listed will be excluded. These choices are mutually exclusive.
    4. To use an Ant Script, click Advanced and type the script in the Ant Script field.

  20. Select the Binary radio button to scan the binary files.

    jenkins plugin config project 9

    1. Type in the Binary file name for the binary file. Supported file types include .jar, .war, .ear, .dll, and .exe.

      You must accept the license before scanning binaries. See Enabling Binary Analysis in Adding a Code Base.
  21. Use the radio buttons to select the Build Destination. You can select your Jenkins server itself, your SFTP server, or your WhiteHat appliance.

    jenkins plugin config project 10

    You must have the IP address for the WhiteHat appliance, and it must be accessible from your Jenkins server.
    1. Type your Jenkins host URL in the text field.

  22. Select SFTP server to use this as your build destination.

    jenkins plugin config project 11

    1. Type the SFTP server URL in the text field.

    2. Type your SFTP username in the text field.

    3. Type your SFTP password in the text field.

    4. Type the SFTP folder path in the text field.

    5. Optionally, select the Delete archive after upload radio button.

  23. Select WhiteHat appliance to use this as your build destination.

    jenkins plugin config project 12

    1. Type the Appliance IP address.

    2. Optionally, select the Delete archive after upload radio button.

  24. Use this field to set a maximum size (in MB) for the file to be uploaded.

    jenkins plugin config project 13

  25. Select the Trigger scan now radio button to trigger a WhiteHat Sentinel scan of the asset.

  26. Optionally, click on the After the scan completes, fail to build if vulnerabilities exceed radio button. This is to set threshold values to fail the build if the number of vulnerabilities or the scan timeout exceed your preferred limits.

    jenkins plugin config project 14

    1. Open: Vulnerabilities that were already verified by WhiteHat in a previous scan.

    2. Pending Verification: New vulnerabilities found by the current scan and have not yet been verified by WhiteHat.

    3. All (Open and Pending Verification): Combined total vulnerabilities, including the vulnerabilities that were already verified by WhiteHat in a previous scan and the new ones found by the current scan.

  27. Optionally, click Get existing values from Sentinel to display an existing vulnerabilities count from Sentinel.

    jenkins plugin config project 15

    1. The table displays the current number of vulnerabilities in Sentinel by threat level and verification status.

  28. Optionally, select the Scan timeout radio button to set a time limit for the scan.

    1. Type a Timeout limit in minutes in the text field. The default time limit is 1440 minutes (24 hours).

  29. Click Save to save this post-build step.