Populate attestation for Docker images via OCI Referrers API (GCR/AR)
#44637
kornelwencek-esky
started this conversation in
Suggest an Idea
Replies: 1 comment 2 replies
|
I think generally this is OK, however:
|
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Tell us more.
We run an attestation pipeline on Google Artifact Registry (Binary
Authorization): each attested digest gets an AR "attachment", reachable via
the standard OCI 1.1 Distribution Spec Referrers API
(
GET /v2/<name>/referrers/<digest>).Renovate's docker datasource reads AR directly, so it proposes bumps to
whatever tag/digest exists there — regardless of whether it's actually
attested. We hit this concretely: a Renovate-triggered CI build on an open,
unmerged PR pushed a real digest to AR before attestation ran; a downstream
Renovate instance picked up that unattested digest and opened a PR for it.
This is the same shape as #37258 / #37268 (npm losing
dist.attestations),which added a generic
attestation?: booleanfield toReleaseplus aPR-body warning — already datasource-agnostic, it just needs
dockertopopulate
release.attestationtoo.I have a draft implementation that checks referrers only for the latest
tag (mirrors the existing sourceUrl/gitRef label lookup, one extra request
scoped to latest), is presence-based (any referrer counts, not filtered by
artifactType), is scoped to Google Container/Artifact Registry for now,and is gated behind an opt-in
RENOVATE_X_DOCKER_CHECK_REFERRERSflag.Before opening a PR, feedback welcome on:
warning to actually fire on upgrade)? Would require passing current-value
context into
getReleases(), which it doesn't get today.artifactType(cosign/in-toto/SLSA)?registry from the start?
tag?
Happy to open a draft PR with what I have once there's rough agreement on
direction.
Edit:
PR Draft: #44642
All reactions