From 9a36fce08211b4d17af099b0514375c8cec394f7 Mon Sep 17 00:00:00 2001 From: Martin Angers Date: Thu, 7 Oct 2021 08:02:49 -0400 Subject: [PATCH] Enable vulnerability detection in fleetctl preview (#2376) --- changes/issue-2085-enable-vuln-detection | 1 + cmd/fleetctl/preview.go | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 changes/issue-2085-enable-vuln-detection diff --git a/changes/issue-2085-enable-vuln-detection b/changes/issue-2085-enable-vuln-detection new file mode 100644 index 0000000000..5c513d2193 --- /dev/null +++ b/changes/issue-2085-enable-vuln-detection @@ -0,0 +1 @@ +* Enable vulnerability detection in `fleetctl preview`. diff --git a/cmd/fleetctl/preview.go b/cmd/fleetctl/preview.go index 6dc48e4355..fc4d6f8db7 100644 --- a/cmd/fleetctl/preview.go +++ b/cmd/fleetctl/preview.go @@ -198,6 +198,12 @@ Use the stop and reset subcommands to manage the server and dependencies once st return errors.Wrap(err, "failed to apply standard query library") } + if err := client.ApplyAppConfig(map[string]map[string]bool{ + "host_settings": {"enable_software_inventory": true}, + }); err != nil { + return errors.Wrap(err, "failed to enable software inventory app config") + } + secrets, err := client.GetEnrollSecretSpec() if err != nil { return errors.Wrap(err, "Error retrieving enroll secret")