diff --git a/go.mod b/go.mod index 86c43574..2bd8819b 100644 --- a/go.mod +++ b/go.mod @@ -30,7 +30,7 @@ require ( github.com/spf13/pflag v1.0.6-0.20201009195203-85dd5c8bc61c github.com/spf13/viper v1.16.0 github.com/stretchr/testify v1.8.4 - go.mondoo.com/cnquery v0.0.0-20231002111758-82a0179e7dbd + go.mondoo.com/cnquery v0.0.0-20231003111545-2bdc01cb42e5 go.mondoo.com/ranger-rpc v0.5.1 go.opentelemetry.io/otel v1.19.0 golang.org/x/sync v0.3.0 // indirect diff --git a/go.sum b/go.sum index afebd9ba..f76f7282 100644 --- a/go.sum +++ b/go.sum @@ -923,8 +923,8 @@ gitlab.com/bosi/decorder v0.4.1 h1:VdsdfxhstabyhZovHafFw+9eJ6eU0d2CkFNJcZz/NU4= gitlab.com/bosi/decorder v0.4.1/go.mod h1:jecSqWUew6Yle1pCr2eLWTensJMmsxHsBwt+PVbkAqA= go-simpler.org/assert v0.6.0 h1:QxSrXa4oRuo/1eHMXSBFHKvJIpWABayzKldqZyugG7E= go-simpler.org/assert v0.6.0/go.mod h1:74Eqh5eI6vCK6Y5l3PI8ZYFXG4Sa+tkr70OIPJAUr28= -go.mondoo.com/cnquery v0.0.0-20231002111758-82a0179e7dbd h1:61ziiW1w0vR+004KFqgzp5JG8QlsS5NMnU4FkH2bjOk= -go.mondoo.com/cnquery v0.0.0-20231002111758-82a0179e7dbd/go.mod h1:CyLGmRezek/8PswuVkmSLLScZqpMbACwFqL21eGeyYU= +go.mondoo.com/cnquery v0.0.0-20231003111545-2bdc01cb42e5 h1:BIsAK2L4e09WoDArcGhe3h7uT2rCZISxqFXG4FdygVA= +go.mondoo.com/cnquery v0.0.0-20231003111545-2bdc01cb42e5/go.mod h1:CyLGmRezek/8PswuVkmSLLScZqpMbACwFqL21eGeyYU= go.mondoo.com/ranger-rpc v0.5.1 h1:OaVQntDJWDRgbc9nXBP4wOCR9h9Bij8LgHHs86IguGk= go.mondoo.com/ranger-rpc v0.5.1/go.mod h1:3YKcqFrlPgaB4FZ4EoLgdmRtwMQdO7RoAkZYFn+F1eY= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= diff --git a/policy/scan/local_scanner.go b/policy/scan/local_scanner.go index ee535586..23a4576c 100644 --- a/policy/scan/local_scanner.go +++ b/policy/scan/local_scanner.go @@ -277,7 +277,7 @@ func (s *LocalScanner) distributeJob(job *Job, ctx context.Context, upstream *up for i := range assetCandidates { candidate := assetCandidates[i] - runtime, err := providers.Coordinator.RuntimeFor(candidate.asset, candidate.runtime) + runtime, err := providers.Coordinator.EphemeralRuntimeFor(candidate.asset) if err != nil { return nil, false, err } @@ -320,6 +320,7 @@ func (s *LocalScanner) distributeJob(job *Job, ctx context.Context, upstream *up return nil, false, err } + inventory.DeprecatedV8CompatAssets(justAssets) resp, err := services.SynchronizeAssets(ctx, &policy.SynchronizeAssetsReq{ SpaceMrn: client.SpaceMrn, List: justAssets, @@ -419,7 +420,7 @@ func (s *LocalScanner) distributeJob(job *Job, ctx context.Context, upstream *up runtime: runtime, }) - // we don't need the runtime anymore, so close it + // shut down all ephemeral runtimes runtime.Close() } finished = true