Skip to main content

Prerequisites

You need to be an owner of the GitLab group you want to connect to Hacktron. This is required to create a service account for Hacktron to use.

Configure access

1

Open Service Accounts page

In GitLab, under the group you want to connect to Hacktron, go to Settings and select Service Accounts.GitLab Service Accounts
2

Create a new service account

Give the service account a descriptive name, e.g. “Hacktron”.Create Service AccountClick Create.
3

Grant Maintainer access to the service account

In the Group or Projects you want to connect to Hacktron, grant the service account Maintainer access.Grant Service Account Maintainer Access
4

Create a new personal access token

In the service account page, select the service account and click on Manage access tokens.Manage Service Account TokensClick on Add new token, and grant it the following permissions:
  • read_user
  • read_api
  • api
This is required for Hacktron to receive merge request events and run code reviews. Hacktron does not retain any source code after each review is complete.
Click Generate token.Token Permissions
Personal access tokens have expiration dates. Ensure the expiration date covers the duration of your intended use of Hacktron to avoid service interruption.
5

Open Integrations page

In Hacktron, go to Integrations and click Connect under GitLab.GitLab Integration
6

Enter the token

Enter the token you created earlier, and click Connect.
That’s it! Hacktron will now run security reviews for every pull request in the selected repositories.