Add better error message for SLSA failures

This commit is contained in:
David Dworken 2024-03-24 14:34:54 -07:00
parent 5ca8c04b2d
commit ff01d6f818
No known key found for this signature in database

View File

@ -120,7 +120,7 @@ func HandleSlsaFailure(srcErr error) error {
if errors.Is(srcErr, errUserAbortUpdate) {
return srcErr
}
fmt.Printf("\nFailed to verify SLSA provenance! This is likely due to a SLSA bug (SLSA is a brand new standard, and like all new things, has bugs). Ignoring this failure means falling back to the way most software does updates. Do you want to ignore this failure and update anyways? [y/N]")
fmt.Printf("\nFailed to verify SLSA provenance due to err: %v\nThis is likely due to a SLSA bug (SLSA is a brand new standard, and like all new things, has bugs). Ignoring this failure means falling back to the way most software does updates. Do you want to ignore this failure and update anyways? [y/N]", srcErr)
reader := bufio.NewReader(os.Stdin)
resp, err := reader.ReadString('\n')
if err == nil && strings.TrimSpace(resp) == "y" {