diff --git a/util/buildflags/attests.go b/util/buildflags/attests.go index b9aad1a2..ab1b163a 100644 --- a/util/buildflags/attests.go +++ b/util/buildflags/attests.go @@ -29,6 +29,9 @@ func ParseAttests(in []string) (map[string]*string, error) { } k := "attest:" + attestType + if _, ok := out[k]; ok { + return nil, errors.Errorf("duplicate attestation field %s", attestType) + } if enabled { out[k] = &in } else {