You can integrate Netsparker Enterprise with GitLab using cURL or PowerShell scripts, generated by our Integration Script Generator. This topic explains how to generate and use cURL scripts to integrate Netsparker Enterprise with GitLab in order to enable our advanced integration functionality.
Generating and Using Netsparker Enterprise’s GitLab Integration Scripts
Netsparker Enterprise uses cURL and PowerShell command-line tools to integrate with GitLab. These scripts have been tested and approved for GitLab version 9+. In order to integrate with Netsparker Enterprise, GitLab Runner’s execution environment must support cURL or PowerShell.
How to Generate Netsparker Enterprise's GitLab Integration Scripts
- Log in to Netsparker Enterprise.
- From the main menu, select Integrations, then New Integration.
- From the Continuous Integration Systems panel, click GitLab. The GitLab Integration window is displayed.
- From the Integration Script Generator section, select the relevant Scan Settings:
- From the Scan Type field, select an option
- From the Website dropdown, select a website
- From the Scan Profile dropdown, select a scan profile (this is not displayed if you select Full with Primary Profile as the Scan Type)
- In the cURL field, click Click Copy to clipboard to copy the cURL script. (You will then paste this into the file described in the next How to.)
How to Use Netsparker Enterprise's GitLab Integration Script
- Paste the copied script (from the previous How to) into your .gitlab-ci.yml file, as shown in the example. Then commit and push it to the Git repository.
- Log in to your GitLab account.
- Navigate to your GitLab Project window.
- Click Settings, then CI / CD.
- Expand the Variables section. Add your Nesparker Enterprise API credentials as NETSPARKERUSERID and NETSPARKERAPITOKEN variables.