GitLab
What it does in Varman
Section titled “What it does in Varman”Varman reads the groups and projects your token can see and runs four checks. Each group or project gets its own pass or finding.
| Check | Passes when | Evidence task |
|---|---|---|
| 2FA Enforcement | Every group the token’s user owns requires two-factor authentication | 2FA |
| Branch Protection Enabled | Each project’s default branch matches a protected branch rule (wildcard rules count) | Code Changes |
| Merge Request Approvals Required | Each project requires at least one approval before merging | Code Changes |
| SAST / Dependency Scanning Enabled | Each project’s .gitlab-ci.yml on the default branch includes SAST, dependency scanning or secret detection |
Secure Code |
The scanning check looks for GitLab’s managed templates (for example Jobs/SAST.gitlab-ci.yml or
Jobs/Dependency-Scanning.gitlab-ci.yml), sast: or dependency_scanning: jobs, Semgrep, or
gitlab-advanced-sast in the pipeline file.
What you need
Section titled “What you need”- A GitLab.com user who is a member of the projects you want checked. Use an account with at least
Maintainer access, otherwise GitLab hides protected branch and approval settings and the
checks report
Cannot verify .... - To evaluate 2FA, the user must own the groups. Groups the user does not own are not checked.
Permissions requested
Section titled “Permissions requested”Create a personal access token with these scopes:
read_apiread_userread_repository
Varman sends the token as Authorization: Bearer <token>. It only reads.
Connect
Section titled “Connect”-
In GitLab, open User Settings > Access Tokens and create a personal access token with the scopes above. See GitLab’s guide: Personal access tokens.
-
Copy the token. GitLab shows it only once.
-
In Varman, open Integrations, find GitLab and click Set up.
-
Paste the token into Personal Access Token and click Connect account.
What gets synced and how often
Section titled “What gets synced and how often”Varman stores only check results. The checks list the token user’s projects (most recently active
first, up to 500) and owned groups (up to 500), and read each project’s protected branches,
approval settings and .gitlab-ci.yml. Checks run on the daily schedule described in the
overview, or when you click Run now.
Disconnect
Section titled “Disconnect”Open Integrations > GitLab, click Settings, then Disconnect. Then revoke the token in GitLab under User Settings > Access Tokens. See Disconnecting for what Varman keeps.
Troubleshooting
Section titled “Troubleshooting”-
No GitLab projects found. The user is not a member of any project, or the token is missingread_api(andread_repositoryfor the scanning check). -
Could not verify 2FA enforcement. Varman could not list owned groups. Check that the token is active and hasread_api. -
No owned GitLab groups to evaluate. This is a pass: the user owns no groups, so there is no group 2FA policy to check. Connect with a group owner’s token to evaluate 2FA. -
Cannot verify branch protection for <project>orCannot verify merge approvals for <project>. GitLab returned a permission error. Reconnect with an account that has at least Maintainer access to the project. -
Cannot verify security scanning for <project>. The token cannot read the repository. Add theread_repositoryscope and project access. -
No CI pipeline in <project>orNo security scanning in <project>. Add GitLab’s managed security templates to.gitlab-ci.yml:include:- template: Jobs/SAST.gitlab-ci.yml- template: Jobs/Dependency-Scanning.gitlab-ci.yml -
Default branch not protected in <project>. Add a rule under the project’s Settings > Repository > Protected branches. See Protected branches. -
No merge approvals required in <project>. Set Approvals required to at least 1 under Settings > Merge requests. See Merge request approvals.