Skip to content

Commit

Permalink
JH: Add resign build_from image
Browse files Browse the repository at this point in the history
  • Loading branch information
adeepn committed Aug 20, 2023
1 parent d3d61d1 commit 60750dd
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,14 @@ function run_build() {

# Validate the base image
if ! cosign_verify "${cosign_base_issuer}" "${cosign_base_identity}" "${build_from}" "${docker_platform}" "true"; then
bashio::exit.nok "Invalid base image ${build_from}"

bashio::log.warning "Validation of base image ${build_from} fails (cosign)!"
cosign_sign "${build_from}"
if bashio::var.false "${success}"; then
bashio::log.info "Failed to resign the base image ${build_from} (cosign)"
bashio::exit.nok "Invalid base image ${build_from}"
fi
bashio::log.info "Signed ${image} with ${trust} (cosign)"
fi

# Arch specific Dockerfile
Expand Down

0 comments on commit 60750dd

Please sign in to comment.