Open
Description
A common workflow is:
$ ko build --image-refs /tmp/refs
$ cat /tmp/refs | xargs cosign sign
This is almost good: it avoids signing tags (#2047). But unfortunately those image refs are computed after a roundtrip to the registry, meaning that you (1) built something, (2) sent it to a third party, and (3) signed something that the third party sent back to you. (Same is true for docker build
.)
Ideally, you'd sign something that you built directly. But OCI makes this hard! You don't know the hash of the thing you're signing until you upload it (unless you use layouts).
We need to do a few things here:
- Docs and education: make sure folks understand that, mostly for the OCI use case.
- Try to get upstream tools to not have this problem, by producing OCI layouts: track bugs against ko (Signing built images ko-build/ko#357) etc.
-
cosign
payloads contain a "docker-reference" field which has something likegcr.io/foo:latest
; this payload changes when moving an image fromlocalhost
togcr.io
. We should allow users to set this as the ultimate target? Or maybe not have the docker-reference at all, I'm not sure. - Making
cosign sign
of layouts idiomatic (I don't know all the details here)
Activity