Merge pull request #1475 from jedevc/attest-warn-duplicate

buildflags: error on duplicate attest field
This commit is contained in:
Tõnis Tiigi
2022-12-15 11:07:47 -08:00
committed by GitHub

View File

@@ -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 {