Skip to content

Commit

Permalink
✨Add --asset-name flag for scanning. (#210)
Browse files Browse the repository at this point in the history
Follow-up to the cnquery changes, allows cnspec scanning to set the
asset name.

Signed-off-by: Preslav <[email protected]>
  • Loading branch information
preslavgerchev authored Nov 24, 2022
1 parent bea3383 commit e401f52
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions apps/cnspec/cmd/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down

0 comments on commit e401f52

Please sign in to comment.