diff --git a/build/build.go b/build/build.go index 58b75141..a94c8861 100644 --- a/build/build.go +++ b/build/build.go @@ -594,10 +594,10 @@ func toSolveOpt(ctx context.Context, node builder.Node, multiDriver bool, opt Op if v == nil { continue } - so.FrontendAttrs[k] = *v + so.FrontendAttrs["attest:"+k] = *v } } - if _, ok := opt.Attests["attest:provenance"]; !ok { + if _, ok := opt.Attests["provenance"]; !ok { so.FrontendAttrs["attest:provenance"] = "mode=min,inline-only=true" } diff --git a/util/buildflags/attests.go b/util/buildflags/attests.go index ab1b163a..40d27b84 100644 --- a/util/buildflags/attests.go +++ b/util/buildflags/attests.go @@ -28,14 +28,13 @@ func ParseAttests(in []string) (map[string]*string, error) { return nil, err } - k := "attest:" + attestType - if _, ok := out[k]; ok { + if _, ok := out[attestType]; ok { return nil, errors.Errorf("duplicate attestation field %s", attestType) } if enabled { - out[k] = &in + out[attestType] = &in } else { - out[k] = nil + out[attestType] = nil } } return out, nil