GitLab Coverage

Inventory of GitLab groups, projects, CI/CD runners, environments, pipeline schedules, container registry, access tokens, deploy keys and webhooks — with hygiene and security findings and storage and CI metrics, on GitLab.com or a self-managed instance.

3 min read

How it works

Inventory, findings and metrics run today; cost import is on the roadmap.

Inventory
Discovers and syncs groups, projects, runners, environments, pipeline schedules, container registry repositories, personal/project/group access tokens, deploy tokens, deploy keys and webhooks from the GitLab API, on a schedule or on-demand.
Scope
Only what the token's user is a member of is scanned — never every public project of the instance. A group access token limits the scan to that group and its subgroups.
Rate limits
Items that live under each project or group (tokens, environments, schedules, webhooks, deploy keys, registry repositories) cost one API call per project. To stay within GitLab.com's per-user rate limit, each hourly sync refreshes a sixth of the projects and keeps the rest as they were, so these items are at most about six hours old.
Findings
Credentials that expired, expire soon, never expire, go unused or grant broad scopes; inactive projects, registries without a cleanup policy and large CI artifacts; offline and idle runners; stale review apps; inactive, orphaned or failing pipeline schedules; disabled webhooks and webhooks without SSL verification; empty groups and CI minutes quotas running out.
Metrics
Storage per project (repository, CI artifacts, registry, packages, LFS), pipelines per day with failures and average duration, jobs per runner and CI minutes used per top-level group.
Sensitive data
Token values are never returned by GitLab; webhook URLs are stored without credentials or query string, and CI/CD variables are not read at all.

Coverage by service

One card per service. Each card lists its resource types and the capabilities they support.

Inventory Metrics Optimization Drift detection
Access
4 resource types
  • Project & Group Access Tokens
  • Deploy Keys
  • Deploy Tokens
  • Personal Access Tokens
Groups
1 resource type
  • Groups
Projects
1 resource type
  • Projects
Container Registry
1 resource type
  • Container Repositories
CI/CD
3 resource types
  • Environments
  • Pipeline Schedules
  • Runners
Integrations
1 resource type
  • Webhooks

Access token

A personal or group access token with the read_api scope.

Create the token in GitLab at User settings → Access tokens (the account's credentials tab links here too), or as a group access token under the group's Settings → Access tokens, granting it the read-only scope below. Nothing this app does ever needs write access. read_api

For a group access token, the Reporter role is enough for groups, projects, environments, schedules and the container registry; runners, project access tokens, deploy tokens, deploy keys and webhooks need Maintainer, and group access tokens, group deploy tokens and group webhooks need Owner. Items the role can't see are simply left out.

Go to Organization → Integrations → Cloud Accounts → Create, pick GitLab, and paste the token.

Instance URL

GitLab.com or your own instance.

Defaults to https://gitlab.com — point it at your self-managed instance's URL otherwise.

Terraform

The PruneOps Terraform provider can create the account, and the GitLab provider can mint the group access token it uses.

data "pruneops_access_requirements" "gitlab" {
  provider_id = "gitlab"
}

resource "gitlab_group_access_token" "pruneops" {
  group        = "my-group"
  name         = "PruneOps"
  access_level = "maintainer"
  scopes       = data.pruneops_access_requirements.gitlab.items
  expires_at   = "2027-11-01"
}

resource "pruneops_cloud_account" "gitlab" {
  name        = "GitLab"
  provider_id = "gitlab"
  credentials_wo = {
    api_token = gitlab_group_access_token.pruneops.token
    api_host  = "https://gitlab.com" # or your self-managed URL
  }
  credentials_wo_version = 1
}

Terraform state

GitLab-managed Terraform state as a drift source.

States kept by GitLab's Terraform HTTP backend can feed the drift comparison: add a source under Organization → Integrations → Terraform, pick this account and enter a project or group path as the bucket — a group reads the states of every project in it. The same read_api token is enough. See Terraform setup.

First sync

Once the account is saved, inventory runs on the next hourly cycle — or trigger it immediately from the account's detail page. Discovered resources appear under Audit → GitLab.