GitLab Personal Access Tokens (PATs)
GoGatoZ uses the GitLab API to search projects, read pipeline files, and (optionally) perform attack/persistence operations in attack mode. Authentication is provided via a GitLab Personal Access Token (PAT).
Required scopes
Section titled “Required scopes”- api — required for most API interactions (projects, repository files, variables)
- read_repository — allows reading repositories (clone, read content)
- write_repository — only required for attack modules that push changes or create branches/merge requests
For enumeration/search only, api and read_repository are sufficient. Attack modules may need write_repository depending on the action.
Creating a PAT
Section titled “Creating a PAT”- Sign in to your GitLab instance (e.g., https://gitlab.com).
- Open your user menu -> Edit profile -> Access tokens (or navigate to: https://gitlab.com/-/user_settings/personal_access_tokens).
- Name the token (e.g., gogatoz), select expiration, and select scopes:
- api
- read_repository
- write_repository (only if you plan to use attack modules)
- Create the token and copy it somewhere secure.
Using the token with GoGatoZ
Section titled “Using the token with GoGatoZ”Environment variables (recommended):
export GITLAB_URL=https://gitlab.comexport GITLAB_TOKEN=glpat_xxxCLI flags (override env and config file):
./gogatoz --gitlab-url https://gitlab.com --token glpat_xxx enumerate -i projects.txt --jsonConfig file (.gogatoz.yaml):
gitlab-url: https://gitlab.comtoken: glpat_xxxPrecedence: flags > environment > config file > defaults.
Safety tips
Section titled “Safety tips”- Use a separate PAT for scanning with the minimum required scopes.
- Prefer short-lived tokens and rotate them regularly.
- For remote include resolution, use the allowlist and size/timeout guardrails to avoid fetching from unexpected hosts.
- Respect API rate limits; tune –rate-rps/–rate-burst and –retry-max as needed.