Setup GuideGitLabCI/CDBranch ProtectionSASTIntegrationSetup

How to Connect GitLab to SecureSpect

Connect your GitLab group to automate code security evidence — branch protection, CI pipeline security, and dependency scanning results.

SecureSpect Team··7 min read

Ready to connect? Follow the steps in SecureSpect — the integration dialog walks you through the same process described here.

Open Integrations →

Overview

SecureSpect's GitLab integration uses a group-level read-only access token to collect evidence on your code security controls: protected branches, merge request approval policies, SAST/dependency scan results, and secret detection configurations. This maps to SOC 2 CC8.1 (Change Management).

What Gets Monitored

  • Protected branches — Main/master branch protection rules
  • Merge request policies — Required approvals before merge
  • CI/CD security jobs — SAST, DAST, dependency scanning, secret detection present in pipelines
  • Vulnerability report — Open security vulnerabilities from GitLab Security Dashboard
  • Audit events — Admin role grants, permission escalations

Step 1 — Create a Group Access Token

Group access tokens give SecureSpect read access to all projects under a GitLab group without using a personal account token.

  • In GitLab, navigate to your top-level Group → Settings → Access Tokens.
  • Click Add new token.
  • Name: SecureSpect, Expiry: 1 year (or max allowed).
  • Role: Reporter (read-only).
  • Scopes: read_api, read_repository.
  • Copy the generated token.
  • Personal Access Token alternative (for individual projects): Use User Settings → Access Tokens with read_api scope and Reporter role on the target project.

    Step 2 — Connect in SecureSpect

  • Go to Integrations → GitLab → Connect.
  • Enter your GitLab URL (e.g., gitlab.com or your self-hosted URL).
  • Paste your access token.
  • SecureSpect discovers all groups and projects the token can see.
  • Select the groups you want monitored and click Save.
  • Step 3 — Enable GitLab Security Scanning

    SecureSpect checks whether each project has these CI jobs configured. If missing, SecureSpect generates a template you can add to your .gitlab-ci.yml:

    include:
    

    - template: Security/SAST.gitlab-ci.yml

    - template: Security/Dependency-Scanning.gitlab-ci.yml

    - template: Security/Secret-Detection.gitlab-ci.yml

    variables:

    SAST_EXCLUDED_PATHS: "spec, test, tests, tmp"

    Merge Request Approval Policy

    For SOC 2 CC8.1, SecureSpect checks that your main branch requires at least 2 approvals before merge. Configure this in GitLab:

    Group-level: Settings → Merge requests → Approval rules → Add rule: minimum 2 approvals, prevent author approval.

    Automate your SOC 2 evidence collection

    Connect your AWS and GitHub environments and start collecting audit-ready evidence today. Free to start.

    Start Free →More Articles