Socket for GitLab (Beta)

Run the Socket GitLab app in your own infrastructure to scan every project in a GitLab group and comment on merge requests.

🧪

Socket for GitLab is in beta. Behavior may change between releases.

Socket for GitLab is an app you run in your own infrastructure, as one Docker container and a PostgreSQL database. It connects to one GitLab group on GitLab.com or on a self-managed GitLab instance, scans every project in that group on each push, and comments on merge requests with dependency changes and alerts.

Get started

These pages take you from installation to daily use:

Requirements

Line up the following before you install the app:

  • A host that runs Linux containers, such as Docker. The socketdev/gitlab image is published for amd64 and arm64.
  • PostgreSQL 15 or newer with an empty database. The installation guide starts one in a container.
  • A Socket organization used only by this app, and a Socket API token with every full-scans, diff-scans, and repo scope.
  • A GitLab access token for the group. See Socket for GitLab permissions.
  • GitLab 17.4 or newer, if you run self-managed GitLab. Older versions don't send a webhook header the app requires.
  • A network path from GitLab to the app on TCP port 5050, and outbound HTTPS from the app to GitLab and api.socket.dev.

We recommend a dedicated Socket organization because the app reuses any existing Socket repository that has the same name as a GitLab project. In a shared organization, GitLab scans could land in a repository that another integration created.

Differences between GitLab.com and self-managed GitLab

How the app sets up webhooks and picks up new projects depends on where your GitLab runs:

Your GitLabWebhooks the app createsToken for the appProjects created after setup
Self-managed GitLab, any tierOne per projectGroup access token, MaintainerScanned after the next app restart
GitLab.com Premium or UltimateOne group webhookGroup access token, OwnerAdded automatically
GitLab.com FreeOne per projectPersonal access token, Maintainer on each projectScanned after the next app restart

On self-managed GitLab, the GitLab API reports every group's plan as default, so the app creates one webhook per project even on Premium or Ultimate. On GitLab.com Premium or Ultimate, the group webhook also reports deleted projects, and the app deletes the matching Socket repository.

Related topics


Did this page help you?