Skip to Content

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

CapabilityStatus
Sign in and connect with GitLab OAuthSupported when GitLab sign-in is enabled for your workspace
App installationNot available. GitLab connects through OAuth only; there is no CodeStax app to install
Project import (personal and group projects)Supported
Private project scanningSupported
Merge-request reviews from a project webhookSupported (open, update and reopen)
Merge-request reviews from GitLab CISupported; see CI/CD integration
Review results as a commit statusSupported
Review summary note and inline comments on the merge requestSupported
Quality-gate commit status for scansSupported
Quality-gate merge-request noteSupported
Auto-scan on pushNot supported. GitLab push events are received but ignored
Self-managed GitLabNot 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

  1. Open Integrations from the dashboard sidebar.
  2. On the GitLab card, click Connect.
  3. 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:

  1. 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.
  2. GitLab CI. Add the template from PR reviews → CI/CD integration. See CI/CD integration.
  3. 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:

ResultWhere it appears
Summary noteA top-level note on the merge request. Re-reviews update the same note.
Inline commentsDiscussion comments on the changed lines that have findings
Commit statusA 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 gateGitLab state
passedsuccess
failedfailed
inconclusivecanceled

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 statusBlock merge on fail off (default)Block merge on fail on
passedsuccesssuccess
failedsuccess (visible, non-blocking)failed
not configuredcanceledcanceled

The status links to the scan in CodeStax and is visible in the merge request and on the commit.

Make the status block merges

  1. Turn on Block merge on fail under Settings → Policies, or open Settings → Quality gates.
  2. 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.