diff --git a/pkg/build/pipeline.go b/pkg/build/pipeline.go index 5b936d0ac..99d7bb8c0 100644 --- a/pkg/build/pipeline.go +++ b/pkg/build/pipeline.go @@ -145,11 +145,17 @@ func validateWith(data map[string]string, inputs map[string]config.Input) (map[s if !matchValidShaChars(data[k]) { return data, fmt.Errorf("checksum input %q for pipeline contains invalid characters", k) } + if len(data[k]) != 64 { + return data, fmt.Errorf("checksum input %q for pipeline, invalid length", k) + } } if k == "expected-sha512" && data[k] != "" { if !matchValidShaChars(data[k]) { return data, fmt.Errorf("checksum input %q for pipeline contains invalid characters", k) } + if len(data[k]) != 128 { + return data, fmt.Errorf("checksum input %q for pipeline, invalid length", k) + } } if v.Required && data[k] == "" {