- Scanning identity. A dedicated service account with a personal access token (PAT) owns the integration, instead of an employee’s account.
- Network. Gecko’s IP addresses are allowlisted wherever your instance enforces IP access. The allowlist must be in place before you connect, or everything fails with a valid token.
- User linking. An OAuth application registered on your instance lets each dashboard user link their own GitLab account, which is what their repository visibility in Gecko is derived from. See Who sees what in Gecko.
How the integration works
Two Gecko components talk to your instance, and your instance sends events back to Gecko. All three paths matter: if one is blocked, you get partial, confusing failures. Everything Gecko does in GitLab is attributed to the account that owns the token. That makes the account choice the first decision of the rollout.Why a service account
A service account is a machine user that exists only for the Gecko integration. Compared to a token on an employee’s account:- It survives offboarding. If the engineer who connected Gecko leaves and their account is deactivated, an integration on their token breaks. A service account doesn’t.
- It scopes cleanly. The service account is a member of exactly the groups Gecko should scan, nothing else. An employee token carries every permission that person has.
- Attribution is obvious. MR comments and fix MRs appear as
gecko-security, not as a random teammate. Reviewers always know which activity is Gecko’s. - Rotation is routine. Rotating the PAT is a scheduled task, not an interruption to someone’s personal credentials.
The access model
The service account’s group membership is the permission boundary: Gecko can only see and clone what the service account can see and clone. The Developer role is enough. It can read code, comment on merge requests, and push fix branches. Nothing above Developer is needed.Admin setup
Create the service account
gecko-security, with a shared-mailbox email your team controls.Add it to the groups Gecko should scan
Create the PAT as the service account
- Name:
Gecko Security - Expiration: your standard rotation window (GitLab requires an expiration date unless an administrator has changed that policy)
- Scope:
api. This is the only scope needed. Token scopes in detail lists every call Gecko makes with it.
Allowlist Gecko's IP addresses
Connect in Gecko
https://gitlab.example.com, and the service account’s token. Use
the base URL only, without /api/v4. The instance must be reachable over
HTTPS with a valid certificate. Gecko rejects instance URLs that aren’t
HTTPS or that point at private or loopback addresses.Select repositories
Configure the webhook
app.gecko.security, so
they usually need no inbound firewall change. Your instance does need to be
able to reach the internet. See Webhooks.Verify the rollout
Each check isolates a different layer. Run them in order: if one fails, you know exactly which part of the setup to revisit.Test the token itself
200 whose username is the service account confirms the PAT is valid
and belongs to the right account. A 401 means the token is wrong. A
response showing your username means the token was created on the wrong
account.Confirm each path from Gecko
- The repository list populates in Gecko. This confirms the frontend IPs are allowed and the service account’s memberships are right.
- A baseline scan completes. This confirms the scanner IP is allowed and clones work.
- A test merge request gets a Gecko comment. Open a draft MR touching
any file. A comment from
gecko-securityconfirms the webhook delivers and theapiscope works. If nothing appears, check the webhook’s Recent events in GitLab for the delivery status.
What happens on every merge request
Once connected, the day-to-day flow is fully automatic: The developer never leaves GitLab. Findings arrive as MR comments from the service account, and auto-fix MRs are opened by the same account.Who sees what in Gecko
Two GitLab identities are involved, with strictly separate jobs:- The service account scans. Its memberships decide which repositories exist in Gecko at all, and it authors every MR comment and fix MR.
- Each user’s own GitLab account decides what they see. Dashboard users link their GitLab account to their Gecko user (read-only, see below), and Gecko shows them only the synced repositories their GitLab user can access. GitLab’s permissions stay the single source of truth; SSO and SAML assertions play no part in repository access.
- Roles cap actions. A Gecko role decides whether someone can run scans or change settings, not which repositories appear.
- Developers don’t need Gecko accounts. Findings arrive as MR comments from the service account, inside GitLab.
Enable user linking
Gecko can’t pre-register an OAuth application on your server, so an admin registers one once; after that, every user links through it.Get the redirect URI from Gecko
Register the application on your instance
- Name:
Gecko Security - Redirect URI: the URI you copied from Gecko
- Confidential: enabled
- Scopes:
read_apionly. User links are read-only; all writes run on the service account’s PAT.
Add the credentials in Gecko
Users: link your account
Each dashboard user then goes to Settings > Sign-in methods > Connect GitLab, signs in to your instance, and approves the request. Their visible repositories appear immediately. The exact OAuth flow and the endpoints it touches are on How identity works in Gecko.Network and IP allowlist
Self-managed GitLab and GitLab Dedicated usually restrict access by IP. If yours does, allowlist Gecko’s three IP addresses (one scanner, two frontend) before you connect. Otherwise token validation, repo sync, and clones all fail even with a valid token.Confirm prerequisites
Add the addresses where GitLab enforces IP access
Self-managed: group IP restriction
Self-managed: group IP restriction
203.0.113.5/32). See
GitLab group access and permissions.GitLab Dedicated: Switchboard allowlist
GitLab Dedicated: Switchboard allowlist
Behind a firewall or load balancer
Behind a firewall or load balancer
Verify
GitLab Dedicated
GitLab Dedicated follows the same model as self-managed (a dedicated service account with a PAT) with one difference: IP access is enforced in Switchboard, GitLab’s management console for Dedicated tenants. Use your tenant URL as the instance URL and add Gecko’s IP addresses under Configuration > IP allowlist in Switchboard before connecting.Token scopes in detail
Select a single scope on the PAT:api. Below is the complete inventory
of what Gecko actually calls with it. If an operation isn’t listed here,
Gecko doesn’t perform it.
Read operations (would be covered by read_api + read_repository
alone):
api):
api is the only GitLab scope that grants
write access to the API. write_repository covers git push but not API
calls, so it can’t replace it. Since api is a superset of read_api and
read_repository, select api alone.
The write operations map one-to-one to optional features. A team that doesn’t
enable auto-fix MRs or vulnerability export will only ever see MR comments in
the write column.
Just as important for a security review, what Gecko does not need:
- No
sudooradmin_mode. Gecko never impersonates users or touches instance administration. - No instance-wide access. The blast radius of the token is bounded by the service account’s group memberships and its Developer role, not by the scope.
read_api + read_repository
lets Gecko sync and scan, but MR comments, fix MRs, and vulnerability
export will fail with 403 until you switch to an api-scoped token.What limits the token
GitLab token scopes are a fixed list with no sub-scopes, soapi is the smallest scope that
covers the write operations above. The real limits on the token are the two
axes you control:
- Membership. The service account sees only the groups and projects you add it to. Add it to specific projects instead of a top-level group if only a subset should be scannable, or use a group access token, whose bot user is confined to its group by construction.
- Role. GitLab enforces the Developer role on every call, regardless of scope. The token can’t push to protected branches, change settings or webhooks, manage members, delete projects, or act as another user.
Rotate or revoke access
- Rotate: create a new PAT on the service account and paste it into Settings > GitLab. Repository selection, scan history, and findings are unchanged. Rotation is a paste, not a re-setup. Put the expiration date on your team’s rotation calendar; when the PAT expires, syncs, scans, and MR comments stop until a new token is added.
- Revoke: revoking the PAT in GitLab cuts off all of Gecko’s access to your instance immediately. API calls and clones both fail from that moment. Delete the webhook to stop event delivery too. This is your kill switch, and it’s entirely on your side.
For your security team
The questions a security review usually asks, answered up front:- What can Gecko access? Exactly what the service account can access. Its group memberships are the permission boundary, and the Developer role is the ceiling. No instance-wide or admin access is ever required.
- Who can see the findings? Members of the Gecko team, each scoped by their own GitLab permissions: a user sees a synced repository only if their linked GitLab account can access it, and Gecko roles cap what they can do about it. SSO and SAML assertions play no part in repository access. See How identity works in Gecko.
- What leaves our network? Code is cloned over HTTPS for the duration of a scan and not retained. Gecko stores findings with minimal metadata: repository names, usernames/emails, and short (~5–6 line) code snippets. See Architecture.
- Where does traffic come from? All access to your instance originates
from three static IP addresses, so your allowlist stays small and auditable.
Webhooks are outbound from your instance and verified by Gecko with a
shared secret (
X-Gitlab-Token). - How do we revoke access? Revoke the PAT. See Rotate or revoke access. Revocation is instant and controlled entirely from your side.
- What if code can’t leave our network at all? Gecko supports a hybrid deployment where scanning runs inside your own cloud account.
Export findings back to GitLab
Gecko can push findings into GitLab’s native Security Dashboard. See GitLab vulnerability export.Troubleshooting
Start from the symptom. Each one points at a different layer:Token validation fails
Token validation fails
api scope, and that Gecko’s IP addresses
can reach your instance. See Network & IP allowlist.Empty repository list or clone failures
Empty repository list or clone failures
MR comments fail with 403
MR comments fail with 403
api scope, or the service account’s role on the
project is below Developer. Recreate the token with api and confirm the
membership.PR checks don't trigger
PR checks don't trigger
app.gecko.security over HTTPS.FAQ
Why a PAT on a service account instead of OAuth?
Why a PAT on a service account instead of OAuth?
Can one service account cover multiple top-level groups?
Can one service account cover multiple top-level groups?
What happens when the PAT expires?
What happens when the PAT expires?
Our instance can't be reached from the internet at all
Our instance can't be reached from the internet at all
Do developers need to do anything?
Do developers need to do anything?