Connect GitLab.com
CodeStax connects to GitLab.com through OAuth. Once connected, you can import projects, scan them, review merge requests, and see results as commit statuses and merge-request notes.
What GitLab supports today
| Capability | Status |
|---|---|
| Sign in and connect with GitLab OAuth | Supported when GitLab sign-in is enabled for your workspace |
| App installation | Not available. GitLab connects through OAuth only; there is no CodeStax app to install |
| Project import (personal and group projects) | Supported |
| Private project scanning | Supported |
| Merge-request reviews from a project webhook | Supported (open, update and reopen) |
| Merge-request reviews from GitLab CI | Supported; see CI/CD integration |
| Review results as a commit status | Supported |
| Review summary note and inline comments on the merge request | Supported |
| Quality-gate commit status for scans | Supported |
| Quality-gate merge-request note | Supported |
| Auto-scan on push | Not supported. GitLab push events are received but ignored |
| Self-managed GitLab | Not supported. Only gitlab.com is supported |
GitLab appears on the sign-in, signup and Integrations pages only when GitLab sign-in is enabled for your CodeStax workspace. If you do not see it, contact support@codestax.co.
Connect GitLab
During signup
Choose GitLab on the signup page. This authorizes CodeStax and connects your GitLab account.
After signup
- Open Integrations from the dashboard sidebar.
- On the GitLab card, click Connect.
- Authorize the CodeStax application on GitLab.
CodeStax stores GitLab credentials encrypted. When GitLab supplies a refresh token, CodeStax refreshes the credential before it expires; otherwise reauthorize the connection when GitLab rejects it.
Import and scan projects
Once connected, you can import personal and group-owned GitLab.com projects visible to the authorized account. CodeStax pages through the project list and lets you pick which projects to scan.
All scan analyses work on GitLab projects:
- SAST Analyzer for source code
- SCA for dependency vulnerabilities
- Secret Detection Engine for committed credentials
- IaC Security Analyzer for Terraform, Kubernetes and other infrastructure code
- Dockerfile and container best-practice analysis
Scans run when you start them, on a schedule, or from CI. Pushing to GitLab does not start a scan.
Review merge requests
A merge-request review starts in one of three ways:
- Project webhook. Add a GitLab project webhook for merge-request events. CodeStax reviews merge requests when they are opened, updated or reopened, and ignores other actions. See Configure GitLab.com for the URL and secret token.
- GitLab CI. Add the template from PR reviews → CI/CD integration. See CI/CD integration.
- Manually from the dashboard.
Webhook events are reviewed only for projects connected to your organization, only when your review dispatch policy allows the event, and only while your plan’s review limit has room. Redelivered events are deduplicated.
How review results appear in GitLab
When a review completes, CodeStax posts:
| Result | Where it appears |
|---|---|
| Summary note | A top-level note on the merge request. Re-reviews update the same note. |
| Inline comments | Discussion comments on the changed lines that have findings |
| Commit status | A status named CodeStax Security Review · <id> on the merge request’s head commit, linking to the review |
The commit status state follows the review gate:
| Review gate | GitLab state |
|---|---|
| passed | success |
| failed | failed |
| inconclusive | canceled |
The status description gives the risk score against its threshold, the critical and high counts against their limits, and the number of issues. When exploitable findings exist, it starts with their count.
Quality-gate commit status
When a quality gate is configured, every completed repository scan posts a commit status on the scanned commit using the GitLab OAuth connection:
- Status name:
codestax/quality-gate - Description: Quality Gate: Passed, Quality Gate: Failed (N violations) or Quality Gate: Not Configured
| Gate status | Block merge on fail off (default) | Block merge on fail on |
|---|---|---|
| passed | success | success |
| failed | success (visible, non-blocking) | failed |
| not configured | canceled | canceled |
The status links to the scan in CodeStax and is visible in the merge request and on the commit.
Make the status block merges
- Turn on Block merge on fail under Settings → Policies, or open Settings → Quality gates.
- In GitLab, open Settings → Merge requests for the project and require pipelines to succeed before merging.
Quality-gate merge-request note
For a scan of a branch with an open merge request, CodeStax upserts one top-level note listing violations and per-rule fix hints. Re-scans update the existing note.
Quality-gate notes are not a dashboard setting. To turn them off for your workspace, contact support@codestax.co.