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
commit 53d88a79ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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 {