GitLab Integration
Connect GitLab to enable agents to access code, merge requests, and CI/CD pipeline information during investigations and remediation runs.
Used by: Incident Response, Vulnerability Remediation, AI Coding Cost Efficiency, and custom agents.
Capabilities
Once connected, agents can:
| Capability | Description |
|---|---|
| Browse Code | View repository files |
| Merge Requests | Review MRs and changes |
| Pipelines | Check CI/CD pipeline status |
| Commits | View commit history |
| Issues | Access issue tracking |
This integration has write tools: create branches, commit file changes, open and merge merge requests, and create repositories. These tools are available only to agents granted write access to it. They also need a token with the api scope. A governance policy on write operations pauses each write for a person to approve. Every call is recorded in the Audit Trail.
Prerequisites
- A GitLab account (Cloud or self-hosted)
- A Personal Access Token
- Read access to relevant projects
Setup
- Go to GitLab User Settings → Access Tokens
- Enter a token name (e.g., "Autoheal Integration")
- Set an expiration date
- Select scopes:
read_api,read_repository - Create the token. Then copy it
- Go to Integrations in Autoheal
- Click GitLab
- Enter a name (e.g., "Production GitLab")
Enter the following:
- Token: Your GitLab Personal Access Token
- URL: GitLab URL (default:
https://gitlab.com)
Click Test Connection to check the connection. Then click Save.
Required Scopes
| Scope | Why It's Needed |
|---|---|
read_api | Access GitLab API endpoints |
read_repository | View repository contents |
Self-Hosted GitLab
For self-hosted GitLab instances:
https://gitlab.your-company.com
Ensure the URL is accessible from Autoheal.
Example Queries
What pipelines failed in the last 24 hours?
Show me the latest merge requests for the backend project
What commits were deployed yesterday?
Troubleshooting
401 Unauthorized
- Check that the token is correct and not expired
- Check that required scopes are granted
Connection Failed (Self-Hosted)
- Check that the GitLab URL is correct
- Check network/firewall accessibility