From e401f52f6133e65e51e8cc90a6898e5a720b9a4a Mon Sep 17 00:00:00 2001 From: Preslav Gerchev Date: Thu, 24 Nov 2022 18:39:18 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8Add=20--asset-name=20flag=20for=20scan?= =?UTF-8?q?ning.=20(#210)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Follow-up to the cnquery changes, allows cnspec scanning to set the asset name. Signed-off-by: Preslav --- apps/cnspec/cmd/scan.go | 1 + go.mod | 2 +- go.sum | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/cnspec/cmd/scan.go b/apps/cnspec/cmd/scan.go index 395e8ca0..9dd53226 100644 --- a/apps/cnspec/cmd/scan.go +++ b/apps/cnspec/cmd/scan.go @@ -275,6 +275,7 @@ This example connects to Microsoft 365 using the PKCS #12 formatted certificate: cmd.Flags().Bool("ask-pass", false, "ask for connection password") cmd.Flags().StringP("identity-file", "i", "", "selects a file from which the identity (private key) for public key authentication is read") cmd.Flags().String("id-detector", "", "user-override for platform id detection mechanism, supported are "+strings.Join(providers.AvailablePlatformIdDetector(), ", ")) + cmd.Flags().String("asset-name", "", "user-override for the asset name") cmd.Flags().String("path", "", "path to a local file or directory that the connection should use") cmd.Flags().StringToString("option", nil, "addition connection options, multiple options can be passed in via --option key=value") diff --git a/go.mod b/go.mod index 6d81db7f..84f5f17d 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.14.0 github.com/stretchr/testify v1.8.1 - go.mondoo.com/cnquery v0.0.0-20221122123115-0d6924f00605 + go.mondoo.com/cnquery v0.0.0-20221124161103-60bf39b98583 go.mondoo.com/ranger-rpc v0.5.1-0.20220923135836-9e7732899d34 go.opentelemetry.io/otel v1.11.1 golang.org/x/sync v0.1.0 diff --git a/go.sum b/go.sum index 3c5167ae..66b6deaf 100644 --- a/go.sum +++ b/go.sum @@ -1313,8 +1313,8 @@ github.com/zclconf/go-cty v1.10.0 h1:mp9ZXQeIcN8kAwuqorjH+Q+njbJKjLrvB2yIh4q7U+0 github.com/zclconf/go-cty v1.10.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= gitlab.com/bosi/decorder v0.2.3 h1:gX4/RgK16ijY8V+BRQHAySfQAb354T7/xQpDB2n10P0= gitlab.com/bosi/decorder v0.2.3/go.mod h1:9K1RB5+VPNQYtXtTDAzd2OEftsZb1oV0IrJrzChSdGE= -go.mondoo.com/cnquery v0.0.0-20221122123115-0d6924f00605 h1:ewUbCuqNd9dpXuFaqzoLB+yIhU1yhEnWxIdQ6uci1Wo= -go.mondoo.com/cnquery v0.0.0-20221122123115-0d6924f00605/go.mod h1:MR/mjkXmbHtJKtZ5wl50zYfb0s8T5swjKOKESs3lf38= +go.mondoo.com/cnquery v0.0.0-20221124161103-60bf39b98583 h1:IRspRVQvgXg5wm8GMVm0clDG8tw131ES9NkEYcXka6o= +go.mondoo.com/cnquery v0.0.0-20221124161103-60bf39b98583/go.mod h1:MR/mjkXmbHtJKtZ5wl50zYfb0s8T5swjKOKESs3lf38= 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.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=