GitLab Integration
GitLab Integration
Integrate GovernanceAI with GitLab for automated repository scanning and compliance checking.
Setup
Step 1: Create API Token
- Go to Settings → Access Tokens
- Create token with scopes:
api- API accessread_api- Read repositoriesread_repository- Read files
- Copy the token
Step 2: Connect in GovernanceAI
- Integrations → GitLab
- Enter GitLab URL (e.g.,
https://gitlab.comor your instance) - Paste API token
- Click Connect
- Select projects to scan
Step 3: Configure Webhooks
GovernanceAI creates webhooks for:
- Push events - Scan on every push
- Merge request events - Check on MR
- Issues - Track compliance findings
Features
✅ Automated Scanning
- Scan on push
- Check on merge requests
- Scheduled scans
✅ Pipeline Integration
- Run in CI/CD pipeline
- Create pipeline artifacts
- Fail pipeline on violations
✅ Merge Request Checks
- Report findings as MR comments
- Block merge on critical issues
- Show diff-only findings
GitLab CI/CD Integration
Permissions Required
api- Full API accessread_repository- Read repository filesread_api- Read API data
Troubleshooting
- Token expired - Generate new token
- Webhooks not firing - Check webhook logs in GitLab
- Projects not showing - Verify token has
apiscope - MR comments not appearing - Check project permissions
Next Steps
- GitHub Integration - Connect GitHub
- Azure DevOps - Connect Azure DevOps
- Running Scans - Learn scanning