branchd Docs
On this page

Scopes and levels

branchd's feature scopes, what each one allows, and the read, write, maintain and admin levels that bundle them.

Updated 2026-12-04scopes.mdEdit this page

A scope names one feature at one level. The verbs are read, edit and admin, and each implies the ones before it: admin ⊃ edit ⊃ read. Ask for, or issue, only the scopes the job needs. A key that can pull images cannot clone, and a token that can clone cannot push.

The same scopes are checked everywhere: the API, git over HTTPS, the container registry, Go modules and release downloads.

Feature scopes

ScopeAllows
forge:contents:readClone and fetch, read files, commits and blame, compare, fetch Go modules
forge:contents:editPush, and create or delete branches and tags
forge:repository:readRead repositories and their settings
forge:repository:editChange repository settings
forge:repository:adminCreate, delete, rename and transfer repositories; visibility, access and grants, webhooks and mirrors
forge:group:readSee groups and their settings
forge:group:editCreate and change groups, their labels and settings
forge:group:adminA group's access, bots and runner pools
forge:pull-request:readRead pull requests and their comments
forge:pull-request:editOpen, edit, close and comment on pull requests
forge:pull-request:mergeMerge pull requests, where branch rules allow
forge:review:readRead reviews
forge:review:editReview and approve pull requests
forge:check:readRead checks on commits
forge:check:editReport checks on commits. A check reported this way never counts as a required check.
forge:branch-rule:readRead branch rules
forge:branch-rule:editChange branch rules
forge:release:readRead releases and download their assets
forge:release:editCreate, edit and publish releases
forge:package:readPull container images, download generic packages and install npm packages; see tags, versions and retention
forge:package:editPush container images; publish generic and npm packages; move aliases and dist-tags
forge:package:adminSet and apply retention; delete images and generic packages; deprecate and unpublish npm versions; claim npm scopes. Deleting also needs a key at the maintain level (it must hold forge:branch-rule:edit).
forge:terraform-state:readRead Terraform states, secrets included (also needs write access on the repository)
forge:terraform-state:editWrite, lock and unlock Terraform states, as Terraform does
forge:terraform-state:adminDownload, restore and delete Terraform state versions and states; force-unlock them
forge:pipeline:readRead runs, logs and drafts
forge:pipeline:editRun, retry and cancel pipelines, fire schedules, edit drafts
forge:pipeline:adminChange pipeline settings, variables and secrets

Webhooks and mirrors are under forge:repository:admin because both hold or send secrets.

Some scopes are never put on a key: your SSH keys (forge:ssh-key:*), session credentials and your profile. A key can never manage keys, SSH keys, session credentials, bots or access grants, whatever scopes it has.

Levels

A level is a named bundle of scopes, offered by the console and by the CLI's --level as a shortcut. Each level contains the one before it.

LevelAdds
readEvery feature's :read: group, repository, contents, pull-request, review, check, branch-rule, release, package, pipeline
writecontents:edit, pull-request:edit, review:edit, check:edit, release:edit, package:edit, pipeline:edit, terraform-state:read, terraform-state:edit
maintainpull-request:merge, branch-rule:edit, repository:edit, pipeline:admin, terraform-state:admin
adminrepository:admin, group:edit, group:admin, package:admin

A key below the maintain level stays at write access even where your role is higher. It cannot create or force-update protected branches or tags, or delete images.

Choosing scopes: examples

JobScopes
Clone repositories in CIforge:contents:read
Pull images from the registry, download generic packages, install npm packagesforge:package:read
Push images, publish generic and npm packagesforge:package:edit
Run terraform plan and apply against a stateforge:terraform-state:read, forge:terraform-state:edit
Publish releases from a buildforge:release:edit, forge:contents:read
Report a status check from an external systemforge:check:edit
A review bot that comments on pull requestsforge:pull-request:edit, forge:contents:read