> ## Documentation Index
> Fetch the complete documentation index at: https://docs.plerion.com/llms.txt
> Use this file to discover all available pages before exploring further.

# GitLab

> Integrate Plerion Code Security with GitLab to scan repositories for infrastructure as code (IaC) issues and software composition analysis (SCA) issues directly in your development workflow.

With the [GitLab integration](https://app.plerion.com/settings/integrations/add/GitLab/GitLab), you can connect your repositories to Plerion Code Security. This enables automatic scanning for IaC and SCA issues, giving developers early feedback and helping teams resolve issues before they reach production. It works with GitLab.com and with GitLab servers you run yourself (self-managed GitLab).

***

## Steps to integrate GitLab.com with Plerion

**1. On the Plerion dashboard, go to Settings > Integrations**

![Plerion dashboard showing Settings expanded with Integrations selected](https://mintcdn.com/pleriondocs/j-a8Y0pMh6mLkP46/images/integrations/gitlab/settings-integrations-sidenav.png?fit=max\&auto=format\&n=j-a8Y0pMh6mLkP46\&q=85\&s=973cc4a036ed3532a10e1287a6e9cb22)

**2. Find GitLab and click the + button**

![Integrations page showing GitLab tile with plus button](https://mintcdn.com/pleriondocs/j-a8Y0pMh6mLkP46/images/integrations/gitlab/add-gitlab-integration.png?fit=max\&auto=format\&n=j-a8Y0pMh6mLkP46\&q=85\&s=6699948964bd3e4a40d4b30cce0ff670)

**3. Choose GitLab.com**

Plerion asks where your GitLab is. Choose **GitLab.com**.

![Add GitLab page asking where your GitLab is, with GitLab.com and Self-managed GitLab](https://mintcdn.com/pleriondocs/oenFxO588hDSFxEF/images/integrations/gitlab/gitlab-choose-host.jpg?fit=max\&auto=format\&n=oenFxO588hDSFxEF\&q=85\&s=3ca47ac3fa8b5517ad0d8871ce24ae16)

**4. Click Install and review the permissions**

Click **Install**. GitLab opens in a new window and asks you to authorize Plerion.

**5. After installation, you will be redirected to the Plerion platform**

![Plerion integration page showing GitLab connected](https://mintcdn.com/pleriondocs/j-a8Y0pMh6mLkP46/images/integrations/gitlab/integration-page.png?fit=max\&auto=format\&n=j-a8Y0pMh6mLkP46\&q=85\&s=23db8c7c52ab2b935e63467287d1ccb8)

## Connect a self-managed GitLab server

If your company runs its own GitLab server, you register Plerion as an application on that server, then give Plerion its details.

### Before you start

* Plerion connects to your server over HTTPS from the internet, so the server must be reachable from the internet.
* Plerion connects to your server by its hostname, such as `gitlab.example.com`. It does not accept an IP address.
* The server's certificate must be issued by a public certificate authority. Plerion does not accept self-signed certificates or certificates from a private certificate authority.
* Your server must be able to send HTTPS requests to Plerion, so that merge request scans start when developers push.
* Connect with a GitLab user who is an **Owner** of the groups you want to scan, or at least a **Maintainer** of their projects. Plerion sees the same projects this user can see.

**1. Open the GitLab integration in Plerion**

Go to **Settings > Integrations**, find GitLab and click the **+** button. Choose **Self-managed GitLab** and copy the **Redirect URI** shown on the page. You need it in the next step.

**2. Create an application for Plerion in GitLab**

In GitLab, create an application. Either kind works:

* **For one group:** open the group, then go to **Settings > Applications**. You need the Owner role on the group.
* **For the whole server:** go to **Admin area > Applications**. You need to be a GitLab administrator.

Fill in the form:

* **Name:** `Plerion`
* **Redirect URI:** the URI you copied from Plerion
* **Confidential:** selected
* **Scopes:** `api`, `read_api` and `read_user`

Click **Save application**, then copy the **Application ID** and the **Secret**. GitLab shows the secret only once. For more detail, see GitLab's guide to [configuring GitLab as an OAuth 2.0 provider](https://docs.gitlab.com/integration/oauth_provider/).

**3. Enter the details in Plerion**

Back in Plerion, enter your server's address in **GitLab server URL**, such as `https://gitlab.example.com`. Paste the **Application ID** and **Secret**, then click **Install**.

![Plerion GitLab integration form with Self-managed GitLab selected](https://mintcdn.com/pleriondocs/oenFxO588hDSFxEF/images/integrations/gitlab/self-managed-form.jpg?fit=max\&auto=format\&n=oenFxO588hDSFxEF\&q=85\&s=b0130c36826c66b34e4e1f793bfc4654)

Plerion checks that it can reach the server before it continues. If it can't, the page says why.

**4. Authorize Plerion in GitLab**

A GitLab sign-in window opens on your own server. Sign in as the user described in [Before you start](#before-you-start) and click **Authorize**. The window closes and Plerion shows your new integration, with your server's address on it.

### Webhooks

Plerion adds the webhooks it needs to your server by itself. You don't need to create them.

* **GitLab Premium and Ultimate:** Plerion adds one webhook to each group you select.
* **GitLab Free:** group webhooks are not available, so Plerion adds a webhook to each project in the group, up to 100 projects per group. Projects you create later get their webhook at the next scheduled scan.

If the connecting user is a Maintainer but not an Owner of a group, Plerion also adds webhooks to each project. Removing the integration removes the webhooks. For more about GitLab webhooks, see [GitLab's webhooks guide](https://docs.gitlab.com/user/project/integrations/webhooks/).

***

## Configuring your GitLab integration

Once installed, you can configure the GitLab integration to match your workflows. These settings control which namespaces are scanned, when and how scans run, how issues are handled, and what rules apply.

### Integration status

Controls whether Plerion Code Security is active.

* **Default**: Enabled
* **When disabled**: Pauses all scanning activities, including scheduled and merge request scans
* **Recommendation**: Keep enabled unless there is a specific need to pause

![Integration status toggle in Plerion for GitLab](https://mintcdn.com/pleriondocs/j-a8Y0pMh6mLkP46/images/integrations/gitlab/integration-status.png?fit=max\&auto=format\&n=j-a8Y0pMh6mLkP46\&q=85\&s=13572a9300da5db4ff082b78c75c9709)

### Scheduled scans

Runs automatic daily scans of your main branches.

* **Default**: Enabled
* **Purpose**: Continuous monitoring of production-ready code
* **Key points**:
  * Runs without manual input
  * Identifies risks in stable branches
  * Helps with long-term security posture

![Scheduled scans configuration in Plerion for GitLab](https://mintcdn.com/pleriondocs/j-a8Y0pMh6mLkP46/images/integrations/gitlab/scheduled-scans.png?fit=max\&auto=format\&n=j-a8Y0pMh6mLkP46\&q=85\&s=78cdeff9089a30effe1626c267543586)

### Merge request scanning

Scans code in new and updated merge requests.

* **Default**: Enabled
* **What it does**:
  * Scans only changes introduced in the merge request
  * Posts findings as comments directly in GitLab
  * Integrates with GitLab status checks to block insecure merges
* **Supported file types**: YAML, Terraform, JSON, and other IaC files
* **Why it matters**: Prevents vulnerabilities from being merged, encourages secure development practices, and builds developer awareness

![Merge request scanning configuration in Plerion for GitLab](https://mintcdn.com/pleriondocs/j-a8Y0pMh6mLkP46/images/integrations/gitlab/merge-request-scanning.png?fit=max\&auto=format\&n=j-a8Y0pMh6mLkP46\&q=85\&s=5ff1332350c2d6d1609d0d33277207ea)

### SAST scanning

Scans your source code for security vulnerabilities using static application security testing (SAST).

* **Default**: Disabled
* **What it does**:
  * Adds your source code to default branch and merge request scans
  * Analyzes it for common vulnerability patterns such as injection flaws, insecure cryptography, and unsafe deserialization
  * Reports findings in the Plerion platform alongside IaC and SCA findings, and as comments on merge requests
* **Supported languages**: TypeScript, JavaScript, Python, Go, Java, Kotlin, Ruby, PHP, C#, C, C++, Rust, Swift, and Scala
* **Why it matters**: Catches application-layer vulnerabilities earlier in the development lifecycle, before code reaches production

![SAST scanning configuration in Plerion for GitLab](https://mintcdn.com/pleriondocs/kraYeVtb0PteP6fB/images/integrations/gitlab/sast-scanning.png?fit=max\&auto=format\&n=kraYeVtb0PteP6fB\&q=85\&s=b52b783569677a8427c5b9c0cba9e058)

### Tolerance for blocking merge requests

Controls when merge requests are blocked based on severity.

* **Default**: Do not block merge requests
* **Options**:
  * Only block for critical findings
  * Block for high and critical findings
  * Block for medium and above findings
  * Block for any finding
  * Do not block merge requests
* **Best use**: Choose based on your team’s security posture, development velocity, and compliance requirements

![Tolerance configuration options in Plerion for GitLab](https://mintcdn.com/pleriondocs/j-a8Y0pMh6mLkP46/images/integrations/gitlab/tolerance-configuration.png?fit=max\&auto=format\&n=j-a8Y0pMh6mLkP46\&q=85\&s=31d8e437b5b8ff56f43219030565dd0f)

### Profile

Defines which detection rules are used during scans.

* **Default**: Organization’s default profile
* **Options**: Use an existing profile or create a new one
* **Where to manage**: Detection Settings in Plerion
* **Best use**: Align profiles with coding standards, risk appetite, and compliance needs

![Profile selection in Plerion GitLab integration](https://mintcdn.com/pleriondocs/j-a8Y0pMh6mLkP46/images/integrations/gitlab/profile.png?fit=max\&auto=format\&n=j-a8Y0pMh6mLkP46\&q=85\&s=6f34df7d6afa1b54b3f85bcaac28e339)

## Best practices

* Keep the integration enabled for continuous coverage
* Use scheduled scans to monitor long-term branches
* Enable merge request scanning to prevent insecure code from merging
* Set merge request blocking tolerance based on your risk tolerance
* Select a detection profile that matches your organization’s security requirements


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.