GitLab↑
Integrate the AQtive Guard (AQG) GitLab integration into your GitLab CI/CD pipelines to automate security analysis and receive real-time feedback directly within your merge requests.
Before you begin↑
To set up the integration, you’ll need to gather credentials from both AQG and GitLab.
Collect AQtive Guard credentials↑
Navigate to Data sources in the AQG main menu, then select the GitLab tile under the Integrations tab. Locate the following values:
aqg_instance- the base URL of your AQtive Guard instance.aqg_token- the API token used for authentication with AQtive Guard.
Generate a GitLab Access Token↑
If you plan to enable merge request (MR) comments, you’ll need a token that allows AQG to write back to your project:
gitlab_api_token- A GitLab Project/Group Access Token or Personal Access Token with API permissions to post comments on an MR.post_mr_comments- During setup, you’ll set this totrueto enable inline MR feedback.
You can use either a project or group token, or a personal token. The sections below outline how to create these tokens.
Create a project or group access token↑
This token is recommended for production environments to ensure the integration remains active regardless of individual team member changes.
To create a project or group token:
- Navigate to either your Project or Group in GitLab.
- On the left sidebar, select Settings, then Access Tokens.
- Select Add new token.
-
Enter a Name for the token.
Tip
We recommend using a descriptive name (for example, AQG Static Code Scanner) so you can easily identify comments created by AQtive Guard.
-
Enter an optional Description.
- Select the Expiration date.
- Select a Role. You’ll need to choose Developer or higher to allow the component to post comments.
- Under Select scopes, check the
apibox. - Click Create project access token.
- Copy the token immediately. For security reasons, you can’t access this token again once the page is closed.
Create a personal access token↑
This token is recommended if you’re working within a personal namespace or require the integration to act on your specific behalf.
To create a personal token:
- Select your Avatar in the top-left corner of GitLab and select Edit profile.
- In the left sidebar under Access, select Personal Access Tokens.
- Select Add new token.
-
Enter a Name for the token.
Tip
We recommend using a descriptive name (for example, AQG Static Code Scanner) so you can easily identify comments created by AQtive Guard.
-
Enter an optional Description.
- Select the Expiration date.
- Under Select scopes, check the
apibox. - Select Create personal access token.
- Copy the token immediately. For security reasons, you can’t access this token again once the page is closed.
GitLab integration deployment↑
Follow these steps to deploy the GitLab integration.
- Visit this page to install the AQG Static Code Scanner GitLab CI component.
- Use the previously obtained values to configure the GitLab CI/CD pipeline in your workflow.
- View your findings in the AQtive Guard Inventory and Issues tables.
Tip
We strongly recommend using GitLab CI/CD variables (masked and protected) for aqg_token. If you plan to use this GitLab CI/CD component across multiple projects, define these variables at the Group level. Refer to the GitLab CI/CD variables documentation for details.
Data handling and privacy↑
AQG is committed to transparent data handling. When using the AQG GitLab CI component, we retain a small code snippet surrounding each identified vulnerability to help you locate and resolve the issue faster. For full details on data retention and privacy measures, refer to How we manage your data.