Overview
Backline integrates with GitLab Self-Managed (self-hosted) to automatically create merge requests that remediate known vulnerabilities in your repositories. Backline supports two connection modes for GitLab Self-Managed:- Direct connection — Backline connects to your GitLab instance directly. This is the simplest setup and requires no additional infrastructure. Use this mode if Backline has access to your GitLab instance.
- On-Premise agent — A lightweight Backline agent runs inside your network and handles all communication using outbound-only connections. No inbound connections are required. You choose the connection mode when setting up the integration. It can be changed later by disconnecting and reconnecting.
Looking for GitLab.com (cloud)? See the GitLab integration instead.
What You Can Do
With the GitLab Self-Managed integration, Backline can:- Access your GitLab projects and groups
- Analyze dependencies and detect outdated packages
- Create merge requests with security patches
- Track remediation progress across your GitLab projects
Prerequisites
Before connecting GitLab Self-Managed, ensure you have:- A GitLab Self-Managed instance
- A token with Developer role on the projects you want Backline to manage: a service account, a group access token, or a personal access token (PAT). Backline onboards every project the token is a member of.
- An access token with the required scopes
- The Backline Helm chart already installed in your Kubernetes cluster
Network Requirements
Direct Connection Mode
Your GitLab instance must be reachable from Backline’s cloud infrastructure. Allowlist Backline’s IP ranges if your instance is behind a firewall — contact support@backline.ai for the current IP list.| Direction | Destination | Port | Protocol | Purpose |
|---|---|---|---|---|
| Inbound (to your GitLab) | From Backline cloud | 443 or 80 | HTTPS/HTTP | Git API operations |
On-Premise Agent Mode
The Backline on-premise agent requires the following network access:| Direction | Destination | Port | Protocol | Purpose |
|---|---|---|---|---|
| Outbound | app.backline.ai | 443 | HTTPS | Communication with Backline cloud |
| Outbound | Your GitLab Self-Managed server | 443 or 80 | HTTPS/HTTP | Git API operations |
| Inbound | None | — | — | No inbound connections required |
The agent connects to your GitLab server directly (not through Backline cloud). If your cluster routes outbound traffic through a corporate proxy, set the proxy in your Backline values and list your GitLab host (or internal domain) under
proxy.noProxy so the agent reaches it directly — otherwise the connection fails with Bad Gateway. See Routing through a corporate proxy below.If your GitLab server uses a TLS certificate signed by an internal or corporate CA, the agent must be given that CA to trust it — otherwise the connection fails with
x509: certificate signed by unknown authority. See Trusting an Internal CA below.Creating an Access Token
Backline needs a token with access to the projects you want to manage. Backline onboards every project the token is a member of.Supported Token Types
GitLab supports several token types that Backline can use:- Service Account Token — available on GitLab Premium/Ultimate. A machine user not tied to a person, suited for automation. Requires Developer role on the projects.
- Group Access Token — A token scoped to a group (and its subgroups). GitLab automatically creates a dedicated user for it. Requires Developer role.
- Personal Access Token (PAT) — tied to a specific user account. The user must have Developer role on the projects.
Required Scopes
Configure your token with the following scopes:api- Full API access for managing projects, merge requests, and webhooksread_repository- Clone and read repository contentwrite_repository- Create branches, commit changes, and push code
Setting Up the Account
Create a dedicated account
In your GitLab instance, create one of the following with Developer role on the projects you want to manage: a service account, a group access token, or a personal access token (PAT).
Generate an access token
Generate an access token for that account with the
api, read_repository, and write_repository scopes. Set an appropriate expiration date for your security policy.Enabling On-Premise Git Support
This section only applies if you chose the on-premise agent connection mode. If Backline has direct access to your GitLab instance and you’re using direct connection, skip to Connecting GitLab Self-Managed.
Routing through a corporate proxy
If your cluster reaches the internet through a corporate HTTP(S) proxy, set it in your Backline values so the worker, gitproxy and janitor use it. List your internal GitLab host (or domain) and in-cluster addresses undernoProxy so the agent reaches them directly — otherwise requests to your internal server are sent to the egress proxy and fail with Bad Gateway.
Trusting an Internal CA
If your GitLab server’s TLS certificate is signed by an internal or corporate CA (not a public one), the agent must be given that CA — otherwise connections fail withx509: certificate signed by unknown authority. A CA certificate is public (not a secret), so it’s safe to provide.
Base64-encode your CA certificate
Encode the CA certificate (PEM) that signs your GitLab server’s certificate into a single line:
Provide it to the agent
Upgrade your Backline release with the encoded CA via You can also place the base64 string under
customCaCert:customCaCert in your values file instead of using --set-file.Connecting GitLab Self-Managed
Enter Connection Details
Fill in the connection form:
- GitLab Instance URL — The base URL of your GitLab Self-Managed instance (e.g.,
https://gitlab.company.com). This is your server’s root URL, not a project or group URL. - Access Token — The token created in the previous step
- Route via Proxy — Enable this if connecting to your GitLab instance should route through the Backline proxy agent (on-premise agent mode). Disable it if Backline has direct access to your GitLab instance.
After Connection
Once GitLab Self-Managed is connected, Backline will:- Discover and catalog every project the token is a member of
- Generate remediation plans for vulnerabilities from those repositories
- Create merge requests for approved fixes
Managing the Integration
Testing Connections
To verify that a connection is still valid:- Open the integration details by clicking Configure on the GitLab Self-Managed integration card
- Click the three dots menu on the connection
- Select Test Connection to validate connectivity and credentials
Updating Access
To rotate your token or update credentials:- Generate a new token in your GitLab instance
- Return to the GitLab Self-Managed integration card in Backline
- Click Configure and update the token field
Upgrading the On-Premise Agent
Troubleshooting
On-Premise git pod is in CrashLoopBackOff
On-Premise git pod is in CrashLoopBackOff
- Verify
gitproxy.enabledis set and theaccessKeyis configured: - View the pod logs for specific error messages:
Test Connection fails
Test Connection fails
- Verify the on-premise agent is running:
kubectl get pods -n backline -l app=gitproxy - Test outbound connectivity to Backline cloud from the agent:
- Confirm the GitLab Instance URL is correct and reachable from the agent’s network
- Check that the Access Token is valid and has not expired
- Ensure the token has the required scopes:
api,read_repository,write_repository - Ensure the token is a member of at least one project with Developer role
Test Connection fails with a Bad Gateway error
Test Connection fails with a Bad Gateway error
Bad Gateway means the agent’s request to your GitLab server is being routed through your cluster’s outbound proxy, which can’t reach an internal server.Your GitLab server should be reached directly. Add its host (or your internal domain) to proxy.noProxy in your Backline values and upgrade — see Routing through a corporate proxy. The agent rolls out automatically with the new setting.Test Connection fails with a certificate error
Test Connection fails with a certificate error
x509: certificate signed by unknown authority means your GitLab server’s TLS certificate is signed by an internal/corporate CA that the agent doesn’t trust (it ships only standard public CAs).Provide your CA to the agent following Trusting an Internal CA, then retry Test Connection.No projects found during connection
No projects found during connection
Backline validates the token and onboards every project it is a member of. If none is found, the connection will fail.
- Verify the token is a member of at least one project with Developer role
- For Group Access Tokens, ensure the token is created at the group level (not project level)
- For Personal Access Tokens, ensure the user is a member of at least one project with Developer role
Merge requests are not being created
Merge requests are not being created
- Verify the account has write access to the repositories in the group
- Ensure the token has
write_repositoryscope - Review the on-premise agent logs:
kubectl logs -n backline -l app=gitproxy --tail=200
Connection was working but stopped
Connection was working but stopped
- Check that the on-premise agent is still running
- Verify the access token has not expired
- Confirm no network changes have blocked outbound connectivity to
app.backline.ai