You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
release workflow: the cut job can't pull a private GHCR base with the run's token (packages scope dropped) #5486
A release.images base in a private GHCR package can't be pulled with the run's own token, because the dispatched cut job never gets packages: read, even when release.workflow.permissions asks for it.
Found while proving #5457 against ghcr.io (epic #5452), at @intentius/chant 0.124.116.
with FROM ghcr.io/<org>/base:1@sha256:..., a private package of the same repository. chant release workflow renders:
the cut job's permissions: without packages (jobPermissions in workspace/release-workflow.ts skips packages for the cut: "The cut never takes packages");
the publish job's packages: read, which replaces the packages: write the ghcr.io target adds, so the push would then fail.
The cut's docker login ghcr.io succeeds and the build fails:
#3 ERROR: unexpected status from HEAD request to https://ghcr.io/v2/<org>/base/blobs/sha256:...: 403 Forbidden
denied: installation not allowed to Read organization package
Expected
docs/.../cli/release/workflow.mdx says "A scope from permissions goes to the cut and the publish job". Either:
the cut takes packages: read (never write) from permissions, or when a pull entry names ghcr.io with the run's token; or
the docs say the cut never gets packages, so a private GHCR base needs a pull token in secrets, and the doctor or the render warns when a pull entry on ghcr.io reads github.token.
A packages: read from permissions should not lower the publish job's packages: write either, or the render should refuse it.
Activity