GitLab fetchers pull CI/CD pipeline configuration, merge request summaries, and project summaries from the GitLab REST API. Each fetcher runs once per project — the runner fans out across the projects listed as targets in the manifest.
| Variable | Required | Description |
|---|---|---|
GITLAB_API_TOKEN |
Yes | GitLab project access token (per target) |
GITLAB_URL |
Yes | GitLab instance base URL, no trailing slash |
GITLAB_PROJECT_ID |
Yes | Project path or numeric ID (e.g. group/project) |
GITLAB_BRANCH |
No | Branch/ref to use (default main) |
A project-scoped token is preferred over a personal access token — it limits the credential to the specific project being scanned.
- Open your GitLab project.
- Navigate to Settings → Access Tokens.
- Click Add new token and name it
paramify-evidence-fetchers. - Set an expiration date aligned with your rotation policy.
- Select scopes:
read_api(addread_repositoryif your GitLab instance requires it for file/tree endpoints). - Set the role to Reporter or higher (read-only access is sufficient).
- Copy the token immediately — it is not shown again.
For a personal access token (if project tokens are unavailable): Profile → Access Tokens → Add new token, with the same scopes.
- Scopes:
read_api,read_repository - Project role: Reporter or higher
GitLab fetchers are fanout — each target is one project. Use add-target once per project. The API token is declared per_target in the fetcher schema, so each target can use a different token:
paramify manifest add gitlab_ci_cd_pipeline_config
# First project
paramify manifest add-target gitlab_ci_cd_pipeline_config \
project_id=group/change-management \
url=https://gitlab.example.com \
--secret api_token=GITLAB_TOKEN_1
# Second project (can use a different token, or the same one)
paramify manifest add-target gitlab_ci_cd_pipeline_config \
project_id=group/terraform \
url=https://gitlab.example.com \
branch=main \
--secret api_token=GITLAB_TOKEN_2If all projects share one token, point every target at the same env var name.
curl -s -H "PRIVATE-TOKEN: $GITLAB_API_TOKEN" \
"$GITLAB_URL/api/v4/projects/$(python3 -c 'import os,urllib.parse; print(urllib.parse.quote(os.environ["GITLAB_PROJECT_ID"],safe=""))')" \
| python3 -m json.tool | head -20- Create a second token — do not revoke the old one yet.
- Update the env var in your secrets store.
- Run the smoke test.
- Revoke the old token.
- GitLab fetchers paginate via
per_page+pageand make multiple requests for large projects or MR sets. - Checkov fetchers use a separate token (
GIT_CLONE_TOKEN) for git clone access — see../checkov/README.md.