Skip to content

Commit

Permalink
Log cosign unavailable as warning
Browse files Browse the repository at this point in the history
Signed-off-by: Marco Franssen <marco.franssen@philips.com>
  • Loading branch information
marcofranssen committed Feb 14, 2022
1 parent dfdaf36 commit cdc0cb7
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions install-slsa-provenance.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ shopt -s expand_aliases
if [ -z "$NO_COLOR" ]; then
alias log_info="echo -e \"\033[1;32mINFO\033[0m:\""
alias log_error="echo -e \"\033[1;31mERROR\033[0m:\""
alias log_warning="echo -e \"\033[1;33mWARN\033[0m:\""
else
alias log_info="echo \"INFO:\""
alias log_error="echo \"ERROR:\""
alias log_warning="echo \"WARN:\""
fi

set -e
Expand Down Expand Up @@ -76,9 +78,11 @@ if [ -x "$(command -v cosign)" ] ; then
cosign verify-blob --key cosign.pub --signature slsa-provenance.sig "${ARCHIVE}"
rm slsa-provenance.sig cosign.pub
else
log_error >&2
log_error " cosign binary not installed in PATH. Unable to verify signature" >&2
log_error >&2
log_warning >&2
log_warning " cosign binary not installed in PATH. Unable to verify signature!" >&2
log_warning >&2
log_warning " Consider installing cosign first, to be able to verify the signature!" >&2
log_warning >&2
fi

log_info "extracting ${BINARY} from ${ARCHIVE}"
Expand Down

0 comments on commit cdc0cb7

Please sign in to comment.