diff --git a/apps/cnspec/cmd/vuln.go b/apps/cnspec/cmd/vuln.go index 43662f2b..14f679e8 100644 --- a/apps/cnspec/cmd/vuln.go +++ b/apps/cnspec/cmd/vuln.go @@ -200,6 +200,10 @@ scan be executed on an instance that is running inside of AWS.`, log.Fatal().Err(err).Msg("failed to prepare config") } + if conf.UpstreamConfig == nil { + log.Fatal().Msg("vulnerability scan requires authentication, future versions will not have this restriction, login with `cnspec login --token`") + } + ctx := discovery.InitCtx(context.Background()) log.Info().Msgf("discover related assets for %d asset(s)", len(conf.Inventory.Spec.Assets)) diff --git a/go.mod b/go.mod index 304572f0..f82e10d9 100644 --- a/go.mod +++ b/go.mod @@ -26,7 +26,7 @@ require ( github.com/spf13/pflag v1.0.6-0.20201009195203-85dd5c8bc61c github.com/spf13/viper v1.13.0 github.com/stretchr/testify v1.8.0 - go.mondoo.com/cnquery v0.0.0-20221022114011-d65565ff364b + go.mondoo.com/cnquery v0.0.0-20221023032627-fb3272efa0d3 go.mondoo.com/ranger-rpc v0.5.1-0.20220923135836-9e7732899d34 go.opentelemetry.io/otel v1.11.0 golang.org/x/sync v0.0.0-20220923202941-7f9b1623fab7 diff --git a/go.sum b/go.sum index 1d3e0ced..d17e5583 100644 --- a/go.sum +++ b/go.sum @@ -1567,8 +1567,8 @@ go.etcd.io/etcd v0.0.0-20200513171258-e048e166ab9c/go.mod h1:xCI7ZzBfRuGgBXyXO6y go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= -go.mondoo.com/cnquery v0.0.0-20221022114011-d65565ff364b h1:cYgdOkVGEbG6GPytRLe/d/q7lVNli1rQHCGxL4xo3jA= -go.mondoo.com/cnquery v0.0.0-20221022114011-d65565ff364b/go.mod h1:MuM8Xs1NGrthK/FFdcO6auvSqs0cZ8Wx8dpouQQJSiE= +go.mondoo.com/cnquery v0.0.0-20221023032627-fb3272efa0d3 h1:LyhOwvPvNrXVAGNtxV98jrKaomwgA3lp2nlTsX4rp1U= +go.mondoo.com/cnquery v0.0.0-20221023032627-fb3272efa0d3/go.mod h1:MuM8Xs1NGrthK/FFdcO6auvSqs0cZ8Wx8dpouQQJSiE= go.mondoo.com/ranger-rpc v0.5.1-0.20220923135836-9e7732899d34 h1:mtPZ1J+nRI/ivV+n41bjIwY6Rfxb2Jf49svZSQMGHIA= go.mondoo.com/ranger-rpc v0.5.1-0.20220923135836-9e7732899d34/go.mod h1:3YKcqFrlPgaB4FZ4EoLgdmRtwMQdO7RoAkZYFn+F1eY= go.mozilla.org/mozlog v0.0.0-20170222151521-4bb13139d403/go.mod h1:jHoPAGnDrCy6kaI2tAze5Prf0Nr0w/oNkROt2lw3n3o=