← All permissions
Repository permission·packages:write
Packages: Write
Tier 1 · High
Why Tier 1
Publishes, deletes and restores package versions. Only the GITHUB_TOKEN has it: a workflow reaches a package linked to its repository, or one that gave the repository Actions access; Maven and Gradle packages always follow the repository. Whatever is published is pulled by everyone who depends on it.
Data plane permissions start at Tier 2. This one is raised for the reason above.
- Target
- Repository
- Plane
- DataReleases and packages: Packages, attestations and artifact metadata.
- Granted by
- GITHUB_TOKEN
- Available on
- Every setup
- In a workflow
permissions: packages: writeWorkflow scopes by tier
Roles that include it
- T0OwnerThe organization and every repository in it
- T0All-repository adminEvery repository in the organization
- T1WriteOne repository
- T1MaintainOne repository
- T1AdminOne repository
- T1Collaborator on a personal repositoryOne repository owned by a personal account
- T1All-repository writeEvery repository in the organization
- T1All-repository maintainEvery repository in the organization
Classic scopes that reach it
- T1write:packagesstated by GitHub
- T2delete:packagesstated by GitHub(in part: Deleting packages, not publishing them.)
Attack paths
Techniques it enables
- Publish a malicious version with a stolen token Poison the build or published package
Reached through
- Start a privileged publish job by hand · from Actions: Write
- Poison a cache the release build restores · from Code running in a workflow on the default branch, such as a pull_request_target job that checks out the pull request. A pull_request run from a fork cannot do it: its caches are scoped to the pull request.
Fixed or limited by
- Adopt artifact attestations for build provenance on published binaries/images
- Write and rehearse a credential-rotation runbook before you need it
- Cloud credentials migrated from static keys to OIDC federation, scoped to repo + branch
- Put production secrets in environments with required reviewers
- Publish packages with trusted publishing (OIDC) instead of long-lived registry tokens