buildflags: warn on duplicate attest field

Signed-off-by: Justin Chadwell <me@jedevc.com>
This commit is contained in:
Justin Chadwell 2022-12-15 15:39:19 +00:00
parent df8e7d0a9a
commit f992b77535
1 changed files with 3 additions and 0 deletions

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 {