Create GitLab tickets for Findings
Configure GitLab Integration for New Findings
To configure GitLab to create issues for new findings, you need three general steps:
- Obtain a GitLab project access token.
- Create a GitLab connection on the Cobalt platform.
- Create a new recipe on the Cobalt platform.
1. Obtain a GitLab Project Access Token
To obtain a GitLab project access token, go to your GitLab project settings, create a new project access token, and copy it to use later.
Follow GitLab Docs to learn more about creating a project access token.
2. Create a GitLab Connection on the Cobalt Platform
From now on, we are working on the Cobalt platform side.
Go to your integration builder page, and select your project.
Click on the “Create” button on the top right, and choose “Connection”.
You will be redirected to a page with all the possible connections.
Find the GitLab connection and click on it.
You will need to fill in some information about the connection. The most important part is the access token you obtained in the first step.
Alternatively, you can use password-based authentication. In this case, you need to provide your GitLab username and password.
Once done, click “Connect”.
3. Create a New Folder to Better Organize Your Recipes
Before creating a new recipe, it is better to create a new folder for all future GitLab recipes.
Go to the project page again, and click on the “Create” button on the top right. This time, choose “Folder”.
Give the new folder a name, and choose its location. Then click “Create Folder”.
Now you can see the new folder in the project.
Now we have the option in the folder to create a new recipe. But it is better to reuse an existing recipe.
4. Find an Existing Recipe
Go to the “Library” tab and search for the GitLab recipe.
There are two recipes to choose from, depending on whether you’re interested in creating GitLab issues to track a pentest finding or a DAST Scanner finding. We’ll use the pentest finding recipe as a base and customize it. Click on the recipe to see its details and click “Use this recipe”.
Choose to save the recipe in the folder you created earlier.
5. Customize the Recipe
Once copied and saved, an initial customization is needed.
You can see in the recipe’s graph that there is an error. The highlighted step is the one causing the error.
The existing error is due to a missing field for setting the GitLab project.
Select your GitLab project in the step’s settings, then save and exit the recipe.
Now there are no more errors. You can start the recipe. This may take a few seconds to run.
Once the recipe is running, you will see the jobs tab to monitor any events. This can be left open to verify whether a created finding triggers the desired action. The recipe will continue running even when the tab is closed. Click “Stop recipe” if you need to stop running it. To edit the recipe, you must stop running it first.
You can create a test Finding to test the recipe.