ghtier
← All permissions
Repository permission·contents:write

Contents: Write

Tier 2 · Medium

Why Tier 2

Pushes commits, creates and moves branches and tags, and edits releases. Cannot change workflow files without Workflows: write. On a repository other projects consume, moving a tag changes what they run.

Context-dependent: the tier shown is the typical case. What the target is used for decides the real one.

Target
Repository
Plane
DataCode: Repository contents, branches, tags, pull requests, checks and commit signing keys.
Granted by
Fine-grained PAT, GitHub App, GITHUB_TOKEN
Available on
Every setup
In a workflow
permissions: contents: write

What it unlocks

46 REST endpoints need this permission. A few of them:

  • POST /repos/{owner}/{repo}/branches/{branch}/rename
  • POST /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix/commits
  • DELETE /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}
  • POST /repos/{owner}/{repo}/code-scanning/codeql/variant-analyses

Roles that include it

Classic scopes that reach it

Attack paths

Techniques it enables

Escalations it starts

Reached through

Fixed or limited by

Other levels

GitHub Docs: Repository permissions for "Contents"