diff --git a/client/client_test.go b/client/client_test.go index 2d74b9d4c0fd..b04b7a76f6a1 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -2787,7 +2787,7 @@ func testSourceDateEpochClamp(t *testing.T, sb integration.Sandbox) { var bboxConfig []byte _, err = c.Build(sb.Context(), SolveOpt{}, "", func(ctx context.Context, c gateway.Client) (*gateway.Result, error) { - _, bboxConfig, err = c.ResolveImageConfig(ctx, "docker.io/library/busybox:latest", llb.ResolveImageConfigOpt{}) + _, _, bboxConfig, err = c.ResolveImageConfig(ctx, "docker.io/library/busybox:latest", llb.ResolveImageConfigOpt{}) if err != nil { return nil, err } @@ -9470,32 +9470,88 @@ func testSourcePolicy(t *testing.T, sb integration.Sandbox) { } t.Run("Frontend policies", func(t *testing.T) { - denied := "https://raw.githubusercontent.com/moby/buildkit/v0.10.1/README.md" - frontend := func(ctx context.Context, c gateway.Client) (*gateway.Result, error) { - st := llb.Image("busybox:1.34.1-uclibc").File( - llb.Copy(llb.HTTP(denied), - "README.md", "README.md")) - def, err := st.Marshal(sb.Context()) - if err != nil { - return nil, err + t.Run("deny http", func(t *testing.T) { + denied := "https://raw.githubusercontent.com/moby/buildkit/v0.10.1/README.md" + frontend := func(ctx context.Context, c gateway.Client) (*gateway.Result, error) { + st := llb.Image("busybox:1.34.1-uclibc").File( + llb.Copy(llb.HTTP(denied), + "README.md", "README.md")) + def, err := st.Marshal(sb.Context()) + if err != nil { + return nil, err + } + return c.Solve(ctx, gateway.SolveRequest{ + Definition: def.ToPB(), + SourcePolicies: []*sourcepolicypb.Policy{{ + Rules: []*sourcepolicypb.Rule{ + { + Action: sourcepolicypb.PolicyAction_DENY, + Selector: &sourcepolicypb.Selector{ + Identifier: denied, + }, + }, + }, + }}, + }) } - return c.Solve(ctx, gateway.SolveRequest{ - Definition: def.ToPB(), - SourcePolicies: []*sourcepolicypb.Policy{{ - Rules: []*sourcepolicypb.Rule{ - { - Action: sourcepolicypb.PolicyAction_DENY, - Selector: &sourcepolicypb.Selector{ - Identifier: denied, + + _, err = c.Build(sb.Context(), SolveOpt{}, "", frontend, nil) + require.ErrorContains(t, err, sourcepolicy.ErrSourceDenied.Error()) + }) + t.Run("resolve image config", func(t *testing.T) { + frontend := func(ctx context.Context, c gateway.Client) (*gateway.Result, error) { + const ( + origRef = "docker.io/library/busybox:1.34.1-uclibc" + updatedRef = "docker.io/library/busybox:latest" + ) + pol := []*sourcepolicypb.Policy{ + { + Rules: []*sourcepolicypb.Rule{ + { + Action: sourcepolicypb.PolicyAction_DENY, + Selector: &sourcepolicypb.Selector{ + Identifier: "*", + }, + }, + { + Action: sourcepolicypb.PolicyAction_ALLOW, + Selector: &sourcepolicypb.Selector{ + Identifier: "docker-image://" + updatedRef + "*", + }, + }, + { + Action: sourcepolicypb.PolicyAction_CONVERT, + Selector: &sourcepolicypb.Selector{ + Identifier: "docker-image://" + origRef, + }, + Updates: &sourcepolicypb.Update{ + Identifier: "docker-image://" + updatedRef, + }, }, }, }, - }}, - }) - } + } - _, err = c.Build(sb.Context(), SolveOpt{}, "", frontend, nil) - require.ErrorContains(t, err, sourcepolicy.ErrSourceDenied.Error()) + ref, dgst, _, err := c.ResolveImageConfig(ctx, origRef, llb.ResolveImageConfigOpt{ + SourcePolicies: pol, + }) + if err != nil { + return nil, err + } + require.Equal(t, updatedRef, ref) + st := llb.Image(ref + "@" + dgst.String()) + def, err := st.Marshal(sb.Context()) + if err != nil { + return nil, err + } + return c.Solve(ctx, gateway.SolveRequest{ + Definition: def.ToPB(), + SourcePolicies: pol, + }) + } + _, err = c.Build(sb.Context(), SolveOpt{}, "", frontend, nil) + require.NoError(t, err) + }) }) } diff --git a/client/llb/imagemetaresolver/resolver.go b/client/llb/imagemetaresolver/resolver.go index 7ce893c79143..8a3a62995493 100644 --- a/client/llb/imagemetaresolver/resolver.go +++ b/client/llb/imagemetaresolver/resolver.go @@ -70,11 +70,12 @@ type imageMetaResolver struct { } type resolveResult struct { + ref string config []byte dgst digest.Digest } -func (imr *imageMetaResolver) ResolveImageConfig(ctx context.Context, ref string, opt llb.ResolveImageConfigOpt) (digest.Digest, []byte, error) { +func (imr *imageMetaResolver) ResolveImageConfig(ctx context.Context, ref string, opt llb.ResolveImageConfigOpt) (string, digest.Digest, []byte, error) { imr.locker.Lock(ref) defer imr.locker.Unlock(ref) @@ -86,16 +87,16 @@ func (imr *imageMetaResolver) ResolveImageConfig(ctx context.Context, ref string k := imr.key(ref, platform) if res, ok := imr.cache[k]; ok { - return res.dgst, res.config, nil + return res.ref, res.dgst, res.config, nil } - dgst, config, err := imageutil.Config(ctx, ref, imr.resolver, imr.buffer, nil, platform) + ref, dgst, config, err := imageutil.Config(ctx, ref, imr.resolver, imr.buffer, nil, platform, opt.SourcePolicies) if err != nil { - return "", nil, err + return "", "", nil, err } - imr.cache[k] = resolveResult{dgst: dgst, config: config} - return dgst, config, nil + imr.cache[k] = resolveResult{dgst: dgst, config: config, ref: ref} + return ref, dgst, config, nil } func (imr *imageMetaResolver) key(ref string, platform *ocispecs.Platform) string { diff --git a/client/llb/resolver.go b/client/llb/resolver.go index b3b9cdf751c7..02644f62c78b 100644 --- a/client/llb/resolver.go +++ b/client/llb/resolver.go @@ -3,6 +3,7 @@ package llb import ( "context" + spb "github.com/moby/buildkit/sourcepolicy/pb" digest "github.com/opencontainers/go-digest" ocispecs "github.com/opencontainers/image-spec/specs-go/v1" ) @@ -31,7 +32,7 @@ func WithLayerLimit(l int) ImageOption { // ImageMetaResolver can resolve image config metadata from a reference type ImageMetaResolver interface { - ResolveImageConfig(ctx context.Context, ref string, opt ResolveImageConfigOpt) (digest.Digest, []byte, error) + ResolveImageConfig(ctx context.Context, ref string, opt ResolveImageConfigOpt) (string, digest.Digest, []byte, error) } type ResolverType int @@ -49,6 +50,8 @@ type ResolveImageConfigOpt struct { LogName string Store ResolveImageConfigOptStore + + SourcePolicies []*spb.Policy } type ResolveImageConfigOptStore struct { diff --git a/client/llb/resolver_test.go b/client/llb/resolver_test.go index 9771ce1aaf6d..49aaf177b99d 100644 --- a/client/llb/resolver_test.go +++ b/client/llb/resolver_test.go @@ -74,7 +74,7 @@ type testResolver struct { platform string } -func (r *testResolver) ResolveImageConfig(ctx context.Context, ref string, opt ResolveImageConfigOpt) (digest.Digest, []byte, error) { +func (r *testResolver) ResolveImageConfig(ctx context.Context, ref string, opt ResolveImageConfigOpt) (string, digest.Digest, []byte, error) { var img struct { Config struct { Env []string `json:"Env,omitempty"` @@ -92,7 +92,7 @@ func (r *testResolver) ResolveImageConfig(ctx context.Context, ref string, opt R dt, err := json.Marshal(img) if err != nil { - return "", nil, errors.WithStack(err) + return "", "", nil, errors.WithStack(err) } - return r.digest, dt, nil + return ref, r.digest, dt, nil } diff --git a/client/llb/source.go b/client/llb/source.go index 107afbdac497..fa1096a67c23 100644 --- a/client/llb/source.go +++ b/client/llb/source.go @@ -135,7 +135,7 @@ func Image(ref string, opts ...ImageOption) State { if p == nil { p = c.Platform } - _, dt, err := info.metaResolver.ResolveImageConfig(ctx, ref, ResolveImageConfigOpt{ + _, _, dt, err := info.metaResolver.ResolveImageConfig(ctx, ref, ResolveImageConfigOpt{ Platform: p, ResolveMode: info.resolveMode.String(), ResolverType: ResolverTypeRegistry, @@ -151,7 +151,7 @@ func Image(ref string, opts ...ImageOption) State { if p == nil { p = c.Platform } - dgst, dt, err := info.metaResolver.ResolveImageConfig(context.TODO(), ref, ResolveImageConfigOpt{ + ref, dgst, dt, err := info.metaResolver.ResolveImageConfig(context.TODO(), ref, ResolveImageConfigOpt{ Platform: p, ResolveMode: info.resolveMode.String(), ResolverType: ResolverTypeRegistry, @@ -159,6 +159,10 @@ func Image(ref string, opts ...ImageOption) State { if err != nil { return State{}, err } + r, err := reference.ParseNormalizedNamed(ref) + if err != nil { + return State{}, err + } if dgst != "" { r, err = reference.WithDigest(r, dgst) if err != nil { diff --git a/frontend/attestations/sbom/sbom.go b/frontend/attestations/sbom/sbom.go index 118289a234ba..c52229c2843c 100644 --- a/frontend/attestations/sbom/sbom.go +++ b/frontend/attestations/sbom/sbom.go @@ -38,7 +38,7 @@ func CreateSBOMScanner(ctx context.Context, resolver llb.ImageMetaResolver, scan return nil, nil } - _, dt, err := resolver.ResolveImageConfig(ctx, scanner, resolveOpt) + scanner, _, dt, err := resolver.ResolveImageConfig(ctx, scanner, resolveOpt) if err != nil { return nil, err } diff --git a/frontend/dockerfile/dockerfile2llb/convert.go b/frontend/dockerfile/dockerfile2llb/convert.go index c6ce89585ea5..26996c81df71 100644 --- a/frontend/dockerfile/dockerfile2llb/convert.go +++ b/frontend/dockerfile/dockerfile2llb/convert.go @@ -401,15 +401,23 @@ func toDispatchState(ctx context.Context, dt []byte, opt ConvertOpt) (*dispatchS prefix += platforms.Format(*platform) + " " } prefix += "internal]" - dgst, dt, err := metaResolver.ResolveImageConfig(ctx, d.stage.BaseName, llb.ResolveImageConfigOpt{ - Platform: platform, - ResolveMode: opt.ImageResolveMode.String(), - LogName: fmt.Sprintf("%s load metadata for %s", prefix, d.stage.BaseName), - ResolverType: llb.ResolverTypeRegistry, + mutRef, dgst, dt, err := metaResolver.ResolveImageConfig(ctx, d.stage.BaseName, llb.ResolveImageConfigOpt{ + Platform: platform, + ResolveMode: opt.ImageResolveMode.String(), + LogName: fmt.Sprintf("%s load metadata for %s", prefix, d.stage.BaseName), + ResolverType: llb.ResolverTypeRegistry, + SourcePolicies: nil, }) if err != nil { return suggest.WrapError(errors.Wrap(err, origName), origName, append(allStageNames, commonImageNames()...), true) } + + if ref.String() != mutRef { + ref, err = reference.ParseNormalizedNamed(mutRef) + if err != nil { + return errors.Wrapf(err, "failed to parse ref %q", mutRef) + } + } var img image.Image if err := json.Unmarshal(dt, &img); err != nil { return errors.Wrap(err, "failed to parse image config") diff --git a/frontend/dockerui/namedcontext.go b/frontend/dockerui/namedcontext.go index 64fc6cacccc2..6a441c50822e 100644 --- a/frontend/dockerui/namedcontext.go +++ b/frontend/dockerui/namedcontext.go @@ -13,25 +13,36 @@ import ( "github.com/moby/buildkit/exporter/containerimage/image" "github.com/moby/buildkit/frontend/dockerfile/dockerignore" "github.com/moby/buildkit/frontend/gateway/client" + "github.com/moby/buildkit/util/imageutil" "github.com/pkg/errors" ) const ( contextPrefix = "context:" inputMetadataPrefix = "input-metadata:" + maxContextRecursion = 10 ) func (bc *Client) namedContext(ctx context.Context, name string, nameWithPlatform string, opt ContextOpt) (*llb.State, *image.Image, error) { + return bc.namedContextRecursive(ctx, name, nameWithPlatform, opt, 0) +} + +func (bc *Client) namedContextRecursive(ctx context.Context, name string, nameWithPlatform string, opt ContextOpt, count int) (*llb.State, *image.Image, error) { opts := bc.bopts.Opts v, ok := opts[contextPrefix+nameWithPlatform] if !ok { return nil, nil, nil } + if count > maxContextRecursion { + return nil, nil, errors.New("context recursion limit exceeded; this may indicate a cycle in the provided source policies: " + v) + } + vv := strings.SplitN(v, ":", 2) if len(vv) != 2 { return nil, nil, errors.Errorf("invalid context specifier %s for %s", v, nameWithPlatform) } + // allow git@ without protocol for SSH URLs for backwards compatibility if strings.HasPrefix(vv[0], "git@") { vv[0] = "git" @@ -58,15 +69,20 @@ func (bc *Client) namedContext(ctx context.Context, name string, nameWithPlatfor named = reference.TagNameOnly(named) - dgst, data, err := bc.client.ResolveImageConfig(ctx, named.String(), llb.ResolveImageConfigOpt{ + ref, dgst, data, err := bc.client.ResolveImageConfig(ctx, named.String(), llb.ResolveImageConfigOpt{ Platform: opt.Platform, ResolveMode: opt.ResolveMode, LogName: fmt.Sprintf("[context %s] load metadata for %s", nameWithPlatform, ref), ResolverType: llb.ResolverTypeRegistry, }) if err != nil { + e := &imageutil.ResolveToNonImageError{} + if errors.As(err, &e) { + return bc.namedContextRecursive(ctx, e.Updated, name, opt, count+1) + } return nil, nil, err } + var img image.Image if err := json.Unmarshal(data, &img); err != nil { return nil, nil, err @@ -121,7 +137,8 @@ func (bc *Client) namedContext(ctx context.Context, name string, nameWithPlatfor return nil, nil, errors.Wrapf(err, "could not wrap %q with digest", name) } - dgst, data, err := bc.client.ResolveImageConfig(ctx, dummyRef.String(), llb.ResolveImageConfigOpt{ + // TODO: How should source policy be handled here with a dummy ref? + _, dgst, data, err := bc.client.ResolveImageConfig(ctx, dummyRef.String(), llb.ResolveImageConfigOpt{ Platform: opt.Platform, ResolveMode: opt.ResolveMode, LogName: fmt.Sprintf("[context %s] load metadata for %s", nameWithPlatform, dummyRef.String()), diff --git a/frontend/frontend.go b/frontend/frontend.go index 024ac802045c..fb89a8414afa 100644 --- a/frontend/frontend.go +++ b/frontend/frontend.go @@ -22,7 +22,7 @@ type Frontend interface { type FrontendLLBBridge interface { Solve(ctx context.Context, req SolveRequest, sid string) (*Result, error) - ResolveImageConfig(ctx context.Context, ref string, opt llb.ResolveImageConfigOpt) (digest.Digest, []byte, error) + ResolveImageConfig(ctx context.Context, ref string, opt llb.ResolveImageConfigOpt) (string, digest.Digest, []byte, error) Warn(ctx context.Context, dgst digest.Digest, msg string, opts WarnOpts) error } diff --git a/frontend/gateway/client/client.go b/frontend/gateway/client/client.go index 005d2134ba7d..23585de9078e 100644 --- a/frontend/gateway/client/client.go +++ b/frontend/gateway/client/client.go @@ -27,7 +27,7 @@ func NewResult() *Result { type Client interface { Solve(ctx context.Context, req SolveRequest) (*Result, error) - ResolveImageConfig(ctx context.Context, ref string, opt llb.ResolveImageConfigOpt) (digest.Digest, []byte, error) + ResolveImageConfig(ctx context.Context, ref string, opt llb.ResolveImageConfigOpt) (string, digest.Digest, []byte, error) BuildOpts() BuildOpts Inputs(ctx context.Context) (map[string]llb.State, error) NewContainer(ctx context.Context, req NewContainerRequest) (Container, error) diff --git a/frontend/gateway/gateway.go b/frontend/gateway/gateway.go index db4b1db82fb5..eb1fb2a2b05e 100644 --- a/frontend/gateway/gateway.go +++ b/frontend/gateway/gateway.go @@ -164,10 +164,16 @@ func (gf *gatewayFrontend) Solve(ctx context.Context, llbBridge frontend.Fronten return nil, err } - dgst, config, err := llbBridge.ResolveImageConfig(ctx, reference.TagNameOnly(sourceRef).String(), llb.ResolveImageConfigOpt{}) + ref, dgst, config, err := llbBridge.ResolveImageConfig(ctx, reference.TagNameOnly(sourceRef).String(), llb.ResolveImageConfigOpt{}) if err != nil { return nil, err } + + sourceRef, err = reference.ParseNormalizedNamed(ref) + if err != nil { + return nil, err + } + mfstDigest = dgst if err := json.Unmarshal(config, &img); err != nil { @@ -563,7 +569,7 @@ func (lbf *llbBridgeForwarder) ResolveImageConfig(ctx context.Context, req *pb.R OSFeatures: p.OSFeatures, } } - dgst, dt, err := lbf.llbBridge.ResolveImageConfig(ctx, req.Ref, llb.ResolveImageConfigOpt{ + ref, dgst, dt, err := lbf.llbBridge.ResolveImageConfig(ctx, req.Ref, llb.ResolveImageConfigOpt{ ResolverType: llb.ResolverType(req.ResolverType), Platform: platform, ResolveMode: req.ResolveMode, @@ -572,11 +578,13 @@ func (lbf *llbBridgeForwarder) ResolveImageConfig(ctx context.Context, req *pb.R SessionID: req.SessionID, StoreID: req.StoreID, }, + SourcePolicies: req.SourcePolicies, }) if err != nil { return nil, err } return &pb.ResolveImageConfigResponse{ + Ref: ref, Digest: dgst, Config: dt, }, nil diff --git a/frontend/gateway/grpcclient/client.go b/frontend/gateway/grpcclient/client.go index b13002b03f58..524b3ba2a966 100644 --- a/frontend/gateway/grpcclient/client.go +++ b/frontend/gateway/grpcclient/client.go @@ -478,7 +478,7 @@ func (c *grpcClient) Solve(ctx context.Context, creq client.SolveRequest) (res * return res, nil } -func (c *grpcClient) ResolveImageConfig(ctx context.Context, ref string, opt llb.ResolveImageConfigOpt) (digest.Digest, []byte, error) { +func (c *grpcClient) ResolveImageConfig(ctx context.Context, ref string, opt llb.ResolveImageConfigOpt) (string, digest.Digest, []byte, error) { var p *opspb.Platform if platform := opt.Platform; platform != nil { p = &opspb.Platform{ @@ -489,19 +489,27 @@ func (c *grpcClient) ResolveImageConfig(ctx context.Context, ref string, opt llb OSFeatures: platform.OSFeatures, } } + resp, err := c.client.ResolveImageConfig(ctx, &pb.ResolveImageConfigRequest{ - ResolverType: int32(opt.ResolverType), - Ref: ref, - Platform: p, - ResolveMode: opt.ResolveMode, - LogName: opt.LogName, - SessionID: opt.Store.SessionID, - StoreID: opt.Store.StoreID, + ResolverType: int32(opt.ResolverType), + Ref: ref, + Platform: p, + ResolveMode: opt.ResolveMode, + LogName: opt.LogName, + SessionID: opt.Store.SessionID, + StoreID: opt.Store.StoreID, + SourcePolicies: opt.SourcePolicies, }) if err != nil { - return "", nil, err + return "", "", nil, err + } + newRef := resp.Ref + if newRef == "" { + // No ref returned, use the original one. + // This could occur if the version of buildkitd is too old. + newRef = ref } - return resp.Digest, resp.Config, nil + return newRef, resp.Digest, resp.Config, nil } func (c *grpcClient) BuildOpts() client.BuildOpts { diff --git a/frontend/gateway/pb/gateway.pb.go b/frontend/gateway/pb/gateway.pb.go index a660e101a79e..4849adeea9d3 100644 --- a/frontend/gateway/pb/gateway.pb.go +++ b/frontend/gateway/pb/gateway.pb.go @@ -736,16 +736,17 @@ func (m *InputsResponse) GetDefinitions() map[string]*pb.Definition { } type ResolveImageConfigRequest struct { - Ref string `protobuf:"bytes,1,opt,name=Ref,proto3" json:"Ref,omitempty"` - Platform *pb.Platform `protobuf:"bytes,2,opt,name=Platform,proto3" json:"Platform,omitempty"` - ResolveMode string `protobuf:"bytes,3,opt,name=ResolveMode,proto3" json:"ResolveMode,omitempty"` - LogName string `protobuf:"bytes,4,opt,name=LogName,proto3" json:"LogName,omitempty"` - ResolverType int32 `protobuf:"varint,5,opt,name=ResolverType,proto3" json:"ResolverType,omitempty"` - SessionID string `protobuf:"bytes,6,opt,name=SessionID,proto3" json:"SessionID,omitempty"` - StoreID string `protobuf:"bytes,7,opt,name=StoreID,proto3" json:"StoreID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Ref string `protobuf:"bytes,1,opt,name=Ref,proto3" json:"Ref,omitempty"` + Platform *pb.Platform `protobuf:"bytes,2,opt,name=Platform,proto3" json:"Platform,omitempty"` + ResolveMode string `protobuf:"bytes,3,opt,name=ResolveMode,proto3" json:"ResolveMode,omitempty"` + LogName string `protobuf:"bytes,4,opt,name=LogName,proto3" json:"LogName,omitempty"` + ResolverType int32 `protobuf:"varint,5,opt,name=ResolverType,proto3" json:"ResolverType,omitempty"` + SessionID string `protobuf:"bytes,6,opt,name=SessionID,proto3" json:"SessionID,omitempty"` + StoreID string `protobuf:"bytes,7,opt,name=StoreID,proto3" json:"StoreID,omitempty"` + SourcePolicies []*pb1.Policy `protobuf:"bytes,8,rep,name=SourcePolicies,proto3" json:"SourcePolicies,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *ResolveImageConfigRequest) Reset() { *m = ResolveImageConfigRequest{} } @@ -830,9 +831,17 @@ func (m *ResolveImageConfigRequest) GetStoreID() string { return "" } +func (m *ResolveImageConfigRequest) GetSourcePolicies() []*pb1.Policy { + if m != nil { + return m.SourcePolicies + } + return nil +} + type ResolveImageConfigResponse struct { Digest github_com_opencontainers_go_digest.Digest `protobuf:"bytes,1,opt,name=Digest,proto3,customtype=github.com/opencontainers/go-digest.Digest" json:"Digest"` Config []byte `protobuf:"bytes,2,opt,name=Config,proto3" json:"Config,omitempty"` + Ref string `protobuf:"bytes,3,opt,name=Ref,proto3" json:"Ref,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -878,6 +887,13 @@ func (m *ResolveImageConfigResponse) GetConfig() []byte { return nil } +func (m *ResolveImageConfigResponse) GetRef() string { + if m != nil { + return m.Ref + } + return "" +} + type SolveRequest struct { Definition *pb.Definition `protobuf:"bytes,1,opt,name=Definition,proto3" json:"Definition,omitempty"` Frontend string `protobuf:"bytes,2,opt,name=Frontend,proto3" json:"Frontend,omitempty"` @@ -2643,163 +2659,164 @@ func init() { func init() { proto.RegisterFile("gateway.proto", fileDescriptor_f1a937782ebbded5) } var fileDescriptor_f1a937782ebbded5 = []byte{ - // 2485 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x59, 0x4b, 0x6f, 0x1b, 0xc9, - 0xf1, 0xd7, 0x88, 0x14, 0x25, 0x16, 0x1f, 0xa2, 0x7b, 0xbd, 0xfb, 0xa7, 0x07, 0x0b, 0xaf, 0x3c, - 0x5e, 0x6b, 0x65, 0xd9, 0x4b, 0xfa, 0x2f, 0xdb, 0x90, 0x63, 0x27, 0xde, 0xb5, 0x5e, 0x90, 0xd6, - 0x92, 0xcd, 0xb4, 0x1c, 0x38, 0x58, 0x6c, 0x80, 0x8c, 0xc8, 0x26, 0x35, 0xf1, 0x68, 0x66, 0xd2, - 0xd3, 0x94, 0xac, 0xdd, 0x4b, 0x72, 0x08, 0x10, 0xec, 0x07, 0xc8, 0x6d, 0x2f, 0x09, 0x90, 0x53, - 0x0e, 0xc9, 0x07, 0x48, 0xce, 0x0b, 0x24, 0x87, 0x9c, 0x73, 0x58, 0x04, 0xfe, 0x02, 0xb9, 0x05, - 0xc8, 0x2d, 0xa8, 0xee, 0x1e, 0xb2, 0xf9, 0xd0, 0x88, 0x8a, 0x4f, 0xec, 0xae, 0xae, 0x47, 0x57, - 0x55, 0x57, 0xf5, 0xaf, 0x87, 0x50, 0xea, 0xb8, 0x82, 0x9d, 0xb8, 0xa7, 0xb5, 0x88, 0x87, 0x22, - 0x24, 0x57, 0x8e, 0xc2, 0x83, 0xd3, 0xda, 0x41, 0xd7, 0xf3, 0x5b, 0xaf, 0x3c, 0x51, 0x3b, 0xfe, - 0xff, 0x5a, 0x9b, 0x87, 0x81, 0x60, 0x41, 0xcb, 0xfe, 0xb8, 0xe3, 0x89, 0xc3, 0xee, 0x41, 0x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 0xb7, 0xaa, 0x76, 0xe7, 0x4f, 0x16, 0x94, 0x06, 0xd4, 0x93, 0x4f, - 0x07, 0x52, 0x75, 0x7b, 0xd2, 0x6d, 0x19, 0xc9, 0xfa, 0x0c, 0x72, 0x2d, 0xaf, 0xc3, 0x62, 0x21, - 0x53, 0x95, 0x5f, 0x5b, 0xf9, 0xf6, 0xbb, 0x0f, 0xa6, 0xfe, 0xf1, 0xdd, 0x07, 0xcb, 0xc6, 0x55, - 0x13, 0x46, 0x2c, 0x68, 0x86, 0x81, 0x70, 0xbd, 0x80, 0x71, 0xbc, 0x60, 0x3f, 0x56, 0x22, 0xb5, - 0x0d, 0xf9, 0x43, 0xb5, 0x06, 0x0c, 0x7a, 0xe0, 0x1e, 0x31, 0x99, 0xa7, 0x3c, 0x95, 0x63, 0x47, - 0x40, 0x89, 0x32, 0xd1, 0xe5, 0x01, 0x65, 0x3f, 0xef, 0x22, 0xd3, 0xf7, 0x92, 0x46, 0x22, 0x37, - 0x7d, 0x5e, 0x43, 0x47, 0x46, 0xaa, 0x05, 0xc8, 0x12, 0xcc, 0x30, 0xce, 0x43, 0xae, 0x8b, 0x87, - 0xd4, 0xd4, 0x55, 0x5f, 0xe3, 0x51, 0xb3, 0xb6, 0x2f, 0xaf, 0x7a, 0xaa, 0x18, 0x9c, 0x0a, 0x94, - 0x13, 0xab, 0x71, 0x14, 0x06, 0x31, 0x73, 0xe6, 0x31, 0x74, 0x51, 0x57, 0xc4, 0x7a, 0x1f, 0xce, - 0x5f, 0x2c, 0x28, 0x27, 0x14, 0xc5, 0x43, 0xbe, 0x80, 0x42, 0xbf, 0x35, 0x24, 0x3d, 0xe0, 0x61, - 0x6a, 0x50, 0x4d, 0x79, 0xa3, 0xaf, 0xe8, 0x96, 0x60, 0xaa, 0xb3, 0x9f, 0x41, 0x65, 0x98, 0x61, - 0x4c, 0xf6, 0x3f, 0x1c, 0x6c, 0x10, 0xc3, 0xfd, 0xca, 0x38, 0x0d, 0xff, 0xb2, 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d3, 0x67, 0x50, 0xc8, 0x6d, 0xb8, 0xe4, 0xfa, 0x7e, 0x78, 0xa2, 0x4b, - 0x4a, 0x16, 0x87, 0x4c, 0xce, 0x1c, 0x1d, 0x5d, 0xc0, 0x56, 0x69, 0x10, 0x9f, 0x70, 0xee, 0x9e, - 0xe2, 0x69, 0xca, 0x49, 0xfe, 0x71, 0x4b, 0xd8, 0xb5, 0xb6, 0xbc, 0xc0, 0xf5, 0xab, 0x20, 0x79, - 0xd4, 0x04, 0x4f, 0xc3, 0xe6, 0xeb, 0x28, 0xe4, 0x82, 0xf1, 0x27, 0x42, 0xf0, 0x6a, 0x41, 0x06, - 0x73, 0x80, 0x46, 0x1a, 0x50, 0x5c, 0x77, 0x9b, 0x87, 0x6c, 0xe7, 0x08, 0x89, 0x09, 0xb2, 0x4a, - 0xeb, 0x65, 0x92, 0xfd, 0x79, 0x64, 0x42, 0x2a, 0x53, 0x03, 0x69, 0x42, 0x39, 0x71, 0x5d, 0x55, - 0x68, 0xb5, 0x24, 0x75, 0x3e, 0xba, 0x68, 0x28, 0x95, 0xb4, 0x32, 0x31, 0xa4, 0x12, 0x13, 0xb9, - 0x89, 0xc5, 0xe8, 0x0a, 0x56, 0x2d, 0x4b, 0x9f, 0x7b, 0x73, 0xb2, 0x07, 0xe5, 0x7d, 0x09, 0xc8, - 0x1b, 0x08, 0xc3, 0x3d, 0x16, 0x57, 0xe7, 0xe5, 0x06, 0x6e, 0x8c, 0x6e, 0xc0, 0x04, 0xee, 0x35, - 0xc9, 0x7e, 0x4a, 0x87, 0x84, 0xed, 0xc7, 0x50, 0x19, 0x4e, 0xee, 0x45, 0x80, 0x91, 0xfd, 0x43, - 0x78, 0x67, 0x8c, 0x47, 0x6f, 0xd5, 0x7c, 0xfe, 0x68, 0xc1, 0xa5, 0x91, 0x34, 0xe0, 0x05, 0x20, - 0x8b, 0x5e, 0xa9, 0x94, 0x63, 0xb2, 0x07, 0x33, 0x98, 0xe6, 0x58, 0x43, 0x81, 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0xf2, 0x5b, 0x44, 0xfa, 0x6d, 0x66, 0x7c, 0x5a, 0xb4, 0x6f, 0x4e, 0xc0, - 0xd9, 0x57, 0xaf, 0xdf, 0xf1, 0x4b, 0x13, 0x7c, 0xdf, 0x3b, 0x5f, 0xfd, 0xd0, 0x97, 0xc4, 0x10, - 0x8a, 0x26, 0x54, 0x21, 0xb5, 0x14, 0xd1, 0x31, 0x08, 0xd0, 0xae, 0x4f, 0xcc, 0xaf, 0x0d, 0x7e, - 0x85, 0x8f, 0xb8, 0x41, 0x18, 0x43, 0x56, 0x52, 0xc3, 0x31, 0x16, 0x30, 0xd9, 0x77, 0x2f, 0x24, - 0xa3, 0x8d, 0xbb, 0x0a, 0x26, 0x69, 0x28, 0x44, 0xd2, 0x6f, 0xfd, 0x1e, 0x9c, 0xb2, 0x27, 0xe4, - 0x5b, 0xb2, 0xee, 0x58, 0x78, 0xce, 0x10, 0x3a, 0xa7, 0xea, 0x36, 0xde, 0x14, 0xa9, 0xe7, 0xcc, - 0xc4, 0xe0, 0x6b, 0xc5, 0x6f, 0xdf, 0x5c, 0xb5, 0xfe, 0xfe, 0xe6, 0xaa, 0xf5, 0xcf, 0x37, 0x57, - 0xad, 0x83, 0x9c, 0xfc, 0xc3, 0xf4, 0xee, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x99, 0x09, 0xbf, - 0xd6, 0xb9, 0x1e, 0x00, 0x00, + // 2497 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x59, 0xcf, 0x6f, 0x1b, 0xc7, + 0xf5, 0xd7, 0x8a, 0x14, 0x45, 0x3e, 0xfe, 0x10, 0x3d, 0x71, 0xf2, 0xa5, 0x17, 0x81, 0x23, 0xaf, + 0x63, 0x45, 0x96, 0x1d, 0xd2, 0x5f, 0xd9, 0x86, 0x5c, 0xbb, 0x75, 0x62, 0xfd, 0x82, 0x14, 0x4b, + 0x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69, 0x10, 0xbd, 0x62, 0x91, 0x12, 0xb8, 0x7b, 0xae, + 0x40, 0x97, 0xbb, 0x1e, 0x4a, 0xb5, 0xec, 0x30, 0x46, 0x23, 0xf8, 0xab, 0x84, 0x74, 0xb7, 0x79, + 0xe0, 0xbb, 0x31, 0x77, 0xdd, 0x8e, 0xdb, 0x68, 0xc7, 0x42, 0x46, 0x5a, 0x41, 0x27, 0x14, 0xfb, + 0xfd, 0x14, 0x17, 0xba, 0x51, 0x8b, 0x85, 0x81, 0xe7, 0xb6, 0xce, 0xd0, 0x86, 0x1c, 0x49, 0x31, + 0xeb, 0x6f, 0x59, 0xc8, 0x51, 0x16, 0x77, 0x3d, 0x4e, 0x96, 0xa0, 0x1c, 0xb1, 0xf6, 0x26, 0x0b, + 0x23, 0xd6, 0xb2, 0x39, 0x73, 0x6a, 0xc6, 0xa2, 0xb1, 0x5c, 0xd8, 0x99, 0xa1, 0x83, 0x64, 0xf2, + 0x13, 0xa8, 0x44, 0xac, 0x1d, 0x6b, 0x8c, 0xb3, 0x8b, 0xc6, 0x72, 0x71, 0xf5, 0x56, 0xfd, 0xdc, + 0x1c, 0xd6, 0x29, 0x6b, 0xef, 0xdb, 0x61, 0x5f, 0x64, 0x67, 0x86, 0x0e, 0x29, 0x21, 0xab, 0x90, + 0x89, 0x58, 0xbb, 0x96, 0x11, 0xba, 0xae, 0xa6, 0xeb, 0xda, 0x99, 0xa1, 0xc8, 0x4c, 0xd6, 0x20, + 0x8b, 0x5a, 0x6a, 0x59, 0x21, 0x74, 0xed, 0xc2, 0x0d, 0xec, 0xcc, 0x50, 0x21, 0x40, 0x9e, 0x42, + 0xfe, 0x98, 0x71, 0xdb, 0xb1, 0xb9, 0x5d, 0x83, 0xc5, 0xcc, 0x72, 0x71, 0xb5, 0x91, 0x2a, 0x8c, + 0x01, 0xaa, 0xef, 0x2b, 0x89, 0x2d, 0x9f, 0x47, 0x67, 0xb4, 0xa7, 0x80, 0xbc, 0x84, 0x92, 0xcd,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0x85, 0x14, 0x79, 0x08, 0x59, 0xec, 0x3c, 0x93, 0x74, 0x7f, 0x47, 0x93, 0x45, 0x19, + 0xb2, 0x2e, 0xbe, 0x1f, 0xba, 0x5f, 0x32, 0x95, 0xc1, 0xe5, 0xf4, 0x6b, 0xcb, 0xfd, 0x92, 0xf5, + 0x35, 0x28, 0x49, 0xb2, 0x85, 0xb0, 0xde, 0x8e, 0x38, 0x73, 0x54, 0x66, 0x6f, 0xa6, 0x81, 0x25, + 0xc9, 0xd9, 0xd7, 0x92, 0xc8, 0x62, 0x10, 0xb6, 0x5e, 0xbb, 0x5c, 0x55, 0x4a, 0x5a, 0x10, 0x90, + 0x4d, 0x73, 0x04, 0xa7, 0x28, 0xbd, 0x19, 0xf8, 0x32, 0xf3, 0xe9, 0xd2, 0xc8, 0xa6, 0x49, 0xe3, + 0x14, 0xc3, 0x70, 0xe0, 0x76, 0x10, 0x83, 0xe6, 0x2f, 0x0c, 0x83, 0x64, 0xd4, 0xc2, 0x20, 0x09, + 0xeb, 0xf3, 0x30, 0x27, 0x20, 0x92, 0xf5, 0x77, 0x03, 0x8a, 0x5a, 0x9e, 0x26, 0xa8, 0xc9, 0xf7, + 0x21, 0xbb, 0xcf, 0xc4, 0x37, 0x15, 0x34, 0x9e, 0x17, 0x15, 0xc9, 0xb8, 0x4d, 0x05, 0x15, 0x9b, + 0xca, 0xb6, 0x23, 0x1b, 0x66, 0x99, 0xe2, 0x10, 0x29, 0x2f, 0xf8, 0x99, 0x48, 0x59, 0x9e, 0xe2, + 0x90, 0xdc, 0x86, 0xfc, 0x01, 0x6b, 0x75, 0x23, 0x97, 0x9f, 0x89, 0x24, 0x54, 0x56, 0xab, 0xa2, + 0xd5, 0x28, 0x9a, 0x28, 0xdc, 0x1e, 0x07, 0xb9, 0x05, 0x85, 0x98, 0xb5, 0x22, 0xc6, 0x99, 0x7f, + 0xa2, 0xaa, 0xaa, 0xac, 0xd8, 0x23, 0xc6, 0xb7, 0xfc, 0x13, 0xda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, 0xc6, 0x02, 0x26, 0xf3, 0xee, 0x54, 0x32, 0xca, 0xb8, 0x2d, + 0x61, 0x92, 0x82, 0x42, 0x24, 0xfd, 0xd6, 0xef, 0xc1, 0x29, 0x73, 0x42, 0xbe, 0x65, 0xe3, 0x8e, + 0x81, 0xe7, 0x0c, 0xa1, 0x73, 0xaa, 0x6e, 0xed, 0x4d, 0x91, 0x7a, 0xce, 0x74, 0x0c, 0xbe, 0x5e, + 0xfa, 0xee, 0xcd, 0x55, 0xe3, 0x1f, 0x6f, 0xae, 0x1a, 0xff, 0x7a, 0x73, 0xd5, 0x38, 0xcc, 0x89, + 0x7f, 0x64, 0xef, 0xfe, 0x37, 0x00, 0x00, 0xff, 0xff, 0x20, 0x47, 0x7d, 0x27, 0x1a, 0x1f, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -4032,6 +4049,20 @@ func (m *ResolveImageConfigRequest) MarshalToSizedBuffer(dAtA []byte) (int, erro i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } + if len(m.SourcePolicies) > 0 { + for iNdEx := len(m.SourcePolicies) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SourcePolicies[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGateway(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + } + } if len(m.StoreID) > 0 { i -= len(m.StoreID) copy(dAtA[i:], m.StoreID) @@ -4111,6 +4142,13 @@ func (m *ResolveImageConfigResponse) MarshalToSizedBuffer(dAtA []byte) (int, err i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } + if len(m.Ref) > 0 { + i -= len(m.Ref) + copy(dAtA[i:], m.Ref) + i = encodeVarintGateway(dAtA, i, uint64(len(m.Ref))) + i-- + dAtA[i] = 0x1a + } if len(m.Config) > 0 { i -= len(m.Config) copy(dAtA[i:], m.Config) @@ -5997,6 +6035,12 @@ func (m *ResolveImageConfigRequest) Size() (n int) { if l > 0 { n += 1 + l + sovGateway(uint64(l)) } + if len(m.SourcePolicies) > 0 { + for _, e := range m.SourcePolicies { + l = e.Size() + n += 1 + l + sovGateway(uint64(l)) + } + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -6017,6 +6061,10 @@ func (m *ResolveImageConfigResponse) Size() (n int) { if l > 0 { n += 1 + l + sovGateway(uint64(l)) } + l = len(m.Ref) + if l > 0 { + n += 1 + l + sovGateway(uint64(l)) + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -8849,6 +8897,40 @@ func (m *ResolveImageConfigRequest) Unmarshal(dAtA []byte) error { } m.StoreID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SourcePolicies", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGateway + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGateway + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGateway + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SourcePolicies = append(m.SourcePolicies, &pb1.Policy{}) + if err := m.SourcePolicies[len(m.SourcePolicies)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGateway(dAtA[iNdEx:]) @@ -8966,6 +9048,38 @@ func (m *ResolveImageConfigResponse) Unmarshal(dAtA []byte) error { m.Config = []byte{} } iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ref", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGateway + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGateway + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGateway + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Ref = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGateway(dAtA[iNdEx:]) diff --git a/frontend/gateway/pb/gateway.proto b/frontend/gateway/pb/gateway.proto index b4ffd7863c87..c00d97391a43 100644 --- a/frontend/gateway/pb/gateway.proto +++ b/frontend/gateway/pb/gateway.proto @@ -11,6 +11,7 @@ import "github.com/tonistiigi/fsutil/types/stat.proto"; import "github.com/moby/buildkit/sourcepolicy/pb/policy.proto"; + option (gogoproto.sizer_all) = true; option (gogoproto.marshaler_all) = true; option (gogoproto.unmarshaler_all) = true; @@ -124,11 +125,13 @@ message ResolveImageConfigRequest { int32 ResolverType = 5; string SessionID = 6; string StoreID = 7; + repeated moby.buildkit.v1.sourcepolicy.Policy SourcePolicies = 8; } message ResolveImageConfigResponse { string Digest = 1 [(gogoproto.customtype) = "github.com/opencontainers/go-digest.Digest", (gogoproto.nullable) = false]; bytes Config = 2; + string Ref = 3; } message SolveRequest { diff --git a/solver/llbsolver/bridge.go b/solver/llbsolver/bridge.go index c34f8c061345..27dc133620f3 100644 --- a/solver/llbsolver/bridge.go +++ b/solver/llbsolver/bridge.go @@ -290,10 +290,10 @@ func (rp *resultProxy) Result(ctx context.Context) (res solver.CachedResult, err }) } -func (b *llbBridge) ResolveImageConfig(ctx context.Context, ref string, opt llb.ResolveImageConfigOpt) (dgst digest.Digest, config []byte, err error) { +func (b *llbBridge) ResolveImageConfig(ctx context.Context, ref string, opt llb.ResolveImageConfigOpt) (resolvedRef string, dgst digest.Digest, config []byte, err error) { w, err := b.resolveWorker() if err != nil { - return "", nil, err + return "", "", nil, err } if opt.LogName == "" { opt.LogName = fmt.Sprintf("resolve image config for %s", ref) @@ -304,11 +304,18 @@ func (b *llbBridge) ResolveImageConfig(ctx context.Context, ref string, opt llb. } else { id += platforms.Format(*platform) } + pol, err := loadSourcePolicy(b.builder) + if err != nil { + return "", "", nil, err + } + if pol != nil { + opt.SourcePolicies = append(opt.SourcePolicies, pol) + } err = inBuilderContext(ctx, b.builder, opt.LogName, id, func(ctx context.Context, g session.Group) error { - dgst, config, err = w.ResolveImageConfig(ctx, ref, opt, b.sm, g) + resolvedRef, dgst, config, err = w.ResolveImageConfig(ctx, ref, opt, b.sm, g) return err }) - return dgst, config, err + return resolvedRef, dgst, config, err } type lazyCacheManager struct { diff --git a/solver/llbsolver/provenance.go b/solver/llbsolver/provenance.go index 9f2fb9e29965..9138d6d9f88f 100644 --- a/solver/llbsolver/provenance.go +++ b/solver/llbsolver/provenance.go @@ -131,10 +131,10 @@ func (b *provenanceBridge) findByResult(rp solver.ResultProxy) (*resultWithBridg return nil, false } -func (b *provenanceBridge) ResolveImageConfig(ctx context.Context, ref string, opt llb.ResolveImageConfigOpt) (dgst digest.Digest, config []byte, err error) { - dgst, config, err = b.llbBridge.ResolveImageConfig(ctx, ref, opt) +func (b *provenanceBridge) ResolveImageConfig(ctx context.Context, ref string, opt llb.ResolveImageConfigOpt) (resolvedRef string, dgst digest.Digest, config []byte, err error) { + ref, dgst, config, err = b.llbBridge.ResolveImageConfig(ctx, ref, opt) if err != nil { - return "", nil, err + return "", "", nil, err } b.images = append(b.images, provenance.ImageSource{ @@ -143,7 +143,7 @@ func (b *provenanceBridge) ResolveImageConfig(ctx context.Context, ref string, o Digest: dgst, Local: opt.ResolverType == llb.ResolverTypeOCILayout, }) - return dgst, config, nil + return ref, dgst, config, nil } func (b *provenanceBridge) Solve(ctx context.Context, req frontend.SolveRequest, sid string) (res *frontend.Result, err error) { diff --git a/source/containerimage/pull.go b/source/containerimage/pull.go index 08b1bcc678bc..8792111aaa5d 100644 --- a/source/containerimage/pull.go +++ b/source/containerimage/pull.go @@ -61,6 +61,7 @@ type SourceOpt struct { } type resolveImageResult struct { + ref string dgst digest.Digest dt []byte } @@ -87,7 +88,7 @@ func (is *Source) ID() string { return srctypes.DockerImageScheme } -func (is *Source) ResolveImageConfig(ctx context.Context, ref string, opt llb.ResolveImageConfigOpt, sm *session.Manager, g session.Group) (digest.Digest, []byte, error) { +func (is *Source) ResolveImageConfig(ctx context.Context, ref string, opt llb.ResolveImageConfigOpt, sm *session.Manager, g session.Group) (string, digest.Digest, []byte, error) { key := ref if platform := opt.Platform; platform != nil { key += platforms.Format(*platform) @@ -102,7 +103,7 @@ func (is *Source) ResolveImageConfig(ctx context.Context, ref string, opt llb.Re case ResolverTypeRegistry: rm, err = source.ParseImageResolveMode(opt.ResolveMode) if err != nil { - return "", nil, err + return "", "", nil, err } rslvr = resolver.DefaultPool.GetResolver(is.RegistryHosts, ref, "pull", sm, g).WithImageStore(is.ImageStore, rm) case ResolverTypeOCILayout: @@ -111,16 +112,16 @@ func (is *Source) ResolveImageConfig(ctx context.Context, ref string, opt llb.Re } key += rm.String() res, err := is.g.Do(ctx, key, func(ctx context.Context) (*resolveImageResult, error) { - dgst, dt, err := imageutil.Config(ctx, ref, rslvr, is.ContentStore, is.LeaseManager, opt.Platform) + newRef, dgst, dt, err := imageutil.Config(ctx, ref, rslvr, is.ContentStore, is.LeaseManager, opt.Platform, opt.SourcePolicies) if err != nil { return nil, err } - return &resolveImageResult{dgst: dgst, dt: dt}, nil + return &resolveImageResult{dgst: dgst, dt: dt, ref: newRef}, nil }) if err != nil { - return "", nil, err + return "", "", nil, err } - return res.dgst, res.dt, nil + return res.ref, res.dgst, res.dt, nil } func (is *Source) Resolve(ctx context.Context, id source.Identifier, sm *session.Manager, vtx solver.Vertex) (source.SourceInstance, error) { diff --git a/sourcepolicy/engine.go b/sourcepolicy/engine.go index 829e8510650c..8515b276a416 100644 --- a/sourcepolicy/engine.go +++ b/sourcepolicy/engine.go @@ -7,6 +7,7 @@ import ( spb "github.com/moby/buildkit/sourcepolicy/pb" "github.com/moby/buildkit/util/bklog" "github.com/pkg/errors" + "github.com/sirupsen/logrus" ) var ( @@ -112,12 +113,20 @@ func (e *Engine) evaluatePolicies(ctx context.Context, srcOp *pb.SourceOp) (bool // // For Allow/Deny rules, the last matching rule wins. // E.g. `ALLOW foo; DENY foo` will deny `foo`, `DENY foo; ALLOW foo` will allow `foo`. -func (e *Engine) evaluatePolicy(ctx context.Context, pol *spb.Policy, srcOp *pb.SourceOp) (bool, error) { +func (e *Engine) evaluatePolicy(ctx context.Context, pol *spb.Policy, srcOp *pb.SourceOp) (retMut bool, retErr error) { ident := srcOp.GetIdentifier() - ctx = bklog.WithLogger(ctx, bklog.G(ctx).WithFields(map[string]interface{}{ - "ref": ident, - })) + ctx = bklog.WithLogger(ctx, bklog.G(ctx).WithField("ref", ident)) + defer func() { + if retMut || retErr != nil { + bklog.G(ctx).WithFields( + logrus.Fields{ + "mutated": retMut, + "updated": srcOp.GetIdentifier(), + logrus.ErrorKey: retErr, + }).Debug("Evaluated source policy") + } + }() var deny bool for _, rule := range pol.Rules { diff --git a/util/imageutil/config.go b/util/imageutil/config.go index d7bf6b6a1bf4..f183db5872b9 100644 --- a/util/imageutil/config.go +++ b/util/imageutil/config.go @@ -3,6 +3,8 @@ package imageutil import ( "context" "encoding/json" + "fmt" + "strings" "sync" "time" @@ -14,6 +16,10 @@ import ( "github.com/containerd/containerd/remotes" "github.com/containerd/containerd/remotes/docker" intoto "github.com/in-toto/in-toto-golang/in_toto" + "github.com/moby/buildkit/solver/pb" + srctypes "github.com/moby/buildkit/source/types" + "github.com/moby/buildkit/sourcepolicy" + spb "github.com/moby/buildkit/sourcepolicy/pb" "github.com/moby/buildkit/util/contentutil" "github.com/moby/buildkit/util/leaseutil" "github.com/moby/buildkit/util/resolver/limited" @@ -47,7 +53,17 @@ func AddLease(f func(context.Context) error) { leasesMu.Unlock() } -func Config(ctx context.Context, str string, resolver remotes.Resolver, cache ContentCache, leaseManager leases.Manager, p *ocispecs.Platform) (digest.Digest, []byte, error) { +// ResolveToNonImageError is returned by the resolver when the ref is mutated by policy to a non-image ref +type ResolveToNonImageError struct { + Ref string + Updated string +} + +func (e ResolveToNonImageError) Error() string { + return fmt.Sprintf("ref mutated by policy to non-image: %s://%s -> %s", srctypes.DockerImageScheme, e.Ref, e.Updated) +} + +func Config(ctx context.Context, str string, resolver remotes.Resolver, cache ContentCache, leaseManager leases.Manager, p *ocispecs.Platform, spls []*spb.Policy) (string, digest.Digest, []byte, error) { // TODO: fix buildkit to take interface instead of struct var platform platforms.MatchComparer if p != nil { @@ -57,13 +73,44 @@ func Config(ctx context.Context, str string, resolver remotes.Resolver, cache Co } ref, err := reference.Parse(str) if err != nil { - return "", nil, errors.WithStack(err) + return "", "", nil, errors.WithStack(err) + } + + op := &pb.Op{ + Op: &pb.Op_Source{ + Source: &pb.SourceOp{ + Identifier: srctypes.DockerImageScheme + "://" + ref.String(), + }, + }, + } + + mut, err := sourcepolicy.NewEngine(spls).Evaluate(ctx, op) + if err != nil { + return "", "", nil, errors.Wrap(err, "could not resolve image due to policy") + } + + if mut { + var ( + t string + ok bool + ) + t, newRef, ok := strings.Cut(op.GetSource().GetIdentifier(), "://") + if !ok { + return "", "", nil, errors.Errorf("could not parse ref: %s", op.GetSource().GetIdentifier()) + } + if ok && t != srctypes.DockerImageScheme { + return "", "", nil, &ResolveToNonImageError{Ref: str, Updated: newRef} + } + ref, err = reference.Parse(newRef) + if err != nil { + return "", "", nil, errors.WithStack(err) + } } if leaseManager != nil { ctx2, done, err := leaseutil.WithLease(ctx, leaseManager, leases.WithExpiration(5*time.Minute), leaseutil.MakeTemporary) if err != nil { - return "", nil, errors.WithStack(err) + return "", "", nil, errors.WithStack(err) } ctx = ctx2 defer func() { @@ -94,24 +141,25 @@ func Config(ctx context.Context, str string, resolver remotes.Resolver, cache Co if desc.MediaType == "" { _, desc, err = resolver.Resolve(ctx, ref.String()) if err != nil { - return "", nil, err + return "", "", nil, err } } fetcher, err := resolver.Fetcher(ctx, ref.String()) if err != nil { - return "", nil, err + return "", "", nil, err } if desc.MediaType == images.MediaTypeDockerSchema1Manifest { - return readSchema1Config(ctx, ref.String(), desc, fetcher, cache) + dgst, dt, err := readSchema1Config(ctx, ref.String(), desc, fetcher, cache) + return ref.String(), dgst, dt, err } children := childrenConfigHandler(cache, platform) dslHandler, err := docker.AppendDistributionSourceLabel(cache, ref.String()) if err != nil { - return "", nil, err + return "", "", nil, err } handlers := []images.Handler{ @@ -120,19 +168,19 @@ func Config(ctx context.Context, str string, resolver remotes.Resolver, cache Co children, } if err := images.Dispatch(ctx, images.Handlers(handlers...), nil, desc); err != nil { - return "", nil, err + return "", "", nil, err } config, err := images.Config(ctx, cache, desc, platform) if err != nil { - return "", nil, err + return "", "", nil, err } dt, err := content.ReadBlob(ctx, cache, config) if err != nil { - return "", nil, err + return "", "", nil, err } - return desc.Digest, dt, nil + return ref.String(), desc.Digest, dt, nil } func childrenConfigHandler(provider content.Provider, platform platforms.MatchComparer) images.HandlerFunc { diff --git a/worker/base/worker.go b/worker/base/worker.go index 13d3ac714e08..8d402ff2fb1b 100644 --- a/worker/base/worker.go +++ b/worker/base/worker.go @@ -362,7 +362,7 @@ func (w *Worker) PruneCacheMounts(ctx context.Context, ids []string) error { return nil } -func (w *Worker) ResolveImageConfig(ctx context.Context, ref string, opt llb.ResolveImageConfigOpt, sm *session.Manager, g session.Group) (digest.Digest, []byte, error) { +func (w *Worker) ResolveImageConfig(ctx context.Context, ref string, opt llb.ResolveImageConfigOpt, sm *session.Manager, g session.Group) (string, digest.Digest, []byte, error) { // is this an registry source? Or an OCI layout source? switch opt.ResolverType { case llb.ResolverTypeOCILayout: diff --git a/worker/worker.go b/worker/worker.go index d6bae6dfe729..d62047e9fb5f 100644 --- a/worker/worker.go +++ b/worker/worker.go @@ -30,7 +30,7 @@ type Worker interface { LoadRef(ctx context.Context, id string, hidden bool) (cache.ImmutableRef, error) // ResolveOp resolves Vertex.Sys() to Op implementation. ResolveOp(v solver.Vertex, s frontend.FrontendLLBBridge, sm *session.Manager) (solver.Op, error) - ResolveImageConfig(ctx context.Context, ref string, opt llb.ResolveImageConfigOpt, sm *session.Manager, g session.Group) (digest.Digest, []byte, error) + ResolveImageConfig(ctx context.Context, ref string, opt llb.ResolveImageConfigOpt, sm *session.Manager, g session.Group) (string, digest.Digest, []byte, error) DiskUsage(ctx context.Context, opt client.DiskUsageInfo) ([]*client.UsageInfo, error) Exporter(name string, sm *session.Manager) (exporter.Exporter, error) Prune(ctx context.Context, ch chan client.UsageInfo, opt ...client.PruneInfo) error