@@ -164,6 +164,11 @@ script = [
# The real value, if the key is encrypted, must be present in the build
# environment.
#
+# COSIGN_YES answers the transparency-log consent prompt ("Are you sure you
+# would like to continue? [y/N]") that cosign shows before uploading to Rekor.
+# Without it the non-interactive autobuilder gets "user declined the prompt"
+# and the step fails. It covers both 'sign' and 'attest'.
+#
# sign_image() signs by digest ($2) so cosign does not warn about signing a
# mutable tag, while still pinning the index a consumer verifies. The digest
# MUST be the digest the tag resolves to:
@@ -196,6 +201,7 @@ sys.stdout.write(base64.b64decode(t).decode() if t else "")' "%s" "$_host")
done""" % (" ".join(registries), auth_config)
script += [
"export COSIGN_PASSWORD=\"${COSIGN_PASSWORD:-}\"",
+ "export COSIGN_YES=true",
"_COSIGN_READY=0",
"prepare_cosign() {",
" if [ \"$_COSIGN_READY\" = 1 ]; then return 0; fi",