From 7169915f7d2f2c2223f919b6c88afcddb1b73fbc Mon Sep 17 00:00:00 2001 From: Dominik Richter Date: Sat, 6 Jan 2024 15:33:31 -0800 Subject: [PATCH 01/11] =?UTF-8?q?=F0=9F=9B=91=20remove=20v9=20from=20ID=20?= =?UTF-8?q?of=20providers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We don't want it in the ID, since they have a separate version info. Having the ID in the name makes it much trickier to update a provider (technically). --- providers/arista/config/config.go | 2 +- providers/arista/resources/arista.lr | 2 +- providers/atlassian/config/config.go | 2 +- providers/aws/config/config.go | 2 +- providers/aws/resources/aws.lr | 2 +- providers/azure/config/config.go | 2 +- providers/azure/resources/azure.lr | 2 +- providers/core/config/config.go | 2 +- providers/core/resources/core.lr | 2 +- providers/defaults.go | 64 ++++++------------- providers/equinix/config/config.go | 2 +- providers/equinix/resources/equinix.lr | 2 +- providers/gcp/config/config.go | 2 +- providers/gcp/resources/gcp.lr | 2 +- providers/github/config/config.go | 2 +- providers/github/resources/github.lr | 2 +- providers/gitlab/config/config.go | 2 +- providers/gitlab/resources/gitlab.lr | 2 +- providers/google-workspace/config/config.go | 2 +- .../resources/google-workspace.lr | 2 +- providers/ipmi/config/config.go | 2 +- providers/ipmi/resources/ipmi.lr | 2 +- providers/k8s/config/config.go | 2 +- providers/k8s/resources/k8s.lr | 2 +- providers/ms365/config/config.go | 2 +- providers/ms365/resources/ms365.lr | 2 +- providers/network/config/config.go | 8 +-- providers/network/resources/network.lr | 2 +- providers/oci/config/config.go | 2 +- providers/oci/resources/oci.lr | 2 +- providers/okta/config/config.go | 2 +- providers/okta/resources/okta.lr | 2 +- providers/opcua/config/config.go | 2 +- providers/opcua/resources/opcua.lr | 2 +- providers/os/config/config.go | 2 +- providers/os/resources/os.lr | 2 +- providers/runtime.go | 2 +- providers/slack/config/config.go | 2 +- providers/slack/resources/slack.lr | 2 +- providers/terraform/config/config.go | 2 +- providers/terraform/resources/terraform.lr | 2 +- providers/vcd/config/config.go | 2 +- providers/vcd/resources/vcd.lr | 2 +- providers/vsphere/config/config.go | 2 +- providers/vsphere/resources/vsphere.lr | 2 +- 45 files changed, 68 insertions(+), 90 deletions(-) diff --git a/providers/arista/config/config.go b/providers/arista/config/config.go index e67eb8cc9d..13e2fe95bf 100644 --- a/providers/arista/config/config.go +++ b/providers/arista/config/config.go @@ -10,7 +10,7 @@ import ( var Config = plugin.Provider{ Name: "arista", - ID: "go.mondoo.com/cnquery/v9/providers/arista", + ID: "go.mondoo.com/cnquery/providers/arista", Version: "9.1.15", ConnectionTypes: []string{provider.ConnectionType}, Connectors: []plugin.Connector{ diff --git a/providers/arista/resources/arista.lr b/providers/arista/resources/arista.lr index e9c7bb2570..42ab64eb51 100644 --- a/providers/arista/resources/arista.lr +++ b/providers/arista/resources/arista.lr @@ -1,7 +1,7 @@ // Copyright (c) Mondoo, Inc. // SPDX-License-Identifier: BUSL-1.1 -option provider = "go.mondoo.com/cnquery/v9/providers/arista" +option provider = "go.mondoo.com/cnquery/providers/arista" option go_package = "go.mondoo.com/cnquery/v9/providers/arista/resources" // Arista EOS resource diff --git a/providers/atlassian/config/config.go b/providers/atlassian/config/config.go index 8d7c4e369d..50b5083558 100644 --- a/providers/atlassian/config/config.go +++ b/providers/atlassian/config/config.go @@ -10,7 +10,7 @@ import ( var Config = plugin.Provider{ Name: "atlassian", - ID: "go.mondoo.com/cnquery/v9/providers/atlassian", + ID: "go.mondoo.com/cnquery/providers/atlassian", Version: "9.1.15", ConnectionTypes: []string{ provider.DefaultConnectionType, diff --git a/providers/aws/config/config.go b/providers/aws/config/config.go index 83a351de67..55434f3e74 100644 --- a/providers/aws/config/config.go +++ b/providers/aws/config/config.go @@ -12,7 +12,7 @@ import ( var Config = plugin.Provider{ Name: "aws", - ID: "go.mondoo.com/cnquery/v9/providers/aws", + ID: "go.mondoo.com/cnquery/providers/aws", Version: "9.1.25", ConnectionTypes: []string{provider.DefaultConnectionType, string(awsec2ebsconn.EBSConnectionType)}, Connectors: []plugin.Connector{ diff --git a/providers/aws/resources/aws.lr b/providers/aws/resources/aws.lr index 8f8d55282f..dfd8507a08 100644 --- a/providers/aws/resources/aws.lr +++ b/providers/aws/resources/aws.lr @@ -4,7 +4,7 @@ import "../../network/resources/network.lr" -option provider = "go.mondoo.com/cnquery/v9/providers/aws" +option provider = "go.mondoo.com/cnquery/providers/aws" option go_package = "go.mondoo.com/cnquery/v9/providers/aws/resources" // AWS resource diff --git a/providers/azure/config/config.go b/providers/azure/config/config.go index 1471988b83..6affaee7ec 100644 --- a/providers/azure/config/config.go +++ b/providers/azure/config/config.go @@ -12,7 +12,7 @@ import ( var Config = plugin.Provider{ Name: "azure", - ID: "go.mondoo.com/cnquery/v9/providers/azure", + ID: "go.mondoo.com/cnquery/providers/azure", Version: "9.2.1", ConnectionTypes: []string{ provider.ConnectionType, diff --git a/providers/azure/resources/azure.lr b/providers/azure/resources/azure.lr index ecd5bd077f..c51f749174 100644 --- a/providers/azure/resources/azure.lr +++ b/providers/azure/resources/azure.lr @@ -1,7 +1,7 @@ // Copyright (c) Mondoo, Inc. // SPDX-License-Identifier: BUSL-1.1 -option provider = "go.mondoo.com/cnquery/v9/providers/azure" +option provider = "go.mondoo.com/cnquery/providers/azure" option go_package = "go.mondoo.com/cnquery/v9/providers/azure/resources" // Azure resource diff --git a/providers/core/config/config.go b/providers/core/config/config.go index 75fdf7bf7f..b902245157 100644 --- a/providers/core/config/config.go +++ b/providers/core/config/config.go @@ -7,7 +7,7 @@ import "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" var Config = plugin.Provider{ Name: "core", - ID: "go.mondoo.com/cnquery/v9/providers/core", + ID: "go.mondoo.com/cnquery/providers/core", Version: "9.1.8", Connectors: []plugin.Connector{}, } diff --git a/providers/core/resources/core.lr b/providers/core/resources/core.lr index 8f84ecdb08..21d89ffa49 100644 --- a/providers/core/resources/core.lr +++ b/providers/core/resources/core.lr @@ -1,7 +1,7 @@ // Copyright (c) Mondoo, Inc. // SPDX-License-Identifier: BUSL-1.1 -option provider = "go.mondoo.com/cnquery/v9/providers/core" +option provider = "go.mondoo.com/cnquery/providers/core" option go_package = "go.mondoo.com/cnquery/v9/providers/core/resources" // Contextual information about MQL runtime and environment diff --git a/providers/defaults.go b/providers/defaults.go index 38ca867258..727d6d0c26 100644 --- a/providers/defaults.go +++ b/providers/defaults.go @@ -11,14 +11,12 @@ import "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" // to tell users what providers are used for common connections, when there // is no other way to find out. var DefaultProviders Providers = map[string]*Provider{ - "arista": { Provider: &plugin.Provider{ Name: "arista", - ID: "go.mondoo.com/cnquery/v9/providers/arista", + ID: "go.mondoo.com/cnquery/providers/arista", ConnectionTypes: []string{"arista"}, Connectors: []plugin.Connector{ - { Name: "arista", Use: "arista user@host", @@ -34,7 +32,6 @@ var DefaultProviders Providers = map[string]*Provider{ ID: "go.mondoo.com/cnquery/providers/atlassian", ConnectionTypes: []string{"atlassian", "jira", "admin", "confluence", "scim"}, Connectors: []plugin.Connector{ - { Name: "atlassian", Use: "atlassian", @@ -47,10 +44,9 @@ var DefaultProviders Providers = map[string]*Provider{ "aws": { Provider: &plugin.Provider{ Name: "aws", - ID: "go.mondoo.com/cnquery/v9/providers/aws", + ID: "go.mondoo.com/cnquery/providers/aws", ConnectionTypes: []string{"aws", "ebs"}, Connectors: []plugin.Connector{ - { Name: "aws", Use: "aws", @@ -63,10 +59,9 @@ var DefaultProviders Providers = map[string]*Provider{ "azure": { Provider: &plugin.Provider{ Name: "azure", - ID: "go.mondoo.com/cnquery/v9/providers/azure", + ID: "go.mondoo.com/cnquery/providers/azure", ConnectionTypes: []string{"azure"}, Connectors: []plugin.Connector{ - { Name: "azure", Use: "azure", @@ -79,7 +74,7 @@ var DefaultProviders Providers = map[string]*Provider{ "core": { Provider: &plugin.Provider{ Name: "core", - ID: "go.mondoo.com/cnquery/v9/providers/core", + ID: "go.mondoo.com/cnquery/providers/core", ConnectionTypes: []string(nil), Connectors: []plugin.Connector{}, }, @@ -88,10 +83,9 @@ var DefaultProviders Providers = map[string]*Provider{ "equinix": { Provider: &plugin.Provider{ Name: "equinix", - ID: "go.mondoo.com/cnquery/v9/providers/equinix", + ID: "go.mondoo.com/cnquery/providers/equinix", ConnectionTypes: []string{"equinix"}, Connectors: []plugin.Connector{ - { Name: "equinix", Use: "equinix [org ] [project ] [--token ]", @@ -104,10 +98,9 @@ var DefaultProviders Providers = map[string]*Provider{ "gcp": { Provider: &plugin.Provider{ Name: "gcp", - ID: "go.mondoo.com/cnquery/v9/providers/gcp", + ID: "go.mondoo.com/cnquery/providers/gcp", ConnectionTypes: []string{"gcp", "gcp-snapshot"}, Connectors: []plugin.Connector{ - { Name: "gcp", Use: "gcp", @@ -120,10 +113,9 @@ var DefaultProviders Providers = map[string]*Provider{ "github": { Provider: &plugin.Provider{ Name: "github", - ID: "go.mondoo.com/cnquery/v9/providers/github", + ID: "go.mondoo.com/cnquery/providers/github", ConnectionTypes: []string{"github"}, Connectors: []plugin.Connector{ - { Name: "github", Use: "github", @@ -136,10 +128,9 @@ var DefaultProviders Providers = map[string]*Provider{ "gitlab": { Provider: &plugin.Provider{ Name: "gitlab", - ID: "go.mondoo.com/cnquery/v9/providers/gitlab", + ID: "go.mondoo.com/cnquery/providers/gitlab", ConnectionTypes: []string{"gitlab", "gitlab-group", "gitlab-project"}, Connectors: []plugin.Connector{ - { Name: "gitlab", Use: "gitlab", @@ -152,10 +143,9 @@ var DefaultProviders Providers = map[string]*Provider{ "google-workspace": { Provider: &plugin.Provider{ Name: "google-workspace", - ID: "go.mondoo.com/cnquery/v9/providers/google-workspace", + ID: "go.mondoo.com/cnquery/providers/google-workspace", ConnectionTypes: []string{"google-workspace"}, Connectors: []plugin.Connector{ - { Name: "google-workspace", Use: "google-workspace [--credentials-path ] [--customer-id ] [--impersonated-user-email ]", @@ -168,10 +158,9 @@ var DefaultProviders Providers = map[string]*Provider{ "ipmi": { Provider: &plugin.Provider{ Name: "ipmi", - ID: "go.mondoo.com/cnquery/v9/providers/ipmi", + ID: "go.mondoo.com/cnquery/providers/ipmi", ConnectionTypes: []string{"ipmi"}, Connectors: []plugin.Connector{ - { Name: "ipmi", Use: "ipmi user@host", @@ -184,10 +173,9 @@ var DefaultProviders Providers = map[string]*Provider{ "k8s": { Provider: &plugin.Provider{ Name: "k8s", - ID: "go.mondoo.com/cnquery/v9/providers/k8s", + ID: "go.mondoo.com/cnquery/providers/k8s", ConnectionTypes: []string{"k8s"}, Connectors: []plugin.Connector{ - { Name: "k8s", Use: "k8s (optional MANIFEST path)", @@ -200,10 +188,9 @@ var DefaultProviders Providers = map[string]*Provider{ "ms365": { Provider: &plugin.Provider{ Name: "ms365", - ID: "go.mondoo.com/cnquery/v9/providers/ms365", + ID: "go.mondoo.com/cnquery/providers/ms365", ConnectionTypes: []string{"ms365"}, Connectors: []plugin.Connector{ - { Name: "ms365", Use: "ms365", @@ -216,10 +203,9 @@ var DefaultProviders Providers = map[string]*Provider{ "network": { Provider: &plugin.Provider{ Name: "network", - ID: "go.mondoo.com/cnquery/v9/providers/network", + ID: "go.mondoo.com/cnquery/providers/network", ConnectionTypes: []string{"host"}, Connectors: []plugin.Connector{ - { Name: "host", Use: "host HOST", @@ -232,10 +218,9 @@ var DefaultProviders Providers = map[string]*Provider{ "oci": { Provider: &plugin.Provider{ Name: "oci", - ID: "go.mondoo.com/cnquery/v9/providers/oci", + ID: "go.mondoo.com/cnquery/providers/oci", ConnectionTypes: []string{"oci"}, Connectors: []plugin.Connector{ - { Name: "oci", Use: "oci", @@ -248,10 +233,9 @@ var DefaultProviders Providers = map[string]*Provider{ "okta": { Provider: &plugin.Provider{ Name: "okta", - ID: "go.mondoo.com/cnquery/v9/providers/okta", + ID: "go.mondoo.com/cnquery/providers/okta", ConnectionTypes: []string{"okta"}, Connectors: []plugin.Connector{ - { Name: "okta", Use: "okta", @@ -264,10 +248,9 @@ var DefaultProviders Providers = map[string]*Provider{ "opcua": { Provider: &plugin.Provider{ Name: "opcua", - ID: "go.mondoo.com/cnquery/v9/providers/opcua", + ID: "go.mondoo.com/cnquery/providers/opcua", ConnectionTypes: []string{"opcua"}, Connectors: []plugin.Connector{ - { Name: "opcua", Use: "opcua [--endpoint ]", @@ -280,10 +263,9 @@ var DefaultProviders Providers = map[string]*Provider{ "os": { Provider: &plugin.Provider{ Name: "os", - ID: "go.mondoo.com/cnquery/v9/providers/os", + ID: "go.mondoo.com/cnquery/providers/os", ConnectionTypes: []string{"local", "ssh", "tar", "docker-snapshot", "vagrant", "docker-image", "docker-container", "docker-registry", "container-registry", "registry-image", "filesystem"}, Connectors: []plugin.Connector{ - { Name: "local", Use: "local", @@ -332,10 +314,9 @@ var DefaultProviders Providers = map[string]*Provider{ "slack": { Provider: &plugin.Provider{ Name: "slack", - ID: "go.mondoo.com/cnquery/v9/providers/slack", + ID: "go.mondoo.com/cnquery/providers/slack", ConnectionTypes: []string{"slack"}, Connectors: []plugin.Connector{ - { Name: "slack", Use: "slack", @@ -348,10 +329,9 @@ var DefaultProviders Providers = map[string]*Provider{ "terraform": { Provider: &plugin.Provider{ Name: "terraform", - ID: "go.mondoo.com/cnquery/v9/providers/terraform", + ID: "go.mondoo.com/cnquery/providers/terraform", ConnectionTypes: []string{"terraform-state", "terraform-plan", "terraform-hcl", "terraform-hcl-git"}, Connectors: []plugin.Connector{ - { Name: "terraform", Use: "terraform PATH", @@ -364,10 +344,9 @@ var DefaultProviders Providers = map[string]*Provider{ "vcd": { Provider: &plugin.Provider{ Name: "vcd", - ID: "go.mondoo.com/cnquery/v9/providers/vcd", + ID: "go.mondoo.com/cnquery/providers/vcd", ConnectionTypes: []string{"vcd"}, Connectors: []plugin.Connector{ - { Name: "vcd", Use: "vcd [--user ] [--host ] [--organization ] [--ask-pass] [--password ]", @@ -380,10 +359,9 @@ var DefaultProviders Providers = map[string]*Provider{ "vsphere": { Provider: &plugin.Provider{ Name: "vsphere", - ID: "go.mondoo.com/cnquery/v9/providers/vsphere", + ID: "go.mondoo.com/cnquery/providers/vsphere", ConnectionTypes: []string{"vsphere"}, Connectors: []plugin.Connector{ - { Name: "vsphere", Use: "vsphere user@host", diff --git a/providers/equinix/config/config.go b/providers/equinix/config/config.go index 069920c0bc..abfccce094 100644 --- a/providers/equinix/config/config.go +++ b/providers/equinix/config/config.go @@ -10,7 +10,7 @@ import ( var Config = plugin.Provider{ Name: "equinix", - ID: "go.mondoo.com/cnquery/v9/providers/equinix", + ID: "go.mondoo.com/cnquery/providers/equinix", Version: "9.1.16", ConnectionTypes: []string{provider.ConnectionType}, Connectors: []plugin.Connector{ diff --git a/providers/equinix/resources/equinix.lr b/providers/equinix/resources/equinix.lr index 9bf38bbc2d..746d328f99 100644 --- a/providers/equinix/resources/equinix.lr +++ b/providers/equinix/resources/equinix.lr @@ -1,7 +1,7 @@ // Copyright (c) Mondoo, Inc. // SPDX-License-Identifier: BUSL-1.1 -option provider = "go.mondoo.com/cnquery/v9/providers/equinix" +option provider = "go.mondoo.com/cnquery/providers/equinix" option go_package = "go.mondoo.com/cnquery/v9/providers/equinix/resources" // Equinix Metal project diff --git a/providers/gcp/config/config.go b/providers/gcp/config/config.go index f95220694e..a07f147954 100644 --- a/providers/gcp/config/config.go +++ b/providers/gcp/config/config.go @@ -12,7 +12,7 @@ import ( var Config = plugin.Provider{ Name: "gcp", - ID: "go.mondoo.com/cnquery/v9/providers/gcp", + ID: "go.mondoo.com/cnquery/providers/gcp", Version: "9.1.18", ConnectionTypes: []string{ provider.ConnectionType, diff --git a/providers/gcp/resources/gcp.lr b/providers/gcp/resources/gcp.lr index b3b3e2df72..ea7d7917ba 100644 --- a/providers/gcp/resources/gcp.lr +++ b/providers/gcp/resources/gcp.lr @@ -1,7 +1,7 @@ // Copyright (c) Mondoo, Inc. // SPDX-License-Identifier: BUSL-1.1 -option provider = "go.mondoo.com/cnquery/v9/providers/gcp" +option provider = "go.mondoo.com/cnquery/providers/gcp" option go_package = "go.mondoo.com/cnquery/v9/providers/gcp/resources" alias gcloud.organization = gcp.organization diff --git a/providers/github/config/config.go b/providers/github/config/config.go index 30b745b313..1f78bffe50 100644 --- a/providers/github/config/config.go +++ b/providers/github/config/config.go @@ -10,7 +10,7 @@ import ( var Config = plugin.Provider{ Name: "github", - ID: "go.mondoo.com/cnquery/v9/providers/github", + ID: "go.mondoo.com/cnquery/providers/github", Version: "9.1.19", ConnectionTypes: []string{provider.ConnectionType}, Connectors: []plugin.Connector{ diff --git a/providers/github/resources/github.lr b/providers/github/resources/github.lr index fd30dc2466..1c8ecabb4d 100644 --- a/providers/github/resources/github.lr +++ b/providers/github/resources/github.lr @@ -1,7 +1,7 @@ // Copyright (c) Mondoo, Inc. // SPDX-License-Identifier: BUSL-1.1 -option provider = "go.mondoo.com/cnquery/v9/providers/github" +option provider = "go.mondoo.com/cnquery/providers/github" option go_package = "go.mondoo.com/cnquery/v9/providers/github/resources" // Git commit diff --git a/providers/gitlab/config/config.go b/providers/gitlab/config/config.go index 33a8df7bd6..3deb05eb1e 100644 --- a/providers/gitlab/config/config.go +++ b/providers/gitlab/config/config.go @@ -10,7 +10,7 @@ import ( var Config = plugin.Provider{ Name: "gitlab", - ID: "go.mondoo.com/cnquery/v9/providers/gitlab", + ID: "go.mondoo.com/cnquery/providers/gitlab", Version: "9.1.16", ConnectionTypes: []string{ provider.ConnectionType, diff --git a/providers/gitlab/resources/gitlab.lr b/providers/gitlab/resources/gitlab.lr index 97a80ab1f3..e8a73d62fb 100644 --- a/providers/gitlab/resources/gitlab.lr +++ b/providers/gitlab/resources/gitlab.lr @@ -1,7 +1,7 @@ // Copyright (c) Mondoo, Inc. // SPDX-License-Identifier: BUSL-1.1 -option provider = "go.mondoo.com/cnquery/v9/providers/gitlab" +option provider = "go.mondoo.com/cnquery/providers/gitlab" option go_package = "go.mondoo.com/cnquery/v9/providers/gitlab/resources" // GitLab group diff --git a/providers/google-workspace/config/config.go b/providers/google-workspace/config/config.go index 647bd043e0..cf80cb81f9 100644 --- a/providers/google-workspace/config/config.go +++ b/providers/google-workspace/config/config.go @@ -10,7 +10,7 @@ import ( var Config = plugin.Provider{ Name: "google-workspace", - ID: "go.mondoo.com/cnquery/v9/providers/google-workspace", + ID: "go.mondoo.com/cnquery/providers/google-workspace", Version: "9.1.19", ConnectionTypes: []string{provider.ConnectionType}, Connectors: []plugin.Connector{ diff --git a/providers/google-workspace/resources/google-workspace.lr b/providers/google-workspace/resources/google-workspace.lr index d914a21d00..ab03d9edfa 100644 --- a/providers/google-workspace/resources/google-workspace.lr +++ b/providers/google-workspace/resources/google-workspace.lr @@ -1,7 +1,7 @@ // Copyright (c) Mondoo, Inc. // SPDX-License-Identifier: BUSL-1.1 -option provider = "go.mondoo.com/cnquery/v9/providers/google-workspace" +option provider = "go.mondoo.com/cnquery/providers/google-workspace" option go_package = "go.mondoo.com/cnquery/v9/providers/google-workspace/resources" // Google Workspace diff --git a/providers/ipmi/config/config.go b/providers/ipmi/config/config.go index 81cd5608e9..56711483b7 100644 --- a/providers/ipmi/config/config.go +++ b/providers/ipmi/config/config.go @@ -10,7 +10,7 @@ import ( var Config = plugin.Provider{ Name: "ipmi", - ID: "go.mondoo.com/cnquery/v9/providers/ipmi", + ID: "go.mondoo.com/cnquery/providers/ipmi", Version: "9.1.16", ConnectionTypes: []string{provider.ConnectionType}, Connectors: []plugin.Connector{ diff --git a/providers/ipmi/resources/ipmi.lr b/providers/ipmi/resources/ipmi.lr index c99b12b824..18fe480b97 100644 --- a/providers/ipmi/resources/ipmi.lr +++ b/providers/ipmi/resources/ipmi.lr @@ -1,7 +1,7 @@ // Copyright (c) Mondoo, Inc. // SPDX-License-Identifier: BUSL-1.1 -option provider = "go.mondoo.com/cnquery/v9/providers/ipmi" +option provider = "go.mondoo.com/cnquery/providers/ipmi" option go_package = "go.mondoo.com/cnquery/v9/providers/ipmi/resources" // Intelligent Platform Management Interface (IPMI) resource diff --git a/providers/k8s/config/config.go b/providers/k8s/config/config.go index ecde908263..37c87f6930 100644 --- a/providers/k8s/config/config.go +++ b/providers/k8s/config/config.go @@ -11,7 +11,7 @@ import ( var Config = plugin.Provider{ Name: "k8s", - ID: "go.mondoo.com/cnquery/v9/providers/k8s", + ID: "go.mondoo.com/cnquery/providers/k8s", Version: "9.1.22", ConnectionTypes: []string{provider.ConnectionType}, Connectors: []plugin.Connector{ diff --git a/providers/k8s/resources/k8s.lr b/providers/k8s/resources/k8s.lr index e799425010..282c435b11 100644 --- a/providers/k8s/resources/k8s.lr +++ b/providers/k8s/resources/k8s.lr @@ -4,7 +4,7 @@ import "../../os/resources/os.lr" import "../../network/resources/network.lr" -option provider = "go.mondoo.com/cnquery/v9/providers/k8s" +option provider = "go.mondoo.com/cnquery/providers/k8s" option go_package = "go.mondoo.com/cnquery/v9/providers/k8s/resources" // Kubernetes cluster diff --git a/providers/ms365/config/config.go b/providers/ms365/config/config.go index a8800aa32f..6dca22b202 100644 --- a/providers/ms365/config/config.go +++ b/providers/ms365/config/config.go @@ -10,7 +10,7 @@ import ( var Config = plugin.Provider{ Name: "ms365", - ID: "go.mondoo.com/cnquery/v9/providers/ms365", + ID: "go.mondoo.com/cnquery/providers/ms365", Version: "9.2.14", ConnectionTypes: []string{provider.ConnectionType}, Connectors: []plugin.Connector{ diff --git a/providers/ms365/resources/ms365.lr b/providers/ms365/resources/ms365.lr index a3b56a9e0d..9fa728779d 100644 --- a/providers/ms365/resources/ms365.lr +++ b/providers/ms365/resources/ms365.lr @@ -1,7 +1,7 @@ // Copyright (c) Mondoo, Inc. // SPDX-License-Identifier: BUSL-1.1 -option provider = "go.mondoo.com/cnquery/v9/providers/ms365" +option provider = "go.mondoo.com/cnquery/providers/ms365" option go_package = "go.mondoo.com/cnquery/v9/providers/ms365/resources" // Microsoft diff --git a/providers/network/config/config.go b/providers/network/config/config.go index 33f9dfc63a..6f944ccc8e 100644 --- a/providers/network/config/config.go +++ b/providers/network/config/config.go @@ -10,13 +10,13 @@ import ( var Config = plugin.Provider{ Name: "network", - ID: "go.mondoo.com/cnquery/v9/providers/network", + ID: "go.mondoo.com/cnquery/providers/network", Version: "9.1.8", ConnectionTypes: []string{provider.HostConnectionType}, CrossProviderTypes: []string{ - "go.mondoo.com/cnquery/v9/providers/os", - "go.mondoo.com/cnquery/v9/providers/k8s", - "go.mondoo.com/cnquery/v9/providers/aws", + "go.mondoo.com/cnquery/providers/os", + "go.mondoo.com/cnquery/providers/k8s", + "go.mondoo.com/cnquery/providers/aws", }, Connectors: []plugin.Connector{ { diff --git a/providers/network/resources/network.lr b/providers/network/resources/network.lr index 0f55cffdbd..497827dada 100644 --- a/providers/network/resources/network.lr +++ b/providers/network/resources/network.lr @@ -1,7 +1,7 @@ // Copyright (c) Mondoo, Inc. // SPDX-License-Identifier: BUSL-1.1 -option provider = "go.mondoo.com/cnquery/v9/providers/network" +option provider = "go.mondoo.com/cnquery/providers/network" option go_package = "go.mondoo.com/cnquery/v9/providers/network/resources" // Socket diff --git a/providers/oci/config/config.go b/providers/oci/config/config.go index dc818ee3eb..04b382ab0a 100644 --- a/providers/oci/config/config.go +++ b/providers/oci/config/config.go @@ -10,7 +10,7 @@ import ( var Config = plugin.Provider{ Name: "oci", - ID: "go.mondoo.com/cnquery/v9/providers/oci", + ID: "go.mondoo.com/cnquery/providers/oci", Version: "9.1.17", ConnectionTypes: []string{provider.ConnectionType}, Connectors: []plugin.Connector{ diff --git a/providers/oci/resources/oci.lr b/providers/oci/resources/oci.lr index 5f74c4af1b..cfa2455c3b 100644 --- a/providers/oci/resources/oci.lr +++ b/providers/oci/resources/oci.lr @@ -1,7 +1,7 @@ // Copyright (c) Mondoo, Inc. // SPDX-License-Identifier: BUSL-1.1 -option provider = "go.mondoo.com/cnquery/v9/providers/oci" +option provider = "go.mondoo.com/cnquery/providers/oci" option go_package = "go.mondoo.com/cnquery/v9/providers/oci/resources" // Oracle Cloud Infrastructure (OCI) tenancy diff --git a/providers/okta/config/config.go b/providers/okta/config/config.go index 7b16ac0e79..cf4a4f5c2d 100644 --- a/providers/okta/config/config.go +++ b/providers/okta/config/config.go @@ -10,7 +10,7 @@ import ( var Config = plugin.Provider{ Name: "okta", - ID: "go.mondoo.com/cnquery/v9/providers/okta", + ID: "go.mondoo.com/cnquery/providers/okta", Version: "9.1.16", ConnectionTypes: []string{provider.ConnectionType}, Connectors: []plugin.Connector{ diff --git a/providers/okta/resources/okta.lr b/providers/okta/resources/okta.lr index 6bb1e64c04..843e8495b7 100644 --- a/providers/okta/resources/okta.lr +++ b/providers/okta/resources/okta.lr @@ -1,7 +1,7 @@ // Copyright (c) Mondoo, Inc. // SPDX-License-Identifier: BUSL-1.1 -option provider = "go.mondoo.com/cnquery/v9/providers/okta" +option provider = "go.mondoo.com/cnquery/providers/okta" option go_package = "go.mondoo.com/cnquery/v9/providers/okta/resources" // Okta diff --git a/providers/opcua/config/config.go b/providers/opcua/config/config.go index 813e5732b6..b7f23870a4 100644 --- a/providers/opcua/config/config.go +++ b/providers/opcua/config/config.go @@ -10,7 +10,7 @@ import ( var Config = plugin.Provider{ Name: "opcua", - ID: "go.mondoo.com/cnquery/v9/providers/opcua", + ID: "go.mondoo.com/cnquery/providers/opcua", Version: "9.1.15", ConnectionTypes: []string{provider.ConnectionType}, Connectors: []plugin.Connector{ diff --git a/providers/opcua/resources/opcua.lr b/providers/opcua/resources/opcua.lr index 5b736d3399..e2866641a7 100644 --- a/providers/opcua/resources/opcua.lr +++ b/providers/opcua/resources/opcua.lr @@ -1,7 +1,7 @@ // Copyright (c) Mondoo, Inc. // SPDX-License-Identifier: BUSL-1.1 -option provider = "go.mondoo.com/cnquery/v9/providers/opcua" +option provider = "go.mondoo.com/cnquery/providers/opcua" option go_package = "go.mondoo.com/cnquery/v9/providers/opcua/resources" // OPC UA diff --git a/providers/os/config/config.go b/providers/os/config/config.go index f979958d8c..3833d1c411 100644 --- a/providers/os/config/config.go +++ b/providers/os/config/config.go @@ -11,7 +11,7 @@ import ( var Config = plugin.Provider{ Name: "os", - ID: "go.mondoo.com/cnquery/v9/providers/os", + ID: "go.mondoo.com/cnquery/providers/os", Version: "9.1.20", ConnectionTypes: []string{ provider.LocalConnectionType, diff --git a/providers/os/resources/os.lr b/providers/os/resources/os.lr index 0f1ffc18d2..ae2739e81e 100644 --- a/providers/os/resources/os.lr +++ b/providers/os/resources/os.lr @@ -4,7 +4,7 @@ import "../../core/resources/core.lr" import "../../network/resources/network.lr" -option provider = "go.mondoo.com/cnquery/v9/providers/os" +option provider = "go.mondoo.com/cnquery/providers/os" option go_package = "go.mondoo.com/cnquery/v9/providers/os/resources" alias os.base.command = command diff --git a/providers/runtime.go b/providers/runtime.go index 9a3fdb4c17..b1b4f03390 100644 --- a/providers/runtime.go +++ b/providers/runtime.go @@ -576,7 +576,7 @@ func (r *Runtime) lookupResourceProvider(resource string) (*ConnectedProvider, * } providerConn := r.Provider.Instance.ID - if info.Provider != providerConn && info.Provider != "go.mondoo.com/cnquery/v9/providers/core" && info.Provider != "go.mondoo.com/cnquery/v9/providers/network" { + if info.Provider != providerConn && info.Provider != "go.mondoo.com/cnquery/providers/core" && info.Provider != "go.mondoo.com/cnquery/providers/network" { return nil, nil, errors.New("incorrect provider for asset, not adding") } diff --git a/providers/slack/config/config.go b/providers/slack/config/config.go index cb1989ad26..a18d8ce874 100644 --- a/providers/slack/config/config.go +++ b/providers/slack/config/config.go @@ -10,7 +10,7 @@ import ( var Config = plugin.Provider{ Name: "slack", - ID: "go.mondoo.com/cnquery/v9/providers/slack", + ID: "go.mondoo.com/cnquery/providers/slack", Version: "9.1.17", ConnectionTypes: []string{provider.ConnectionType}, Connectors: []plugin.Connector{ diff --git a/providers/slack/resources/slack.lr b/providers/slack/resources/slack.lr index 0cc8138353..793cf95f1a 100644 --- a/providers/slack/resources/slack.lr +++ b/providers/slack/resources/slack.lr @@ -1,7 +1,7 @@ // Copyright (c) Mondoo, Inc. // SPDX-License-Identifier: BUSL-1.1 -option provider = "go.mondoo.com/cnquery/v9/providers/slack" +option provider = "go.mondoo.com/cnquery/providers/slack" option go_package = "go.mondoo.com/cnquery/v9/providers/slack/resources" // Slack diff --git a/providers/terraform/config/config.go b/providers/terraform/config/config.go index a7c8dbde98..3ec27c0bd1 100644 --- a/providers/terraform/config/config.go +++ b/providers/terraform/config/config.go @@ -10,7 +10,7 @@ import ( var Config = plugin.Provider{ Name: "terraform", - ID: "go.mondoo.com/cnquery/v9/providers/terraform", + ID: "go.mondoo.com/cnquery/providers/terraform", Version: "9.1.15", ConnectionTypes: []string{ provider.StateConnectionType, diff --git a/providers/terraform/resources/terraform.lr b/providers/terraform/resources/terraform.lr index dd90d96a35..017c3fb5ad 100644 --- a/providers/terraform/resources/terraform.lr +++ b/providers/terraform/resources/terraform.lr @@ -1,7 +1,7 @@ // Copyright (c) Mondoo, Inc. // SPDX-License-Identifier: BUSL-1.1 -option provider = "go.mondoo.com/cnquery/v9/providers/terraform" +option provider = "go.mondoo.com/cnquery/providers/terraform" option go_package = "go.mondoo.com/cnquery/v9/providers/terraform/resources" // Terraform configuration files diff --git a/providers/vcd/config/config.go b/providers/vcd/config/config.go index 77f46898fe..00f899ac49 100644 --- a/providers/vcd/config/config.go +++ b/providers/vcd/config/config.go @@ -10,7 +10,7 @@ import ( var Config = plugin.Provider{ Name: "vcd", - ID: "go.mondoo.com/cnquery/v9/providers/vcd", + ID: "go.mondoo.com/cnquery/providers/vcd", Version: "9.1.15", ConnectionTypes: []string{provider.ConnectionType}, Connectors: []plugin.Connector{ diff --git a/providers/vcd/resources/vcd.lr b/providers/vcd/resources/vcd.lr index 467ad55c9d..8535feb9ab 100644 --- a/providers/vcd/resources/vcd.lr +++ b/providers/vcd/resources/vcd.lr @@ -1,7 +1,7 @@ // Copyright (c) Mondoo, Inc. // SPDX-License-Identifier: BUSL-1.1 -option provider = "go.mondoo.com/cnquery/v9/providers/vcd" +option provider = "go.mondoo.com/cnquery/providers/vcd" option go_package = "go.mondoo.com/cnquery/v9/providers/vcd/resources" // VMware Cloud Director diff --git a/providers/vsphere/config/config.go b/providers/vsphere/config/config.go index 5deecb53bf..1357eeda2a 100644 --- a/providers/vsphere/config/config.go +++ b/providers/vsphere/config/config.go @@ -11,7 +11,7 @@ import ( var Config = plugin.Provider{ Name: "vsphere", - ID: "go.mondoo.com/cnquery/v9/providers/vsphere", + ID: "go.mondoo.com/cnquery/providers/vsphere", Version: "9.1.18", ConnectionTypes: []string{provider.ConnectionType}, Connectors: []plugin.Connector{ diff --git a/providers/vsphere/resources/vsphere.lr b/providers/vsphere/resources/vsphere.lr index f41f752114..26325f1667 100644 --- a/providers/vsphere/resources/vsphere.lr +++ b/providers/vsphere/resources/vsphere.lr @@ -1,7 +1,7 @@ // Copyright (c) Mondoo, Inc. // SPDX-License-Identifier: BUSL-1.1 -option provider = "go.mondoo.com/cnquery/v9/providers/vsphere" +option provider = "go.mondoo.com/cnquery/providers/vsphere" option go_package = "go.mondoo.com/cnquery/v9/providers/vsphere/resources" // vSphere asset resource From 79f688a48433c952c81f3fc4df339977600c67fa Mon Sep 17 00:00:00 2001 From: Dominik Richter Date: Fri, 12 Jan 2024 09:36:03 -0800 Subject: [PATCH 02/11] =?UTF-8?q?=F0=9F=A7=B9=20remove=20leftover=20=5Fmot?= =?UTF-8?q?or=20files=20from=20v9=20migration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Dominik Richter --- _motor/discovery/common/context.go | 10 - _motor/discovery/common/credentials.go | 31 - _motor/discovery/common/labels.go | 11 - _motor/discovery/common/projectname.go | 43 - _motor/discovery/common/projectname_test.go | 24 - .../gcp/instancesnapshot/resolver.go | 76 - _motor/discovery/gcp/resolver_folder.go | 117 -- _motor/discovery/github/github.go | 170 -- _motor/discovery/gitlab/gitlab.go | 76 - _motor/discovery/k8s/asset_data.go | 161 -- _motor/discovery/k8s/asset_data_test.go | 88 - _motor/discovery/k8s/common.go | 219 --- _motor/discovery/k8s/const.go | 19 - _motor/discovery/k8s/container_utils.go | 86 - _motor/discovery/k8s/creds_store.go | 53 - .../discovery/k8s/list_admission_reviews.go | 103 - .../k8s/list_admission_reviews_test.go | 102 - _motor/discovery/k8s/list_images.go | 164 -- _motor/discovery/k8s/list_images_test.go | 200 -- _motor/discovery/k8s/list_ingresses.go | 22 - _motor/discovery/k8s/list_namespaces.go | 90 - _motor/discovery/k8s/list_nodes.go | 152 -- _motor/discovery/k8s/list_nodes_test.go | 322 ---- _motor/discovery/k8s/list_workloads.go | 231 --- _motor/discovery/k8s/list_workloads_test.go | 1659 ----------------- _motor/discovery/k8s/resolver.go | 53 - _motor/discovery/k8s/resolver_cluster.go | 175 -- _motor/discovery/k8s/resolver_namespace.go | 133 -- _motor/discovery/k8s/resolver_test.go | 263 --- _motor/discovery/local/local.go | 114 -- _motor/discovery/network/resolver.go | 59 - _motor/discovery/os/os.go | 102 - _motor/discovery/resolve.go | 254 --- _motor/discovery/resolve_test.go | 46 - _motor/discovery/tar/tar.go | 65 - _motor/discovery/terraform/terraform.go | 78 - _motor/discovery/testdata/mock.toml | 162 -- _motor/discovery/vcd/resolver.go | 64 - _motor/providers/awsec2ebs/destroy.go | 46 - _motor/providers/awsec2ebs/provider.go | 258 --- _motor/providers/awsec2ebs/setup.go | 437 ----- _motor/providers/awsec2ebs/setup_test.go | 38 - _motor/providers/awsec2ebs/setup_unit_test.go | 20 - _motor/providers/awsec2ebs/types.go | 111 -- _motor/providers/awsec2ebs/types_test.go | 19 - _motor/providers/capabilities.go | 61 - _motor/providers/network/provider.go | 84 - _motor/providers/os/cmd/command.go | 70 - _motor/providers/os/cmd/command_test.go | 26 - _motor/providers/os/cmd/sudo.go | 48 - _motor/providers/os/cmd/sudo_test.go | 16 - _motor/providers/os/events/README.md | 34 - _motor/providers/os/events/command.go | 29 - _motor/providers/os/events/file.go | 61 - _motor/providers/os/events/jobmanager.go | 288 --- _motor/providers/os/events/jobmanager_test.go | 216 --- .../os/events/testdata/watcher_test.toml | 9 - _motor/providers/os/events/watcher.go | 164 -- _motor/providers/os/events/watcher_test.go | 132 -- _motor/providers/os/os.go | 161 -- _motor/providers/provider.go | 60 - _motor/providers/provider_test.go | 24 - _motor/providers/resolver/connect.go | 119 -- _motor/providers/resolver/resolver.go | 66 - _motor/providers/runtime.go | 37 - _motor/providers/ssh/command.go | 71 - _motor/providers/ssh/config.go | 95 - _motor/providers/ssh/defaults.go | 92 - _motor/providers/ssh/hostkey.go | 43 - _motor/providers/ssh/provider.go | 344 ---- _motor/providers/ssh/provider_test.go | 27 - _motor/providers/ssh/session.go | 217 --- _motor/providers/ssh/ssh_manual_test.go | 102 - _motor/providers/vcd/platform.go | 36 - _motor/providers/watcher.go | 22 - _motor/providers/winrm/cat/cat.go | 119 -- _motor/providers/winrm/cat/cat_file.go | 71 - _motor/providers/winrm/cat/cat_test.go | 41 - _motor/providers/winrm/cat/getitem.go | 64 - _motor/providers/winrm/cat/getitem_test.go | 34 - .../winrm/cat/testdata/getitem_dir.json | 205 -- .../winrm/cat/testdata/getitem_file.json | 224 --- .../providers/winrm/cat/testdata/winrm.toml | 200 -- _motor/providers/winrm/cat/winstat.go | 155 -- _motor/providers/winrm/provider.go | 186 -- 85 files changed, 10779 deletions(-) delete mode 100644 _motor/discovery/common/context.go delete mode 100644 _motor/discovery/common/credentials.go delete mode 100644 _motor/discovery/common/labels.go delete mode 100644 _motor/discovery/common/projectname.go delete mode 100644 _motor/discovery/common/projectname_test.go delete mode 100644 _motor/discovery/gcp/instancesnapshot/resolver.go delete mode 100644 _motor/discovery/gcp/resolver_folder.go delete mode 100644 _motor/discovery/github/github.go delete mode 100644 _motor/discovery/gitlab/gitlab.go delete mode 100644 _motor/discovery/k8s/asset_data.go delete mode 100644 _motor/discovery/k8s/asset_data_test.go delete mode 100644 _motor/discovery/k8s/common.go delete mode 100644 _motor/discovery/k8s/const.go delete mode 100644 _motor/discovery/k8s/container_utils.go delete mode 100644 _motor/discovery/k8s/creds_store.go delete mode 100644 _motor/discovery/k8s/list_admission_reviews.go delete mode 100644 _motor/discovery/k8s/list_admission_reviews_test.go delete mode 100644 _motor/discovery/k8s/list_images.go delete mode 100644 _motor/discovery/k8s/list_images_test.go delete mode 100644 _motor/discovery/k8s/list_ingresses.go delete mode 100644 _motor/discovery/k8s/list_namespaces.go delete mode 100644 _motor/discovery/k8s/list_nodes.go delete mode 100644 _motor/discovery/k8s/list_nodes_test.go delete mode 100644 _motor/discovery/k8s/list_workloads.go delete mode 100644 _motor/discovery/k8s/list_workloads_test.go delete mode 100644 _motor/discovery/k8s/resolver.go delete mode 100644 _motor/discovery/k8s/resolver_cluster.go delete mode 100644 _motor/discovery/k8s/resolver_namespace.go delete mode 100644 _motor/discovery/k8s/resolver_test.go delete mode 100644 _motor/discovery/local/local.go delete mode 100644 _motor/discovery/network/resolver.go delete mode 100644 _motor/discovery/os/os.go delete mode 100644 _motor/discovery/resolve.go delete mode 100644 _motor/discovery/resolve_test.go delete mode 100644 _motor/discovery/tar/tar.go delete mode 100644 _motor/discovery/terraform/terraform.go delete mode 100644 _motor/discovery/testdata/mock.toml delete mode 100644 _motor/discovery/vcd/resolver.go delete mode 100644 _motor/providers/awsec2ebs/destroy.go delete mode 100644 _motor/providers/awsec2ebs/provider.go delete mode 100644 _motor/providers/awsec2ebs/setup.go delete mode 100644 _motor/providers/awsec2ebs/setup_test.go delete mode 100644 _motor/providers/awsec2ebs/setup_unit_test.go delete mode 100644 _motor/providers/awsec2ebs/types.go delete mode 100644 _motor/providers/awsec2ebs/types_test.go delete mode 100644 _motor/providers/capabilities.go delete mode 100644 _motor/providers/network/provider.go delete mode 100644 _motor/providers/os/cmd/command.go delete mode 100644 _motor/providers/os/cmd/command_test.go delete mode 100644 _motor/providers/os/cmd/sudo.go delete mode 100644 _motor/providers/os/cmd/sudo_test.go delete mode 100644 _motor/providers/os/events/README.md delete mode 100644 _motor/providers/os/events/command.go delete mode 100644 _motor/providers/os/events/file.go delete mode 100644 _motor/providers/os/events/jobmanager.go delete mode 100644 _motor/providers/os/events/jobmanager_test.go delete mode 100644 _motor/providers/os/events/testdata/watcher_test.toml delete mode 100644 _motor/providers/os/events/watcher.go delete mode 100644 _motor/providers/os/events/watcher_test.go delete mode 100644 _motor/providers/os/os.go delete mode 100644 _motor/providers/provider.go delete mode 100644 _motor/providers/provider_test.go delete mode 100644 _motor/providers/resolver/connect.go delete mode 100644 _motor/providers/resolver/resolver.go delete mode 100644 _motor/providers/runtime.go delete mode 100644 _motor/providers/ssh/command.go delete mode 100644 _motor/providers/ssh/config.go delete mode 100644 _motor/providers/ssh/defaults.go delete mode 100644 _motor/providers/ssh/hostkey.go delete mode 100644 _motor/providers/ssh/provider.go delete mode 100644 _motor/providers/ssh/provider_test.go delete mode 100644 _motor/providers/ssh/session.go delete mode 100644 _motor/providers/ssh/ssh_manual_test.go delete mode 100644 _motor/providers/vcd/platform.go delete mode 100644 _motor/providers/watcher.go delete mode 100644 _motor/providers/winrm/cat/cat.go delete mode 100644 _motor/providers/winrm/cat/cat_file.go delete mode 100644 _motor/providers/winrm/cat/cat_test.go delete mode 100644 _motor/providers/winrm/cat/getitem.go delete mode 100644 _motor/providers/winrm/cat/getitem_test.go delete mode 100644 _motor/providers/winrm/cat/testdata/getitem_dir.json delete mode 100644 _motor/providers/winrm/cat/testdata/getitem_file.json delete mode 100644 _motor/providers/winrm/cat/testdata/winrm.toml delete mode 100644 _motor/providers/winrm/cat/winstat.go delete mode 100644 _motor/providers/winrm/provider.go diff --git a/_motor/discovery/common/context.go b/_motor/discovery/common/context.go deleted file mode 100644 index c809603d5d..0000000000 --- a/_motor/discovery/common/context.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package common - -import "context" - -type ContextInitializer interface { - InitCtx(ctx context.Context) context.Context -} diff --git a/_motor/discovery/common/credentials.go b/_motor/discovery/common/credentials.go deleted file mode 100644 index 7be80cfbc9..0000000000 --- a/_motor/discovery/common/credentials.go +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package common - -import ( - "github.com/rs/zerolog/log" - inventory "go.mondoo.com/cnquery/v9/motor/inventory/v1" - "go.mondoo.com/cnquery/v9/motor/vault" -) - -type ( - // QuerySecretFn is used during discovery phase to identify a secret for an asset - QuerySecretFn func(a *inventory.Asset) (*vault.Credential, error) -) - -func EnrichAssetWithSecrets(a *inventory.Asset, sfn QuerySecretFn) { - for j := range a.Connections { - conn := a.Connections[j] - - // NOTE: for now we only add credentials for ssh, we may revisit that in the future - if len(conn.Credentials) == 0 && conn.Type == "ssh" { - creds, err := sfn(a) - if err == nil && creds != nil { - conn.Credentials = []*vault.Credential{creds} - } else { - log.Warn().Str("name", a.Name).Msg("could not determine credentials for asset") - } - } - } -} diff --git a/_motor/discovery/common/labels.go b/_motor/discovery/common/labels.go deleted file mode 100644 index 0461bbdc4d..0000000000 --- a/_motor/discovery/common/labels.go +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package common - -// shared labels -const ( - IPLabel string = "mondoo.com/ip" - DNSLabel string = "mondoo.com/public-dns-name" - ParentId string = "mondoo.com/parent-id" -) diff --git a/_motor/discovery/common/projectname.go b/_motor/discovery/common/projectname.go deleted file mode 100644 index 9d305d8614..0000000000 --- a/_motor/discovery/common/projectname.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package common - -import ( - "os" - "path" - "path/filepath" - "strings" -) - -func ProjectNameFromPath(file string) string { - // if it is a local file (which may not be true) - name := "" - fi, err := os.Stat(file) - if err == nil { - if fi.IsDir() && fi.Name() != "." { - name = "directory " + fi.Name() - } else if fi.IsDir() { - name = fi.Name() - } else { - name = filepath.Base(fi.Name()) - extension := filepath.Ext(name) - name = strings.TrimSuffix(name, extension) - } - } else { - // it is not a local file, so we try to be a bit smart - name = path.Base(file) - extension := path.Ext(name) - name = strings.TrimSuffix(name, extension) - } - - // if the path is . we read the current directory - if name == "." { - abspath, err := filepath.Abs(name) - if err == nil { - name = ProjectNameFromPath(abspath) - } - } - - return name -} diff --git a/_motor/discovery/common/projectname_test.go b/_motor/discovery/common/projectname_test.go deleted file mode 100644 index 3c57fff544..0000000000 --- a/_motor/discovery/common/projectname_test.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package common - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestProjectName(t *testing.T) { - // absolute path where the file does not exist locally - assert.Equal(t, "projectname", ProjectNameFromPath("/testdata/terraform/projectname")) - assert.Equal(t, "file", ProjectNameFromPath("/testdata/terraform/projectname/file.tf")) - assert.Equal(t, "manifest", ProjectNameFromPath("/testdata/terraform/projectname/manifest.yaml")) - // relative path where the file does not exist locally - assert.Equal(t, "manifest", ProjectNameFromPath("./projectname/manifest.yaml")) - assert.Equal(t, "manifest", ProjectNameFromPath("./manifest.yaml")) - // if we get a directory which exists, add it to the project name to be more expressive - assert.Equal(t, "directory azure", ProjectNameFromPath("../azure")) - // if we get a dot, use the current directory since . does not make any sense - assert.Equal(t, "directory common", ProjectNameFromPath(".")) -} diff --git a/_motor/discovery/gcp/instancesnapshot/resolver.go b/_motor/discovery/gcp/instancesnapshot/resolver.go deleted file mode 100644 index 17d5e9f296..0000000000 --- a/_motor/discovery/gcp/instancesnapshot/resolver.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package instancesnapshot - -import ( - "context" - "errors" - - "go.mondoo.com/cnquery/v9/motor/asset" - "go.mondoo.com/cnquery/v9/motor/discovery/common" - "go.mondoo.com/cnquery/v9/motor/providers" - "go.mondoo.com/cnquery/v9/motor/providers/gcpinstancesnapshot" - "go.mondoo.com/cnquery/v9/motor/vault" -) - -type Resolver struct{} - -func (r *Resolver) Name() string { - return "GCP Compute Instance Resolver" -} - -func (r *Resolver) AvailableDiscoveryTargets() []string { - return []string{"auto"} -} - -func (r *Resolver) Resolve(ctx context.Context, root *asset.Asset, pCfg *providers.Config, credsResolver vault.Resolver, sfn common.QuerySecretFn, userIdDetectors ...providers.PlatformIdDetector) ([]*asset.Asset, error) { - pCfg.Backend = providers.ProviderType_GCP_COMPUTE_INSTANCE_SNAPSHOT - - // determine the platform mrn - sc, err := gcpinstancesnapshot.NewSnapshotCreator() - if err != nil { - return nil, err - } - - target := gcpinstancesnapshot.ParseTarget(pCfg) - var assetInfo *asset.Asset - - switch target.TargetType { - case "instance": - instanceInfo, err := sc.InstanceInfo(target.ProjectID, target.Zone, target.InstanceName) - if err != nil { - return nil, err - } - - assetInfo = &asset.Asset{ - Name: instanceInfo.InstanceName, - Connections: []*providers.Config{pCfg}, - State: asset.State_STATE_ONLINE, - Labels: map[string]string{}, - PlatformIds: []string{instanceInfo.PlatformMrn}, - } - case "snapshot": - snapshotInfo, err := sc.SnapshotInfo(target.ProjectID, target.SnapshotName) - if err != nil { - return nil, err - } - - assetInfo = &asset.Asset{ - Name: snapshotInfo.SnapshotName, - Connections: []*providers.Config{pCfg}, - State: asset.State_STATE_ONLINE, - Labels: map[string]string{}, - PlatformIds: []string{snapshotInfo.PlatformMrn}, - } - default: - return nil, errors.New("GCP compute discovery does not support asset type " + target.TargetType) - } - - // If there's a root-provided name, use that to overwrite - if root.Name != "" { - assetInfo.Name = root.Name - } - - return []*asset.Asset{assetInfo}, nil -} diff --git a/_motor/discovery/gcp/resolver_folder.go b/_motor/discovery/gcp/resolver_folder.go deleted file mode 100644 index f3b1e43cff..0000000000 --- a/_motor/discovery/gcp/resolver_folder.go +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package gcp - -import ( - "context" - "fmt" - - "github.com/cockroachdb/errors" - "go.mondoo.com/cnquery/v9/motor/asset" - "go.mondoo.com/cnquery/v9/motor/discovery/common" - "go.mondoo.com/cnquery/v9/motor/platform/detector" - "go.mondoo.com/cnquery/v9/motor/providers" - gcp_provider "go.mondoo.com/cnquery/v9/motor/providers/google" - "go.mondoo.com/cnquery/v9/motor/providers/resolver" - "go.mondoo.com/cnquery/v9/motor/vault" -) - -var FolderDiscoveryTargets = append(ProjectDiscoveryTargets) - -type GcpFolderResolver struct{} - -func (k *GcpFolderResolver) Name() string { - return "GCP Folder Resolver" -} - -func (r *GcpFolderResolver) AvailableDiscoveryTargets() []string { - return append(FolderDiscoveryTargets, common.DiscoveryAuto, common.DiscoveryAll, DiscoveryFolders) -} - -func (r *GcpFolderResolver) Resolve(ctx context.Context, tc *providers.Config, credsResolver vault.Resolver, sfn common.QuerySecretFn, userIdDetectors ...providers.PlatformIdDetector) ([]*asset.Asset, error) { - resolved := []*asset.Asset{} - if tc == nil || tc.Options["folder-id"] == "" { - return resolved, nil - } - - // Note: we use the resolver instead of the direct gcp_provider.New to resolve credentials properly - m, err := resolver.NewMotorConnection(ctx, tc, credsResolver) - if err != nil { - return nil, err - } - defer m.Close() - provider, ok := m.Provider.(*gcp_provider.Provider) - if !ok { - return nil, errors.New("could not create gcp provider") - } - - identifier, err := provider.Identifier() - if err != nil { - return nil, err - } - - // detect platform info for the asset - detector := detector.New(provider) - pf, err := detector.Platform() - if err != nil { - return nil, err - } - - folderId := tc.Options["folder-id"] - md, err := NewMQLAssetsDiscovery(provider) - if err != nil { - return nil, err - } - - folder, err := GetValue[string](md, fmt.Sprintf("return gcp.folder(id: '%s').name", folderId)) - if err != nil { - return nil, err - } - - var resolvedRoot *asset.Asset - if tc.IncludesOneOfDiscoveryTarget(DiscoveryFolders) { - pf.Name = "gcp-folder" - resolvedRoot = &asset.Asset{ - PlatformIds: []string{identifier}, - Name: "GCP folder " + folder, - Platform: pf, - Connections: []*providers.Config{tc}, // pass-in the current config - } - resolved = append(resolved, resolvedRoot) - } - - if tc.IncludesOneOfDiscoveryTarget(common.DiscoveryAuto, common.DiscoveryAll, - DiscoveryInstances, DiscoveryComputeImages, DiscoveryComputeNetworks, DiscoveryComputeSubnetworks, DiscoveryComputeFirewalls, - DiscoveryGkeClusters, - DiscoveryStorageBuckets, - DiscoveryBigQueryDatasets) { - type project struct { - Id string - } - projects, err := GetList[project](md, fmt.Sprintf("return gcp.folder(id: '%s').projects { id }", folderId)) - if err != nil { - return nil, err - } - - for _, p := range projects { - projectConfig := tc.Clone() - projectConfig.Options = map[string]string{ - "project-id": p.Id, - } - - assets, err := (&GcpProjectResolver{}).Resolve(ctx, projectConfig, credsResolver, sfn, userIdDetectors...) - if err != nil { - return nil, err - } - for i := range assets { - a := assets[i] - if resolvedRoot != nil && a.Platform.Name == "gcp-project" { - a.RelatedAssets = append(a.RelatedAssets, resolvedRoot) - } - resolved = append(resolved, a) - } - } - } - return resolved, nil -} diff --git a/_motor/discovery/github/github.go b/_motor/discovery/github/github.go deleted file mode 100644 index aaa36ba737..0000000000 --- a/_motor/discovery/github/github.go +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package github - -import ( - "context" - "errors" - "strings" - - "github.com/google/go-github/v49/github" - "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/motor/asset" - "go.mondoo.com/cnquery/v9/motor/discovery/common" - "go.mondoo.com/cnquery/v9/motor/providers" - github_provider "go.mondoo.com/cnquery/v9/motor/providers/github" - "go.mondoo.com/cnquery/v9/motor/providers/resolver" - "go.mondoo.com/cnquery/v9/motor/vault" -) - -const ( - DiscoveryRepository = "repository" - DiscoveryUser = "user" - DiscoveryOrganization = "organization" -) - -type Resolver struct{} - -func (r *Resolver) Name() string { - return "GitHub Resolver" -} - -func (r *Resolver) AvailableDiscoveryTargets() []string { - return []string{common.DiscoveryAuto, common.DiscoveryAll, DiscoveryRepository, DiscoveryUser} -} - -func (r *Resolver) Resolve(ctx context.Context, root *asset.Asset, pCfg *providers.Config, credsResolver vault.Resolver, sfn common.QuerySecretFn, userIdDetectors ...providers.PlatformIdDetector) ([]*asset.Asset, error) { - // establish connection to GitHub - m, err := resolver.NewMotorConnection(ctx, pCfg, credsResolver) - if err != nil { - return nil, err - } - defer m.Close() - - p, ok := m.Provider.(*github_provider.Provider) - if !ok { - return nil, errors.New("could not initialize github provider") - } - - identifier, err := p.Identifier() - if err != nil { - return nil, err - } - - pf, err := m.Platform() - if err != nil { - return nil, err - } - - defaultName := root.Name - list := []*asset.Asset{} - - switch pf.Name { - case "github-repo": - if pCfg.IncludesOneOfDiscoveryTarget(common.DiscoveryAll, common.DiscoveryAuto, DiscoveryRepository) { - name := defaultName - if name == "" { - repo, _ := p.Repository() - if repo != nil && repo.GetOwner() != nil { - name = repo.GetOwner().GetLogin() + "/" + repo.GetName() - } - } - - list = append(list, &asset.Asset{ - PlatformIds: []string{identifier}, - Name: name, - Platform: pf, - Connections: []*providers.Config{pCfg}, // pass-in the current config - State: asset.State_STATE_ONLINE, - }) - } - case "github-user": - if pCfg.IncludesOneOfDiscoveryTarget(common.DiscoveryAll, common.DiscoveryAuto, DiscoveryUser) { - name := defaultName - if name == "" { - user, _ := p.User() - if user != nil { - name = user.GetName() - } - } - - list = append(list, &asset.Asset{ - PlatformIds: []string{identifier}, - Name: name, - Platform: pf, - Connections: []*providers.Config{pCfg}, // pass-in the current config - State: asset.State_STATE_ONLINE, - }) - } - case "github-org": - if pCfg.IncludesOneOfDiscoveryTarget(common.DiscoveryAll, common.DiscoveryAuto, DiscoveryOrganization) { - name := defaultName - if name == "" { - org, _ := p.Organization() - if org != nil { - name = org.GetName() - } - } - list = append(list, &asset.Asset{ - PlatformIds: []string{identifier}, - Name: name, - Platform: pf, - Connections: []*providers.Config{pCfg}, // pass-in the current config - State: asset.State_STATE_ONLINE, - }) - } - - if pCfg.IncludesOneOfDiscoveryTarget(common.DiscoveryAll, common.DiscoveryAuto, DiscoveryRepository) { - log.Debug().Msg("Discovering repositories for organization") - org, err := p.Organization() - if err != nil { - return nil, err - } - - listOpts := &github.RepositoryListOptions{ - ListOptions: github.ListOptions{PerPage: 100}, - Type: "all", - } - allRepos := []*github.Repository{} - for { - repos, resp, err := p.Client().Repositories.List(context.Background(), org.GetLogin(), listOpts) - if err != nil { - if strings.Contains(err.Error(), "404") { - return nil, nil - } - return nil, err - } - allRepos = append(allRepos, repos...) - if resp.NextPage == 0 { - break - } - listOpts.Page = resp.NextPage - } - - for _, repo := range allRepos { - clonedConfig := pCfg.Clone() - if clonedConfig.Options == nil { - clonedConfig.Options = map[string]string{} - } - - owner := repo.GetOwner().GetLogin() - repoName := repo.GetName() - clonedConfig.Options["owner"] = owner - clonedConfig.Options["repository"] = repoName - delete(clonedConfig.Options, "organization") - delete(clonedConfig.Options, "user") - - list = append(list, &asset.Asset{ - PlatformIds: []string{github_provider.NewGitHubRepoIdentifier(owner, repoName)}, - Name: owner + "/" + repoName, - Platform: github_provider.GithubRepoPlatform, - Connections: []*providers.Config{clonedConfig}, // pass-in the current config - State: asset.State_STATE_ONLINE, - }) - } - } - } - - return list, nil -} diff --git a/_motor/discovery/gitlab/gitlab.go b/_motor/discovery/gitlab/gitlab.go deleted file mode 100644 index ea11a2b0cb..0000000000 --- a/_motor/discovery/gitlab/gitlab.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package gitlab - -import ( - "context" - "errors" - - "go.mondoo.com/cnquery/v9/motor/asset" - "go.mondoo.com/cnquery/v9/motor/discovery/common" - "go.mondoo.com/cnquery/v9/motor/providers" - gitlab_transport "go.mondoo.com/cnquery/v9/motor/providers/gitlab" - "go.mondoo.com/cnquery/v9/motor/providers/resolver" - "go.mondoo.com/cnquery/v9/motor/vault" -) - -const DiscoveryGroup = "group" - -type Resolver struct{} - -func (r *Resolver) Name() string { - return "Gitlab Resolver" -} - -func (r *Resolver) AvailableDiscoveryTargets() []string { - return []string{common.DiscoveryAuto, common.DiscoveryAll, DiscoveryGroup} -} - -func (r *Resolver) Resolve(ctx context.Context, root *asset.Asset, tc *providers.Config, credsResolver vault.Resolver, sfn common.QuerySecretFn, userIdDetectors ...providers.PlatformIdDetector) ([]*asset.Asset, error) { - // establish connection to GitLab - m, err := resolver.NewMotorConnection(ctx, tc, credsResolver) - if err != nil { - return nil, err - } - defer m.Close() - - trans, ok := m.Provider.(*gitlab_transport.Provider) - if !ok { - return nil, errors.New("could not initialize gitlab transport") - } - - identifier, err := trans.Identifier() - if err != nil { - return nil, err - } - - pf, err := m.Platform() - if err != nil { - return nil, err - } - - var assets []*asset.Asset - if tc.IncludesOneOfDiscoveryTarget(common.DiscoveryAuto, common.DiscoveryAll, DiscoveryGroup) { - name := root.Name - if name == "" { - grp, err := trans.Group() - if err != nil { - return nil, err - } - if grp != nil { - name = "GitLab Group " + grp.Name - } - } - - assets = append(assets, &asset.Asset{ - PlatformIds: []string{identifier}, - Name: name, - Platform: pf, - Connections: []*providers.Config{tc}, // pass-in the current config - State: asset.State_STATE_ONLINE, - }) - } - - return assets, nil -} diff --git a/_motor/discovery/k8s/asset_data.go b/_motor/discovery/k8s/asset_data.go deleted file mode 100644 index 36a93c86d0..0000000000 --- a/_motor/discovery/k8s/asset_data.go +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package k8s - -import ( - "fmt" - "strings" - - "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/motor/asset" - "go.mondoo.com/cnquery/v9/motor/platform" - "go.mondoo.com/cnquery/v9/motor/providers" - "go.mondoo.com/cnquery/v9/motor/providers/k8s" - "google.golang.org/protobuf/proto" - "k8s.io/apimachinery/pkg/api/meta" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" -) - -func createPlatformData(objectKind, runtime string) (*platform.Platform, error) { - platformData := &platform.Platform{ - Family: []string{"k8s"}, - Kind: providers.Kind_KIND_K8S_OBJECT, - Runtime: runtime, - } - // We need this at two places (discovery and tranport) - // Here it is needed for the discovery and this is what ends up in the database - switch objectKind { - case "Node": - platformData.Name = "k8s-node" - platformData.Title = "Kubernetes Node" - case "Pod": - platformData.Family = append(platformData.Family, "k8s-workload") - platformData.Name = "k8s-pod" - platformData.Title = "Kubernetes Pod" - case "CronJob": - platformData.Family = append(platformData.Family, "k8s-workload") - platformData.Name = "k8s-cronjob" - platformData.Title = "Kubernetes CronJob" - case "StatefulSet": - platformData.Family = append(platformData.Family, "k8s-workload") - platformData.Name = "k8s-statefulset" - platformData.Title = "Kubernetes StatefulSet" - case "Deployment": - platformData.Family = append(platformData.Family, "k8s-workload") - platformData.Name = "k8s-deployment" - platformData.Title = "Kubernetes Deployment" - case "Job": - platformData.Family = append(platformData.Family, "k8s-workload") - platformData.Name = "k8s-job" - platformData.Title = "Kubernetes Job" - case "ReplicaSet": - platformData.Family = append(platformData.Family, "k8s-workload") - platformData.Name = "k8s-replicaset" - platformData.Title = "Kubernetes ReplicaSet" - case "DaemonSet": - platformData.Family = append(platformData.Family, "k8s-workload") - platformData.Name = "k8s-daemonset" - platformData.Title = "Kubernetes DaemonSet" - case "AdmissionReview": - platformData.Family = append(platformData.Family, "k8s-admission") - platformData.Name = "k8s-admission" - platformData.Title = "Kubernetes Admission Review" - case "Ingress": - platformData.Family = append(platformData.Family, "k8s-ingress") - platformData.Name = "k8s-ingress" - platformData.Title = "Kubernetes Ingress" - case "Namespace": - platformData.Family = append(platformData.Family, "k8s-namespace") - platformData.Name = "k8s-namespace" - platformData.Title = "Kubernetes Namespace" - default: - return nil, fmt.Errorf("could not determine object kind %s", objectKind) - } - return platformData, nil -} - -func createAssetFromObject(object runtime.Object, runtime string, connection *providers.Config, clusterIdentifier string) (*asset.Asset, error) { - objMeta, err := meta.Accessor(object) - if err != nil { - log.Error().Err(err).Msg("could not access object attributes") - return nil, err - } - objType, err := meta.TypeAccessor(object) - if err != nil { - log.Error().Err(err).Msg("could not access object attributes") - return nil, err - } - - objectKind := objType.GetKind() - platformData, err := createPlatformData(objectKind, runtime) - if err != nil { - return nil, err - } - platformData.Version = objType.GetAPIVersion() - platformData.Build = objMeta.GetResourceVersion() - platformData.Labels = map[string]string{ - "uid": string(objMeta.GetUID()), - } - - assetLabels := objMeta.GetLabels() - if assetLabels == nil { - assetLabels = map[string]string{} - } - ns := objMeta.GetNamespace() - var name string - if ns != "" { - name = ns + "/" + objMeta.GetName() - platformData.Labels["namespace"] = ns - } else { - name = objMeta.GetName() - } - - addMondooAssetLabels(assetLabels, objMeta, objType, clusterIdentifier) - - newConnection := proto.Clone(connection).(*providers.Config) - newConnection.Options = map[string]string{} - for k, v := range connection.Options { - newConnection.Options[k] = v - } - newConnection.Options["object-kind"] = strings.ToLower(objectKind) - - asset := &asset.Asset{ - PlatformIds: []string{k8s.NewPlatformWorkloadId(clusterIdentifier, strings.ToLower(objectKind), objMeta.GetNamespace(), objMeta.GetName(), string(objMeta.GetUID()))}, - Name: name, - Platform: platformData, - Connections: []*providers.Config{newConnection}, - State: asset.State_STATE_ONLINE, - Labels: assetLabels, - } - - return asset, nil -} - -func addMondooAssetLabels(assetLabels map[string]string, objMeta v1.Object, objType meta.Type, clusterIdentifier string) { - ns := objMeta.GetNamespace() - if ns != "" { - assetLabels["k8s.mondoo.com/namespace"] = ns - } - assetLabels["k8s.mondoo.com/name"] = objMeta.GetName() - if string(objMeta.GetUID()) != "" { - // objects discovered from manifest do not necessarily have a UID - assetLabels["k8s.mondoo.com/uid"] = string(objMeta.GetUID()) - } - assetLabels["k8s.mondoo.com/kind"] = objType.GetKind() - assetLabels["k8s.mondoo.com/apiVersion"] = objType.GetAPIVersion() - if objMeta.GetResourceVersion() != "" { - // objects discovered from manifest do not necessarily have a resource version - assetLabels["k8s.mondoo.com/resource-version"] = objMeta.GetResourceVersion() - } - assetLabels["k8s.mondoo.com/cluster-id"] = clusterIdentifier - - owners := objMeta.GetOwnerReferences() - if len(owners) > 0 { - owner := owners[0] - assetLabels["k8s.mondoo.com/owner-kind"] = owner.Kind - assetLabels["k8s.mondoo.com/owner-name"] = owner.Name - assetLabels["k8s.mondoo.com/owner-uid"] = string(owner.UID) - } -} diff --git a/_motor/discovery/k8s/asset_data_test.go b/_motor/discovery/k8s/asset_data_test.go deleted file mode 100644 index 07b6ced5c1..0000000000 --- a/_motor/discovery/k8s/asset_data_test.go +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package k8s - -import ( - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/motor/providers" - - batchv1 "k8s.io/api/batch/v1" - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -func TestAssetData(t *testing.T) { - // Seed CronJobs - cronjob := batchv1.CronJob{ - TypeMeta: metav1.TypeMeta{ - Kind: "CronJob", - APIVersion: "batch/v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "nginx", - Namespace: "test123", - UID: "123", - }, - Spec: batchv1.CronJobSpec{ - Schedule: "*/1 * * * *", - JobTemplate: batchv1.JobTemplateSpec{ - Spec: batchv1.JobSpec{ - Template: corev1.PodTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{ - "app": "nginx", - }, - }, - Spec: corev1.PodSpec{ - Containers: []corev1.Container{{Image: "nginx:1.22.0-alpine"}}, - }, - }, - }, - }, - }, - } - - clusterIdentifier := "//platformid.api.mondoo.app/runtime/k8s/uid/e26043bb-8669-48a2-b684-b1e132198cdc" - - tc := &providers.Config{} - - asset, err := createAssetFromObject(&cronjob, "k8s-cluster", tc, clusterIdentifier) - require.NoError(t, err) - - assert.Equal(t, "batch/v1", asset.Platform.Version) - assert.Equal(t, "k8s-cronjob", asset.Platform.Name) - assert.ElementsMatch(t, []string{"k8s", "k8s-workload"}, asset.Platform.Family) - assert.Equal(t, "test123", asset.Labels["k8s.mondoo.com/namespace"]) - assert.Equal(t, "cronjob", asset.Connections[0].Options["object-kind"]) -} - -func TestAssetNodeData(t *testing.T) { - // Seed CronJobs - node := corev1.Node{ - TypeMeta: metav1.TypeMeta{ - Kind: "Node", - APIVersion: "v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "minikube", - UID: "123", - }, - Spec: corev1.NodeSpec{}, - } - - clusterIdentifier := "//platformid.api.mondoo.app/runtime/k8s/uid/e26043bb-8669-48a2-b684-b1e132198cdc" - - tc := &providers.Config{} - - asset, err := createAssetFromObject(&node, "k8s-cluster", tc, clusterIdentifier) - require.NoError(t, err) - - assert.Equal(t, "v1", asset.Platform.Version) - assert.Equal(t, "k8s-node", asset.Platform.Name) - assert.ElementsMatch(t, []string{"k8s"}, asset.Platform.Family) - assert.Equal(t, "node", asset.Connections[0].Options["object-kind"]) -} diff --git a/_motor/discovery/k8s/common.go b/_motor/discovery/k8s/common.go deleted file mode 100644 index 42ef02451c..0000000000 --- a/_motor/discovery/k8s/common.go +++ /dev/null @@ -1,219 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package k8s - -import ( - "fmt" - "strings" - - "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9" - "go.mondoo.com/cnquery/v9/motor/asset" - "go.mondoo.com/cnquery/v9/motor/discovery/common" - "go.mondoo.com/cnquery/v9/motor/providers" - "go.mondoo.com/cnquery/v9/motor/providers/k8s" -) - -type K8sResourceIdentifier struct { - Type string - Namespace string - Name string -} - -// addSeparateAssets Depending on config options it will search for additional assets which should be listed separately. -func addSeparateAssets( - tc *providers.Config, - p k8s.KubernetesProvider, - nsFilter NamespaceFilterOpts, - resourcesFilter map[string][]K8sResourceIdentifier, - clusterIdentifier string, - od *k8s.PlatformIdOwnershipDirectory, - features cnquery.Features, -) ([]*asset.Asset, error) { - resolved := []*asset.Asset{} - - // discover deployments - if tc.IncludesOneOfDiscoveryTarget(common.DiscoveryAll, common.DiscoveryAuto, DiscoveryDeployments) { - // fetch deployment information - log.Debug().Strs("namespace", nsFilter.include).Msg("search for deployments") - connection := tc.Clone() - deployments, err := ListDeployments(p, connection, clusterIdentifier, nsFilter, resourcesFilter, od) - if err != nil { - log.Error().Err(err).Msg("could not fetch k8s deployments") - return nil, err - } - resolved = append(resolved, deployments...) - } - - // discover k8s pods - if tc.IncludesOneOfDiscoveryTarget(common.DiscoveryAll, common.DiscoveryAuto, DiscoveryPods) { - // fetch pod information - log.Debug().Strs("namespace", nsFilter.include).Msg("search for pods") - connection := tc.Clone() - pods, err := ListPods(p, connection, clusterIdentifier, nsFilter, resourcesFilter, od) - if err != nil { - log.Error().Err(err).Msg("could not fetch k8s pods") - return nil, err - } - resolved = append(resolved, pods...) - } - - // discover k8s pod images - if tc.IncludesOneOfDiscoveryTarget(common.DiscoveryAll, DiscoveryContainerImages) { - // fetch pod information - log.Debug().Strs("namespace", nsFilter.include).Msg("search for pods images") - containerimages, err := ListPodImages(p, nsFilter, od) - if err != nil { - log.Error().Err(err).Msg("could not fetch k8s pods images") - return nil, err - } - resolved = append(resolved, containerimages...) - } - - // discovery k8s daemonsets - if tc.IncludesOneOfDiscoveryTarget(common.DiscoveryAll, common.DiscoveryAuto, DiscoveryDaemonSets) { - log.Debug().Strs("namespace", nsFilter.include).Msg("search for daemonsets") - connection := tc.Clone() - daemonsets, err := ListDaemonSets(p, connection, clusterIdentifier, nsFilter, resourcesFilter, od) - if err != nil { - log.Error().Err(err).Msg("could not fetch k8s daemonsets") - return nil, err - } - resolved = append(resolved, daemonsets...) - } - - // discover cronjobs - if tc.IncludesOneOfDiscoveryTarget(common.DiscoveryAll, common.DiscoveryAuto, DiscoveryCronJobs) { - log.Debug().Strs("namespace", nsFilter.include).Msg("search for cronjobs") - connection := tc.Clone() - cronjobs, err := ListCronJobs(p, connection, clusterIdentifier, nsFilter, resourcesFilter, od) - if err != nil { - log.Error().Err(err).Msg("could not fetch k8s cronjobs") - return nil, err - } - resolved = append(resolved, cronjobs...) - } - - // discover jobs - if tc.IncludesOneOfDiscoveryTarget(common.DiscoveryAll, common.DiscoveryAuto, DiscoveryJobs, DiscoveryJobs) { - log.Debug().Strs("namespace", nsFilter.include).Msg("search for jobs") - connection := tc.Clone() - jobs, err := ListJobs(p, connection, clusterIdentifier, nsFilter, resourcesFilter, od) - if err != nil { - log.Error().Err(err).Msg("could not fetch k8s jobs") - return nil, err - } - resolved = append(resolved, jobs...) - } - - // discover statefulsets - if tc.IncludesOneOfDiscoveryTarget(common.DiscoveryAll, common.DiscoveryAuto, DiscoveryStatefulSets) { - log.Debug().Strs("namespace", nsFilter.include).Msg("search for statefulsets") - connection := tc.Clone() - statefulsets, err := ListStatefulSets(p, connection, clusterIdentifier, nsFilter, resourcesFilter, od) - if err != nil { - log.Error().Err(err).Msg("could not fetch k8s statefulsets") - return nil, err - } - resolved = append(resolved, statefulsets...) - } - - // discover replicasets - if tc.IncludesOneOfDiscoveryTarget(common.DiscoveryAll, common.DiscoveryAuto, DiscoveryReplicaSets) { - log.Debug().Strs("namespace", nsFilter.include).Msg("search for replicasets") - connection := tc.Clone() - replicasets, err := ListReplicaSets(p, connection, clusterIdentifier, nsFilter, resourcesFilter, od) - if err != nil { - log.Error().Err(err).Msg("could not fetch k8s replicasets") - return nil, err - } - resolved = append(resolved, replicasets...) - } - - // discover admissionreviews - if tc.IncludesOneOfDiscoveryTarget(common.DiscoveryAll, DiscoveryAdmissionReviews) { - log.Debug().Msg("search for admissionreviews") - connection := tc.Clone() - admissionReviews, err := ListAdmissionReviews(p, connection, clusterIdentifier, od) - if err != nil { - log.Error().Err(err).Msg("could not fetch k8s admissionreviews") - return nil, err - } - resolved = append(resolved, admissionReviews...) - } - - // discover ingresses - if tc.IncludesOneOfDiscoveryTarget(common.DiscoveryAll, common.DiscoveryAuto, DiscoveryIngresses) { - log.Debug().Msg("search for ingresses") - connection := tc.Clone() - ingresses, err := ListIngresses(p, connection, clusterIdentifier, nsFilter, resourcesFilter, od) - if err != nil { - log.Error().Err(err).Msg("could not fetch k8s ingresses") - } - resolved = append(resolved, ingresses...) - } - - // build a lookup on the k8s uid to look up individual assets to link - platformIdToAssetMap := map[string]*asset.Asset{} - for _, assetObj := range resolved { - for _, platformId := range assetObj.PlatformIds { - platformIdToAssetMap[platformId] = assetObj - } - } - - for id, a := range platformIdToAssetMap { - ownedBy := od.OwnedBy(id) - for _, ownerPlatformId := range ownedBy { - if aa, ok := platformIdToAssetMap[ownerPlatformId]; ok { - a.RelatedAssets = append(a.RelatedAssets, aa) - } else { - // If the owner object is not scanned we can still add an asset as we know most of the information - // from the ownerReference field - if platformEntry, ok := od.GetKubernetesObjectData(ownerPlatformId); ok { - platformData, err := createPlatformData(platformEntry.Kind, providers.RUNTIME_KUBERNETES_CLUSTER) - if err != nil || (!features.IsActive(cnquery.K8sNodeDiscovery) && platformData.Name == "k8s-node") { - continue - } - a.RelatedAssets = append(a.RelatedAssets, &asset.Asset{ - PlatformIds: []string{ownerPlatformId}, - Platform: platformData, - Name: platformEntry.Namespace + "/" + platformEntry.Name, - }) - } - } - } - } - return resolved, nil -} - -// resourceFilters parses the resource filters from the provider config -func resourceFilters(tc *providers.Config) (map[string][]K8sResourceIdentifier, error) { - resourcesFilter := make(map[string][]K8sResourceIdentifier) - if fOpt, ok := tc.Options["k8s-resources"]; ok { - fs := strings.Split(fOpt, ",") - for _, f := range fs { - ids := strings.Split(strings.TrimSpace(f), ":") - resType := ids[0] - var ns, name string - if _, ok := resourcesFilter[resType]; !ok { - resourcesFilter[resType] = []K8sResourceIdentifier{} - } - - switch len(ids) { - case 3: - // Namespaced resources have the format type:ns:name - ns = ids[1] - name = ids[2] - case 2: - // Non-namespaced resources have the format type:name - name = ids[1] - default: - return nil, fmt.Errorf("invalid k8s resource filter: %s", f) - } - - resourcesFilter[resType] = append(resourcesFilter[resType], K8sResourceIdentifier{Type: resType, Namespace: ns, Name: name}) - } - } - return resourcesFilter, nil -} diff --git a/_motor/discovery/k8s/const.go b/_motor/discovery/k8s/const.go deleted file mode 100644 index fbaea7d611..0000000000 --- a/_motor/discovery/k8s/const.go +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package k8s - -const ( - DiscoveryClusters = "clusters" - DiscoveryPods = "pods" - DiscoveryJobs = "jobs" - DiscoveryCronJobs = "cronjobs" - DiscoveryStatefulSets = "statefulsets" - DiscoveryDeployments = "deployments" - DiscoveryReplicaSets = "replicasets" - DiscoveryDaemonSets = "daemonsets" - DiscoveryContainerImages = "container-images" - DiscoveryAdmissionReviews = "admissionreviews" - DiscoveryIngresses = "ingresses" - DiscoveryNamespaces = "namespaces" -) diff --git a/_motor/discovery/k8s/container_utils.go b/_motor/discovery/k8s/container_utils.go deleted file mode 100644 index 839d765cd1..0000000000 --- a/_motor/discovery/k8s/container_utils.go +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package k8s - -import ( - "strings" - - "go.mondoo.com/cnquery/v9/types" - v1 "k8s.io/api/core/v1" -) - -const DockerPullablePrefix = "docker-pullable://" - -type ContainerImage struct { - image string - resolvedImage string - pullSecrets []v1.Secret -} - -func ResolveUniqueContainerImages(cs []v1.Container, ps []v1.Secret) map[string]ContainerImage { - imagesSet := make(map[string]ContainerImage) - for _, c := range cs { - imagesSet[c.Image] = ContainerImage{image: c.Image, resolvedImage: c.Image, pullSecrets: ps} - } - return imagesSet -} - -func ResolveUniqueContainerImagesFromStatus(cs []v1.ContainerStatus, ps []v1.Secret) map[string]ContainerImage { - imagesSet := make(map[string]ContainerImage) - for _, c := range cs { - image, resolvedImage := ResolveContainerImageFromStatus(c) - imagesSet[resolvedImage] = ContainerImage{image: image, resolvedImage: resolvedImage, pullSecrets: ps} - } - return imagesSet -} - -func ResolveContainerImageFromStatus(containerStatus v1.ContainerStatus) (string, string) { - image := containerStatus.Image - resolvedImage := containerStatus.ImageID - if strings.HasPrefix(resolvedImage, DockerPullablePrefix) { - resolvedImage = strings.TrimPrefix(resolvedImage, DockerPullablePrefix) - } - - // stopped pods may not include the resolved image - // pods with imagePullPolicy: Never do not have a proper ImageId value as it contains only the - // sha but not the repository. If we use that value, it will cause issues later because we will - // eventually try to pull an image by providing just the sha without a repo. - if len(resolvedImage) == 0 || !strings.Contains(resolvedImage, "@") { - resolvedImage = containerStatus.Image - } - - return image, resolvedImage -} - -// UniqueImagesForPod returns the unique container images for a pod. Images are compared based on their digest -// if that is available in the pod status. If there is no pod status set, the container image tag is used. -func UniqueImagesForPod(pod v1.Pod, credsStore *credsStore) map[string]ContainerImage { - imagesSet := make(map[string]ContainerImage) - - pullSecrets := make([]v1.Secret, 0, len(pod.Spec.ImagePullSecrets)) - for _, ps := range pod.Spec.ImagePullSecrets { - s, err := credsStore.Get(pod.Namespace, ps.Name) // TODO: figure out if we want to do anything with the error here - if err == nil { - pullSecrets = append(pullSecrets, *s) - } - } - - // it is best to read the image from the container status since it is resolved - // and more accurate, for static file scan we also need to fall-back to pure spec - // since the status will not be set - imagesSet = types.MergeMaps(imagesSet, ResolveUniqueContainerImagesFromStatus(pod.Status.InitContainerStatuses, pullSecrets)) - - // fall-back to spec - if len(pod.Spec.InitContainers) > 0 && len(pod.Status.InitContainerStatuses) == 0 { - imagesSet = types.MergeMaps(imagesSet, ResolveUniqueContainerImages(pod.Spec.InitContainers, pullSecrets)) - } - - imagesSet = types.MergeMaps(imagesSet, ResolveUniqueContainerImagesFromStatus(pod.Status.ContainerStatuses, pullSecrets)) - - // fall-back to spec - if len(pod.Spec.Containers) > 0 && len(pod.Status.ContainerStatuses) == 0 { - imagesSet = types.MergeMaps(imagesSet, ResolveUniqueContainerImages(pod.Spec.Containers, pullSecrets)) - } - return imagesSet -} diff --git a/_motor/discovery/k8s/creds_store.go b/_motor/discovery/k8s/creds_store.go deleted file mode 100644 index 3d14424e9d..0000000000 --- a/_motor/discovery/k8s/creds_store.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package k8s - -import ( - "fmt" - - "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/motor/providers/k8s" - v1 "k8s.io/api/core/v1" -) - -type cacheEntry struct { - secret *v1.Secret - err error -} - -type credsStore struct { - provider k8s.KubernetesProvider - cache map[string]cacheEntry -} - -func NewCredsStore(p k8s.KubernetesProvider) *credsStore { - return &credsStore{ - provider: p, - cache: make(map[string]cacheEntry), - } -} - -// Get retrieves the secret with the provided namespace and name. The value is retrieved -// once and is cached. All consecutive calls will retrieve the cached value. Note that the -// implementation is not thread-safe. -func (c *credsStore) Get(namespace, name string) (*v1.Secret, error) { - key := credsStoreKey(namespace, name) - if s, ok := c.cache[key]; ok { - return s.secret, s.err - } - - s, err := c.provider.Secret(namespace, name) - // We log the warning here to make sure we don't log the same message for every pod that uses - // the same pull secret. - if err != nil { - log.Warn().Msgf( - "cannot read image pull secret %s/%s from cluster. Image pulling might now work", namespace, name) - } - c.cache[key] = cacheEntry{secret: s, err: err} - return s, err -} - -func credsStoreKey(namespace, name string) string { - return fmt.Sprintf("%s:%s", namespace, name) -} diff --git a/_motor/discovery/k8s/list_admission_reviews.go b/_motor/discovery/k8s/list_admission_reviews.go deleted file mode 100644 index a1b65c22fd..0000000000 --- a/_motor/discovery/k8s/list_admission_reviews.go +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package k8s - -import ( - "bytes" - "strings" - - "github.com/pkg/errors" - "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/motor/asset" - "go.mondoo.com/cnquery/v9/motor/providers" - "go.mondoo.com/cnquery/v9/motor/providers/k8s" - "go.mondoo.com/cnquery/v9/motor/providers/k8s/resources" - admissionv1 "k8s.io/api/admission/v1" - "k8s.io/apimachinery/pkg/api/meta" -) - -// ListAdmissionReviews list all AdmissionReview resources in the manifest. -func ListAdmissionReviews( - p k8s.KubernetesProvider, - connection *providers.Config, - clusterIdentifier string, - od *k8s.PlatformIdOwnershipDirectory, -) ([]*asset.Asset, error) { - admissionReviews, err := p.AdmissionReviews() - if err != nil { - return nil, errors.Wrap(err, "failed to list AdmissionReviews") - } - - assets := []*asset.Asset{} - for i := range admissionReviews { - aReview := admissionReviews[i] - - asset, err := assetFromAdmissionReview(aReview, p.Runtime(), connection, clusterIdentifier) - if err != nil { - return nil, errors.Wrap(err, "failed to create asset from admission review") - } - - log.Debug().Str("connection", asset.Connections[0].Host).Msg("resolved AdmissionReview") - - assets = append(assets, asset) - } - - return assets, nil -} - -func assetFromAdmissionReview(a admissionv1.AdmissionReview, runtime string, connection *providers.Config, clusterIdentifier string) (*asset.Asset, error) { - // Use the meta from the request object. - obj, err := resources.ResourcesFromManifest(bytes.NewReader(a.Request.Object.Raw)) - if err != nil { - log.Error().Err(err).Msg("failed to parse object from admission review") - return nil, err - } - objMeta, err := meta.Accessor(obj[0]) - if err != nil { - log.Error().Err(err).Msg("could not access object attributes") - return nil, err - } - objType, err := meta.TypeAccessor(&a) - if err != nil { - log.Error().Err(err).Msg("could not access object attributes") - return nil, err - } - - objectKind := objType.GetKind() - platformData, err := createPlatformData(a.Kind, runtime) - if err != nil { - return nil, err - } - platformData.Version = objType.GetAPIVersion() - platformData.Build = objMeta.GetResourceVersion() - platformData.Labels = map[string]string{ - "uid": string(objMeta.GetUID()), - } - - assetLabels := objMeta.GetLabels() - if assetLabels == nil { - assetLabels = map[string]string{} - } - ns := objMeta.GetNamespace() - var name string - if ns != "" { - name = ns + "/" + objMeta.GetName() - platformData.Labels["namespace"] = ns - } else { - name = objMeta.GetName() - } - - addMondooAssetLabels(assetLabels, objMeta, objType, clusterIdentifier) - - asset := &asset.Asset{ - PlatformIds: []string{k8s.NewPlatformWorkloadId(clusterIdentifier, strings.ToLower(objectKind), objMeta.GetNamespace(), objMeta.GetName(), string(objMeta.GetUID()))}, - Name: name, - Platform: platformData, - Connections: []*providers.Config{connection}, - State: asset.State_STATE_ONLINE, - Labels: assetLabels, - } - - return asset, nil -} diff --git a/_motor/discovery/k8s/list_admission_reviews_test.go b/_motor/discovery/k8s/list_admission_reviews_test.go deleted file mode 100644 index f1336a69bd..0000000000 --- a/_motor/discovery/k8s/list_admission_reviews_test.go +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package k8s - -import ( - "bytes" - "io" - "testing" - - "github.com/golang/mock/gomock" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/motor/providers" - "go.mondoo.com/cnquery/v9/motor/providers/k8s" - - admissionv1 "k8s.io/api/admission/v1" - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/serializer/json" - "k8s.io/client-go/kubernetes/scheme" -) - -func TestListAdmissionReviews(t *testing.T) { - mockCtrl := gomock.NewController(t) - defer mockCtrl.Finish() - - p := k8s.NewMockKubernetesProvider(mockCtrl) - // called for each AdmissionReview - p.EXPECT().Runtime().Return("k8s-cluster") - - pod := corev1.Pod{ - TypeMeta: metav1.TypeMeta{ - Kind: "Pod", - APIVersion: "v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "nginx", - Namespace: "default", - UID: "123", - }, - Spec: corev1.PodSpec{ - Containers: []corev1.Container{{Image: "nginx:1.22.0-alpine"}}, - }, - } - s := json.NewYAMLSerializer(json.DefaultMetaFactory, scheme.Scheme, scheme.Scheme) - - var b bytes.Buffer - foo := io.Writer(&b) - err := s.Encode(&pod, foo) - require.NoError(t, err) - // Seed AdmissionReviews - admissionReviews := []admissionv1.AdmissionReview{ - { - TypeMeta: metav1.TypeMeta{ - Kind: "AdmissionReview", - APIVersion: "admission.k8s.io/v1", - }, - Request: &admissionv1.AdmissionRequest{ - Name: "nginx", - Namespace: "default", - UID: "123", - Object: runtime.RawExtension{Raw: b.Bytes()}, - }, - }, - } - - p.EXPECT().AdmissionReviews().Return(admissionReviews, nil) - - expectedAssetNames := []string{ - pod.Namespace + "/" + pod.Name, - } - - clusterIdentifier := "//platformid.api.mondoo.app/runtime/k8s/uid/e26043bb-8669-48a2-b684-b1e132198cdc" - - expectedAssetPlatformIds := []string{ - clusterIdentifier + "/namespace/" + pod.Namespace + "/admissionreviews/name/" + pod.Name, - } - - pCfg := &providers.Config{} - ownershipDir := k8s.NewEmptyPlatformIdOwnershipDirectory(clusterIdentifier) - assets, err := ListAdmissionReviews(p, pCfg, clusterIdentifier, ownershipDir) - require.NoError(t, err) - - var assetNames []string - for _, a := range assets { - assetNames = append(assetNames, a.Name) - } - - var assetPlatformIds []string - for _, a := range assets { - assetPlatformIds = append(assetPlatformIds, a.PlatformIds[0]) - } - - assert.ElementsMatch(t, expectedAssetNames, assetNames) - assert.ElementsMatch(t, expectedAssetPlatformIds, assetPlatformIds) - assert.Equal(t, "admission.k8s.io/v1", assets[0].Platform.Version) - assert.Equal(t, "k8s-admission", assets[0].Platform.Name) - assert.ElementsMatch(t, []string{"k8s", "k8s-admission"}, assets[0].Platform.Family) - assert.Equal(t, pod.Namespace, assets[0].Labels["k8s.mondoo.com/namespace"]) -} diff --git a/_motor/discovery/k8s/list_images.go b/_motor/discovery/k8s/list_images.go deleted file mode 100644 index 1c518f139a..0000000000 --- a/_motor/discovery/k8s/list_images.go +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package k8s - -import ( - "encoding/json" - "fmt" - "strings" - - "github.com/docker/cli/cli/config/configfile" - "github.com/google/go-containerregistry/pkg/name" - - "go.mondoo.com/cnquery/v9/motor/discovery/container_registry" - "go.mondoo.com/cnquery/v9/motor/vault" - "go.mondoo.com/cnquery/v9/types" - - "github.com/pkg/errors" - "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/motor/asset" - "go.mondoo.com/cnquery/v9/motor/providers/k8s" - v1 "k8s.io/api/core/v1" -) - -// ListPodImages lits all container images for the pods in the cluster. Only unique container images are returned. -// Uniqueness is determined based on the container digests. -func ListPodImages(p k8s.KubernetesProvider, nsFilter NamespaceFilterOpts, od *k8s.PlatformIdOwnershipDirectory) ([]*asset.Asset, error) { - namespaces, err := p.Namespaces() - if err != nil { - return nil, errors.Wrap(err, "could not list kubernetes namespaces") - } - - // Grab the unique container images in the cluster. - runningImages := make(map[string]ContainerImage) - credsStore := NewCredsStore(p) - for i := range namespaces { - namespace := namespaces[i] - skip, err := skipNamespace(namespace, nsFilter) - if err != nil { - log.Error().Err(err).Str("namespace", namespace.Name).Msg("error checking whether namespace should be included or excluded") - return nil, err - } - if skip { - log.Debug().Str("namespace", namespace.Name).Msg("namespace not included") - continue - } - - pods, err := p.Pods(namespace) - if err != nil { - return nil, errors.Wrap(err, "failed to list pods") - } - - for j := range pods { - od.Add(pods[j]) - podImages := UniqueImagesForPod(*pods[j], credsStore) - runningImages = types.MergeMaps(runningImages, podImages) - } - } - - // Convert the container images to assets. - assets := make(map[string]*asset.Asset) - for _, i := range runningImages { - a, err := newPodImageAsset(i) - if err != nil { - log.Error().Err(err).Msg("failed to convert container image to asset") - continue - } - - // It is still possible to have unique images at this point. There might be - // multiple image tags that actually point to the same digest. If we are scanning - // a manifest, where there is no container status, we can only know that the 2 images - // are identical after we resolve them with the container registry. - assets[a.Labels["docker.io/digest"]] = a - log.Debug().Str("name", a.Name).Str("image", a.Connections[0].Host).Msg("resolved pod") - } - - return types.MapValuesToSlice(assets), nil -} - -func newPodImageAsset(i ContainerImage) (*asset.Asset, error) { - ccresolver := container_registry.NewContainerRegistryResolver() - - ref, err := name.ParseReference(i.resolvedImage, name.WeakValidation) - if err != nil { - return nil, err - } - - a, err := ccresolver.GetImage(ref, nil) - // If there was an error getting the image, try to resolve it using image pull secrets. - // It might be that the container is coming from a private repo. - if err != nil { - for _, secret := range i.pullSecrets { - if cfg, ok := secret.Data[v1.DockerConfigJsonKey]; ok { - creds, err := toCredential(cfg) - if err != nil { - continue - } - - a, err = ccresolver.GetImage(ref, creds) - if err == nil { - break - } - } - } - } - - // If at this point we still have no asset it means that neither public scan worked, nor - // a scan using pull secrets. - if a == nil { - return nil, fmt.Errorf("could not resolve image %s. %v", i.resolvedImage, err) - } - - // parse image name to extract tags - tagName := "" - if len(i.image) > 0 { - tag, err := name.NewTag(i.image, name.WeakValidation) - if err == nil { - tagName = tag.Name() - } - } - if a.Labels == nil { - a.Labels = map[string]string{} - } - a.Labels["docker.io/tags"] = tagName - return a, nil -} - -func isIncluded(value string, included []string) bool { - if len(included) == 0 { - return true - } - - for _, ex := range included { - if strings.EqualFold(ex, value) { - return true - } - } - - return false -} - -func toCredential(cfg []byte) ([]*vault.Credential, error) { - cf := configfile.ConfigFile{} - if err := json.Unmarshal(cfg, &cf); err != nil { - return nil, err - } - - var creds []*vault.Credential - for _, v := range cf.AuthConfigs { - c := &vault.Credential{ - User: v.Username, - } - - if v.Password != "" { - c.Type = vault.CredentialType_password - c.Secret = []byte(v.Password) - } else if v.RegistryToken != "" { - c.Type = vault.CredentialType_bearer - c.Secret = []byte(v.RegistryToken) - } - creds = append(creds, c) - } - return creds, nil -} diff --git a/_motor/discovery/k8s/list_images_test.go b/_motor/discovery/k8s/list_images_test.go deleted file mode 100644 index 5867c6c218..0000000000 --- a/_motor/discovery/k8s/list_images_test.go +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package k8s - -import ( - "testing" - - "go.mondoo.com/cnquery/v9/motor/motorid/containerid" - - "github.com/golang/mock/gomock" - "github.com/google/go-containerregistry/pkg/name" - "github.com/google/go-containerregistry/pkg/v1/remote" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/motor/providers/k8s" - - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -func TestListPodImage(t *testing.T) { - mockCtrl := gomock.NewController(t) - defer mockCtrl.Finish() - - p := k8s.NewMockKubernetesProvider(mockCtrl) - - // Seed namespaces - nss := []corev1.Namespace{ - {ObjectMeta: metav1.ObjectMeta{Name: "default"}}, - {ObjectMeta: metav1.ObjectMeta{Name: "kube-system"}}, - } - p.EXPECT().Namespaces().Return(nss, nil) - - // Seed pods - pods1 := []*corev1.Pod{ - { - ObjectMeta: metav1.ObjectMeta{Name: "nginx", Namespace: nss[0].Name}, - Spec: corev1.PodSpec{ - Containers: []corev1.Container{{Image: "nginx:1.22.0-alpine"}}, - }, - }, - { - ObjectMeta: metav1.ObjectMeta{Name: "nginx2", Namespace: nss[0].Name}, - Spec: corev1.PodSpec{ - Containers: []corev1.Container{{Image: "nginx:1.22.0-alpine"}}, - }, - }, - } - - pods2 := []*corev1.Pod{ - { - ObjectMeta: metav1.ObjectMeta{Name: "kube-proxy", Namespace: nss[1].Name}, - Spec: corev1.PodSpec{ - InitContainers: []corev1.Container{{Image: "k8s.gcr.io/kube-proxy:v1.23.3"}}, - Containers: []corev1.Container{{Image: "k8s.gcr.io/kube-proxy:v1.23.3"}}, - }, - }, - { - ObjectMeta: metav1.ObjectMeta{Name: "kube-scheduler", Namespace: nss[1].Name}, - Spec: corev1.PodSpec{ - Containers: []corev1.Container{{Image: "k8s.gcr.io/kube-scheduler:v1.23.3"}}, - }, - }, - } - p.EXPECT().Pods(nss[0]).Return(pods1, nil) - p.EXPECT().Pods(nss[1]).Return(pods2, nil) - - // nginx's tags seem to change digests, so resolve it to figure out what is the correct one - ref, err := name.ParseReference("nginx:1.22.0-alpine", name.WeakValidation) - require.NoError(t, err) - desc, err := remote.Get(ref) - require.NoError(t, err) - - imgDigest := desc.Digest.String() - repoName := ref.Context().Name() - imageUrl := repoName + "@" + containerid.ShortContainerImageID(imgDigest) - - expectedAssetNames := []string{ - imageUrl, - "k8s.gcr.io/kube-scheduler@32308abe86f7", - "k8s.gcr.io/kube-proxy@def87f007b49", - } - - clusterIdentifier := "//platformid.api.mondoo.app/runtime/k8s/uid/e26043bb-8669-48a2-b684-b1e132198cdc" - ownershipDir := k8s.NewEmptyPlatformIdOwnershipDirectory(clusterIdentifier) - assets, err := ListPodImages(p, NamespaceFilterOpts{}, ownershipDir) - assert.NoError(t, err) - - var assetNames []string - for _, a := range assets { - assetNames = append(assetNames, a.Name) - } - - assert.ElementsMatch(t, expectedAssetNames, assetNames) -} - -func TestListPodImage_FromStatus(t *testing.T) { - mockCtrl := gomock.NewController(t) - defer mockCtrl.Finish() - - p := k8s.NewMockKubernetesProvider(mockCtrl) - - // Seed namespaces - nss := []corev1.Namespace{ - {ObjectMeta: metav1.ObjectMeta{Name: "default"}}, - {ObjectMeta: metav1.ObjectMeta{Name: "kube-system"}}, - } - p.EXPECT().Namespaces().Return(nss, nil) - - // Seed pods - pods1 := []*corev1.Pod{ - { - ObjectMeta: metav1.ObjectMeta{Name: "nginx", Namespace: nss[0].Name}, - Spec: corev1.PodSpec{ - Containers: []corev1.Container{{Image: "nginx:1.22.0-alpine"}}, - }, - Status: corev1.PodStatus{ - ContainerStatuses: []corev1.ContainerStatus{ - { - Image: "nginx:1.22.0-alpine", - ImageID: "docker-pullable://nginx@sha256:f335d7436887b39393409261603fb248e0c385ec18997d866dd44f7e9b621096", - }, - }, - }, - }, - { - ObjectMeta: metav1.ObjectMeta{Name: "nginx2", Namespace: nss[0].Name}, - Spec: corev1.PodSpec{ - Containers: []corev1.Container{{Image: "nginx:1.22.0-alpine"}}, - }, - Status: corev1.PodStatus{ - ContainerStatuses: []corev1.ContainerStatus{ - { - Image: "nginx:1.22.0-alpine", - ImageID: "docker-pullable://nginx@sha256:f335d7436887b39393409261603fb248e0c385ec18997d866dd44f7e9b621096", - }, - }, - }, - }, - } - - pods2 := []*corev1.Pod{ - { - ObjectMeta: metav1.ObjectMeta{Name: "kube-proxy", Namespace: nss[1].Name}, - Spec: corev1.PodSpec{ - InitContainers: []corev1.Container{{Image: "k8s.gcr.io/kube-proxy:v1.23.3"}}, - Containers: []corev1.Container{{Image: "k8s.gcr.io/kube-proxy:v1.23.3"}}, - }, - Status: corev1.PodStatus{ - InitContainerStatuses: []corev1.ContainerStatus{ - { - Image: "k8s.gcr.io/kube-proxy:v1.23.3", - ImageID: "docker-pullable://k8s.gcr.io/kube-proxy@sha256:def87f007b49d50693aed83d4703d0e56c69ae286154b1c7a20cd1b3a320cf7c", - }, - }, - ContainerStatuses: []corev1.ContainerStatus{ - { - Image: "k8s.gcr.io/kube-proxy:v1.23.3", - ImageID: "docker-pullable://k8s.gcr.io/kube-proxy@sha256:def87f007b49d50693aed83d4703d0e56c69ae286154b1c7a20cd1b3a320cf7c", - }, - }, - }, - }, - { - ObjectMeta: metav1.ObjectMeta{Name: "kube-scheduler", Namespace: nss[1].Name}, - Spec: corev1.PodSpec{ - Containers: []corev1.Container{{Image: "k8s.gcr.io/kube-scheduler:v1.23.3"}}, - }, - Status: corev1.PodStatus{ - ContainerStatuses: []corev1.ContainerStatus{ - { - Image: "k8s.gcr.io/kube-scheduler:v1.23.3", - ImageID: "docker-pullable://k8s.gcr.io/kube-scheduler@sha256:32308abe86f7415611ca86ee79dd0a73e74ebecb2f9e3eb85fc3a8e62f03d0e7", - }, - }, - }, - }, - } - p.EXPECT().Pods(nss[0]).Return(pods1, nil) - p.EXPECT().Pods(nss[1]).Return(pods2, nil) - - expectedAssetNames := []string{ - "index.docker.io/library/nginx@f335d7436887", - "k8s.gcr.io/kube-scheduler@32308abe86f7", - "k8s.gcr.io/kube-proxy@def87f007b49", - } - - clusterIdentifier := "//platformid.api.mondoo.app/runtime/k8s/uid/e26043bb-8669-48a2-b684-b1e132198cdc" - ownershipDir := k8s.NewEmptyPlatformIdOwnershipDirectory(clusterIdentifier) - assets, err := ListPodImages(p, NamespaceFilterOpts{}, ownershipDir) - assert.NoError(t, err) - - var assetNames []string - for _, a := range assets { - assetNames = append(assetNames, a.Name) - } - - assert.ElementsMatch(t, expectedAssetNames, assetNames) -} diff --git a/_motor/discovery/k8s/list_ingresses.go b/_motor/discovery/k8s/list_ingresses.go deleted file mode 100644 index de483ba954..0000000000 --- a/_motor/discovery/k8s/list_ingresses.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package k8s - -import ( - "go.mondoo.com/cnquery/v9/motor/asset" - "go.mondoo.com/cnquery/v9/motor/providers" - "go.mondoo.com/cnquery/v9/motor/providers/k8s" -) - -// ListIngresses lists all ingresses in the cluster. -func ListIngresses( - p k8s.KubernetesProvider, - connection *providers.Config, - clusterIdentifier string, - nsFilter NamespaceFilterOpts, - resFilter map[string][]K8sResourceIdentifier, - od *k8s.PlatformIdOwnershipDirectory, -) ([]*asset.Asset, error) { - return ListNamespacedObj(p, connection, clusterIdentifier, nsFilter, resFilter, od, "ingress", p.Ingress, p.Ingresses) -} diff --git a/_motor/discovery/k8s/list_namespaces.go b/_motor/discovery/k8s/list_namespaces.go deleted file mode 100644 index 43f8bd5284..0000000000 --- a/_motor/discovery/k8s/list_namespaces.go +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package k8s - -import ( - "github.com/pkg/errors" - "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/motor/asset" - "go.mondoo.com/cnquery/v9/motor/providers" - "go.mondoo.com/cnquery/v9/motor/providers/k8s" - v1 "k8s.io/api/core/v1" - k8sErrors "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/api/meta" -) - -// ListNamespaces lists all namespaces in the cluster. -func ListNamespaces( - p k8s.KubernetesProvider, - connection *providers.Config, - clusterIdentifier string, - nsFilter NamespaceFilterOpts, - resFilter map[string][]K8sResourceIdentifier, - od *k8s.PlatformIdOwnershipDirectory, -) ([]*asset.Asset, error) { - nss := []*v1.Namespace{} - - if len(resFilter) > 0 { - if len(resFilter["namespace"]) == 0 { - return []*asset.Asset{}, nil - } - - for _, res := range resFilter["namespace"] { - ns, err := p.Namespace(res.Name) - if err != nil { - return nil, err - } - nss = append(nss, ns) - } - } else { - namespaces, err := p.Namespaces() - if err != nil { - // If we don't have rights to list the cluster namespaces, attempt getting them 1 by 1 - if k8sErrors.IsForbidden(err) && len(nsFilter.include) > 0 { - for _, ns := range nsFilter.include { - n, err := p.Namespace(ns) - if err != nil { - return nil, err - } - nss = append(nss, n) - } - } else { - return nil, errors.Wrap(err, "could not list kubernetes namespaces") - } - } - - for i := range namespaces { - ns := namespaces[i] - skip, err := skipNamespace(ns, nsFilter) - if err != nil { - log.Error().Err(err).Str("namespace", ns.Name).Msg("error checking whether Namespace should be included or excluded") - return nil, err - } - if skip { - log.Debug().Str("namespace", ns.Name).Msg("ignoring namespace") - continue - } - nss = append(nss, &ns) - } - } - - assets := []*asset.Asset{} - for i := range nss { - // The namespace can be a root asset, in this case the ownership directory will not be present - if od != nil { - od.Add(nss[i]) - } - - asset, err := createAssetFromObject(nss[i], p.Runtime(), connection, clusterIdentifier) - if err != nil { - return nil, errors.Wrap(err, "failed to create asset from namespace") - } - - obj, _ := meta.Accessor(nss[i]) - log.Debug().Str("name", obj.GetName()).Str("connection", asset.Connections[0].Host).Msg("resolved namespace") - - assets = append(assets, asset) - } - return assets, nil -} diff --git a/_motor/discovery/k8s/list_nodes.go b/_motor/discovery/k8s/list_nodes.go deleted file mode 100644 index a8565f695b..0000000000 --- a/_motor/discovery/k8s/list_nodes.go +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package k8s - -import ( - "regexp" - "strconv" - "strings" - - "github.com/pkg/errors" - "go.mondoo.com/cnquery/v9/motor/asset" - "go.mondoo.com/cnquery/v9/motor/motorid/gce" - "go.mondoo.com/cnquery/v9/motor/platform" - "go.mondoo.com/cnquery/v9/motor/providers" - "go.mondoo.com/cnquery/v9/motor/providers/k8s" - v1 "k8s.io/api/core/v1" -) - -// ListNodes lits all nodes in the cluster. -func ListNodes(p k8s.KubernetesProvider, connection *providers.Config, clusterIdentifier string) ([]*asset.Asset, []nodeRelationshipInfo, error) { - nodes, err := p.Nodes() - if err != nil { - return nil, nil, err - } - - assets := []*asset.Asset{} - nodeRelationshipInfos := []nodeRelationshipInfo{} - for i := range nodes { - node := nodes[i] - asset, err := createAssetFromObject(&node, p.Runtime(), connection, clusterIdentifier) - if err != nil { - return nil, nil, errors.Wrap(err, "failed to create asset from node") - } - - assets = append(assets, asset) - nInfo, _ := detectNodeRelationshipInfo(node) - if nInfo.hostInstanceAsset != nil { - asset.RelatedAssets = append(asset.RelatedAssets, nInfo.hostInstanceAsset) - } - nodeRelationshipInfos = append(nodeRelationshipInfos, nInfo) - } - - return assets, nodeRelationshipInfos, nil -} - -type nodeRelationshipInfo struct { - cloudAccountAsset *asset.Asset - hostInstanceAsset *asset.Asset -} - -var ( - gkeProviderIDInfoRegexp = regexp.MustCompile("^gce://([\\-0-9a-zA-Z]+)/([\\-0-9a-zA-Z]+)/.*") - aksProviderIDInstanceRegexp = regexp.MustCompile("^azure:///(.+)$") -) - -func detectNodeRelationshipInfo(node v1.Node) (nodeRelationshipInfo, bool) { - for k := range node.Labels { - if strings.HasPrefix(k, "eks.amazonaws.com") { - // The node info doesn't seem to have the AWS Account id - return nodeRelationshipInfo{}, false - } else if strings.HasPrefix(k, "cloud.google.com/gke") { - return gkeRelationshipInfo(node) - } else if strings.HasPrefix(k, "kubernetes.azure.com") { - return aksRelationshipInfo(node) - } - } - hostname := node.Labels["kubernetes.io/hostname"] - if hostname == "" { - return nodeRelationshipInfo{}, false - } - return nodeRelationshipInfo{ - hostInstanceAsset: &asset.Asset{ - Name: hostname, - PlatformIds: []string{"//platformid.api.mondoo.app/hostname/" + hostname}, - }, - }, true -} - -func gkeRelationshipInfo(node v1.Node) (nodeRelationshipInfo, bool) { - matches := gkeProviderIDInfoRegexp.FindStringSubmatch(node.Spec.ProviderID) - if len(matches) != 3 { - return nodeRelationshipInfo{}, false - } - project := matches[1] - zone := matches[2] - instanceID := node.Annotations["container.googleapis.com/instance_id"] - instanceIDInt, err := strconv.ParseUint(instanceID, 10, 64) - if err != nil { - return nodeRelationshipInfo{}, false - } - if project != "" && zone != "" && instanceID != "" { - cloudAccountAsset := &asset.Asset{ - Name: "GCP project " + project, - Platform: &platform.Platform{ - Kind: providers.Kind_KIND_API, - Runtime: providers.RUNTIME_GCP, - Title: "Google Cloud Platform", - }, - PlatformIds: []string{"//platformid.api.mondoo.app/runtime/gcp/projects/" + project}, - } - hostInstanceAsset := &asset.Asset{ - Name: node.Labels["kubernetes.io/hostname"], - Platform: &platform.Platform{ - Kind: providers.Kind_KIND_VIRTUAL_MACHINE, - Runtime: providers.RUNTIME_GCP_COMPUTE, - Arch: node.Labels["kubernetes.io/arch"], - }, - PlatformIds: []string{gce.MondooGcpInstanceID(project, zone, instanceIDInt)}, - RelatedAssets: []*asset.Asset{cloudAccountAsset}, - } - return nodeRelationshipInfo{ - cloudAccountAsset: cloudAccountAsset, - hostInstanceAsset: hostInstanceAsset, - }, true - } - return nodeRelationshipInfo{}, false -} - -func aksRelationshipInfo(node v1.Node) (nodeRelationshipInfo, bool) { - matches := aksProviderIDInstanceRegexp.FindStringSubmatch(node.Spec.ProviderID) - if len(matches) != 2 { - return nodeRelationshipInfo{}, false - } - parts := strings.Split(matches[1], "/") - if len(parts) < 2 || parts[0] != "subscriptions" { - return nodeRelationshipInfo{}, false - } - sub := parts[1] - cloudAccountAsset := &asset.Asset{ - Name: "Azure subscription " + sub, - Platform: &platform.Platform{ - Kind: providers.Kind_KIND_API, - Runtime: providers.RUNTIME_AZ, - }, - PlatformIds: []string{"//platformid.api.mondoo.app/runtime/azure/subscriptions/" + sub}, - } - hostInstanceAsset := &asset.Asset{ - Name: node.Labels["kubernetes.io/hostname"], - Platform: &platform.Platform{ - Kind: providers.Kind_KIND_VIRTUAL_MACHINE, - Runtime: providers.RUNTIME_AZ_COMPUTE, - Arch: node.Labels["kubernetes.io/arch"], - }, - PlatformIds: []string{"//platformid.api.mondoo.app/runtime/azure/" + matches[1]}, - RelatedAssets: []*asset.Asset{cloudAccountAsset}, - } - return nodeRelationshipInfo{ - cloudAccountAsset: cloudAccountAsset, - hostInstanceAsset: hostInstanceAsset, - }, true -} diff --git a/_motor/discovery/k8s/list_nodes_test.go b/_motor/discovery/k8s/list_nodes_test.go deleted file mode 100644 index eba79fd891..0000000000 --- a/_motor/discovery/k8s/list_nodes_test.go +++ /dev/null @@ -1,322 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package k8s - -import ( - "testing" - - "github.com/golang/mock/gomock" - "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/motor/providers" - "go.mondoo.com/cnquery/v9/motor/providers/k8s" - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -func TestListNodesAKS(t *testing.T) { - mockCtrl := gomock.NewController(t) - defer mockCtrl.Finish() - - p := k8s.NewMockKubernetesProvider(mockCtrl) - - nodes := []corev1.Node{ - { - TypeMeta: metav1.TypeMeta{ - Kind: "Node", - APIVersion: "v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "aks-default-36939070-vmss000000", - UID: "acc8d118-f62a-4743-a55c-71dd19201c6c", - Annotations: map[string]string{ - "csi.volume.kubernetes.io/nodeid": `{"disk.csi.azure.com":"aks-default-36939070-vmss000000","file.csi.azure.com":"aks-default-36939070-vmss000000"}`, - "node.alpha.kubernetes.io/ttl": "0", - "volumes.kubernetes.io/controller-managed-attach-detach": "true", - }, - Labels: map[string]string{ - "agentpool": "default", - "beta.kubernetes.io/arch": "amd64", - "beta.kubernetes.io/instance-type": "standard_d2_v2", - "beta.kubernetes.io/os": "linux", - "failure-domain.beta.kubernetes.io/region": "eastus", - "failure-domain.beta.kubernetes.io/zone": "0", - "kubernetes.azure.com/agentpool": "default", - "kubernetes.azure.com/cluster": "MC_mondoo-operator-tests-wcou_mondoo-operator-tests-wcou_eastus", - "kubernetes.azure.com/kubelet-identity-client-id": "c032ffd9-e9c3-4c4b-bece-1cee42d3da09", - "kubernetes.azure.com/mode": "system", - "kubernetes.azure.com/node-image-version": "AKSUbuntu-1804containerd-2022.08.15", - "kubernetes.azure.com/os-sku": "Ubuntu", - "kubernetes.azure.com/role": "agent", - "kubernetes.azure.com/storageprofile": "managed", - "kubernetes.azure.com/storagetier": "Standard_LRS", - "kubernetes.io/arch": "amd64", - "kubernetes.io/hostname": "aks-default-36939070-vmss000000", - "kubernetes.io/os": "linux", - "kubernetes.io/role": "agent", - "node-role.kubernetes.io/agent": "", - "node.kubernetes.io/instance-type": "standard_d2_v2", - "storageprofile": "managed", - "storagetier": "Standard_LRS", - "topology.disk.csi.azure.com/zone": "", - "topology.kubernetes.io/region": "eastus", - "topology.kubernetes.io/zone": "0", - }, - }, - Spec: corev1.NodeSpec{ - ProviderID: "azure:///subscriptions/f1a2873a-6b27-4097-aa7c-3df51f103e96/resourceGroups/mc_mondoo-operator-tests-wcou_mondoo-operator-tests-wcou_eastus/providers/Microsoft.Compute/virtualMachineScaleSets/aks-default-36939070-vmss/virtualMachines/0", - PodCIDR: "10.244.0.0/24", - PodCIDRs: []string{"10.244.0.0/24"}, - }, - }, - } - - p.EXPECT().Runtime().Return("k8s-cluster") - p.EXPECT().Nodes().Return(nodes, nil) - - clusterIdentifier := "//platformid.api.mondoo.app/runtime/k8s/uid/e26043bb-8669-48a2-b684-b1e132198cdc" - - pCfg := &providers.Config{} - assets, relInfo, err := ListNodes(p, pCfg, clusterIdentifier) - require.NoError(t, err) - require.Len(t, assets, 1) - require.Equal(t, "Kubernetes Node", assets[0].Platform.Title) - require.Equal(t, "k8s-node", assets[0].Platform.Name) - require.Equal(t, providers.Kind_KIND_K8S_OBJECT, assets[0].Platform.Kind) - require.ElementsMatch(t, []string{"k8s"}, assets[0].Platform.Family) - require.Equal(t, []string{"//platformid.api.mondoo.app/runtime/k8s/uid/e26043bb-8669-48a2-b684-b1e132198cdc/nodes/name/aks-default-36939070-vmss000000"}, assets[0].PlatformIds) - - // Adds relationship to host - require.Len(t, assets[0].RelatedAssets, 1) - require.Equal(t, "aks-default-36939070-vmss000000", assets[0].RelatedAssets[0].Name) - require.Equal(t, providers.Kind_KIND_VIRTUAL_MACHINE, assets[0].RelatedAssets[0].Platform.Kind) - require.Equal(t, providers.RUNTIME_AZ_COMPUTE, assets[0].RelatedAssets[0].Platform.Runtime) - require.Equal(t, "amd64", assets[0].RelatedAssets[0].Platform.Arch) - require.Equal(t, []string{"//platformid.api.mondoo.app/runtime/azure/subscriptions/f1a2873a-6b27-4097-aa7c-3df51f103e96/resourceGroups/mc_mondoo-operator-tests-wcou_mondoo-operator-tests-wcou_eastus/providers/Microsoft.Compute/virtualMachineScaleSets/aks-default-36939070-vmss/virtualMachines/0"}, assets[0].RelatedAssets[0].PlatformIds) - - require.NotNil(t, relInfo[0].hostInstanceAsset) - require.Equal(t, assets[0].RelatedAssets[0], relInfo[0].hostInstanceAsset) - require.NotNil(t, relInfo[0].cloudAccountAsset) - require.Equal(t, []string{"//platformid.api.mondoo.app/runtime/azure/subscriptions/f1a2873a-6b27-4097-aa7c-3df51f103e96"}, relInfo[0].cloudAccountAsset.PlatformIds) - require.Equal(t, providers.Kind_KIND_API, relInfo[0].cloudAccountAsset.Platform.Kind) - require.Equal(t, providers.RUNTIME_AZ, relInfo[0].cloudAccountAsset.Platform.Runtime) -} - -func TestListNodesGKE(t *testing.T) { - mockCtrl := gomock.NewController(t) - defer mockCtrl.Finish() - - p := k8s.NewMockKubernetesProvider(mockCtrl) - - nodes := []corev1.Node{ - { - TypeMeta: metav1.TypeMeta{ - Kind: "Node", - APIVersion: "v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "gke-gke-cluster-generic-pool-4dfcd37f-s3d6", - UID: "f2cd325c-23eb-465d-8843-9e53665779f0", - Annotations: map[string]string{ - "container.googleapis.com/instance_id": "8976889368772093420", - }, - Labels: map[string]string{ - "beta.kubernetes.io/arch": "amd64", - "beta.kubernetes.io/instance-type": "n1-standard-2", - "beta.kubernetes.io/os": "linux", - "cloud.google.com/gke-boot-disk": "pd-standard", - "cloud.google.com/gke-container-runtime": "docker", - "cloud.google.com/gke-netd-ready": "true", - "cloud.google.com/gke-nodepool": "generic-pool", - "cloud.google.com/gke-os-distribution": "cos", - "cloud.google.com/machine-family": "n1", - "cluster_name": "gke-cluster", - "failure-domain.beta.kubernetes.io/region": "us-central1", - "failure-domain.beta.kubernetes.io/zone": "us-central1-b", - "iam.gke.io/gke-metadata-server-enabled": "true", - "kubernetes.io/arch": "amd64", - "kubernetes.io/hostname": "gke-gke-cluster-generic-pool-4dfcd37f-s3d6", - "kubernetes.io/os": "linux", - "node.kubernetes.io/instance-type": "n1-standard-2", - "node.kubernetes.io/masq-agent-ds-ready": "true", - "node_pool": "generic-pool", - "topology.gke.io/zone": "us-central1-b", - "topology.kubernetes.io/region": "us-central1", - "topology.kubernetes.io/zone": "us-central1-b", - }, - }, - Spec: corev1.NodeSpec{ - ProviderID: "gce://mondoo-test/us-central1-b/gke-gke-cluster-generic-pool-4dfcd37f-s3d6", - PodCIDR: "192.168.1.0/24", - PodCIDRs: []string{"192.168.1.0/24"}, - }, - }, - } - - p.EXPECT().Runtime().Return("k8s-cluster") - p.EXPECT().Nodes().Return(nodes, nil) - - clusterIdentifier := "//platformid.api.mondoo.app/runtime/k8s/uid/e26043bb-8669-48a2-b684-b1e132198cdc" - - pCfg := &providers.Config{} - assets, relInfo, err := ListNodes(p, pCfg, clusterIdentifier) - require.NoError(t, err) - require.Len(t, assets, 1) - require.Equal(t, "Kubernetes Node", assets[0].Platform.Title) - require.Equal(t, "k8s-node", assets[0].Platform.Name) - require.Equal(t, providers.Kind_KIND_K8S_OBJECT, assets[0].Platform.Kind) - require.ElementsMatch(t, []string{"k8s"}, assets[0].Platform.Family) - require.Equal(t, []string{"//platformid.api.mondoo.app/runtime/k8s/uid/e26043bb-8669-48a2-b684-b1e132198cdc/nodes/name/gke-gke-cluster-generic-pool-4dfcd37f-s3d6"}, assets[0].PlatformIds) - - // Adds relatonship to host - require.Len(t, assets[0].RelatedAssets, 1) - require.Equal(t, "gke-gke-cluster-generic-pool-4dfcd37f-s3d6", assets[0].RelatedAssets[0].Name) - require.Equal(t, providers.Kind_KIND_VIRTUAL_MACHINE, assets[0].RelatedAssets[0].Platform.Kind) - require.Equal(t, providers.RUNTIME_GCP_COMPUTE, assets[0].RelatedAssets[0].Platform.Runtime) - require.Equal(t, "amd64", assets[0].RelatedAssets[0].Platform.Arch) - require.Equal(t, []string{"//platformid.api.mondoo.app/runtime/gcp/compute/v1/projects/mondoo-test/zones/us-central1-b/instances/8976889368772093420"}, assets[0].RelatedAssets[0].PlatformIds) - - require.NotNil(t, relInfo[0].hostInstanceAsset) - require.Equal(t, assets[0].RelatedAssets[0], relInfo[0].hostInstanceAsset) - require.NotNil(t, relInfo[0].cloudAccountAsset) - require.Equal(t, []string{"//platformid.api.mondoo.app/runtime/gcp/projects/mondoo-test"}, relInfo[0].cloudAccountAsset.PlatformIds) - require.Equal(t, providers.Kind_KIND_API, relInfo[0].cloudAccountAsset.Platform.Kind) - require.Equal(t, providers.RUNTIME_GCP, relInfo[0].cloudAccountAsset.Platform.Runtime) -} - -func TestListNodesEKS(t *testing.T) { - mockCtrl := gomock.NewController(t) - defer mockCtrl.Finish() - - p := k8s.NewMockKubernetesProvider(mockCtrl) - - nodes := []corev1.Node{ - { - TypeMeta: metav1.TypeMeta{ - Kind: "Node", - APIVersion: "v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "ip-10-0-5-36.eu-central-1.compute.internal", - UID: "c9a5bb24-e77b-46fd-be55-8a247faee098", - Annotations: map[string]string{ - "alpha.kubernetes.io/provided-node-ip": "10.0.5.36", - }, - Labels: map[string]string{ - "beta.kubernetes.io/arch": "amd64", - "beta.kubernetes.io/instance-type": "m5zn.large", - "beta.kubernetes.io/os": "linux", - "eks.amazonaws.com/capacityType": "SPOT", - "eks.amazonaws.com/nodegroup": "eks-managed-nodes-l3il-20220901164719853800000006", - "eks.amazonaws.com/nodegroup-image": "ami-01c52a64630ff492f", - "eks.amazonaws.com/sourceLaunchTemplateId": "lt-0b3c2c84c209ec814", - "eks.amazonaws.com/sourceLaunchTemplateVersion": "1", - "failure-domain.beta.kubernetes.io/region": "eu-central-1", - "failure-domain.beta.kubernetes.io/zone": "eu-central-1b", - "k8s.io/cloud-provider-aws": "10f49535c88faa0a8024328860a01464", - "kubernetes.io/arch": "amd64", - "kubernetes.io/hostname": "ip-10-0-5-36.eu-central-1.compute.internal", - "kubernetes.io/os": "linux", - "node.kubernetes.io/instance-type": "m5zn.large", - "topology.kubernetes.io/region": "eu-central-1", - "topology.kubernetes.io/zone": "eu-central-1b", - }, - }, - Spec: corev1.NodeSpec{ - ProviderID: "aws:///eu-central-1b/i-0178150be4c94393d", - }, - }, - } - - p.EXPECT().Runtime().Return("k8s-cluster") - p.EXPECT().Nodes().Return(nodes, nil) - - clusterIdentifier := "//platformid.api.mondoo.app/runtime/k8s/uid/e26043bb-8669-48a2-b684-b1e132198cdc" - - pCfg := &providers.Config{} - assets, relInfo, err := ListNodes(p, pCfg, clusterIdentifier) - require.NoError(t, err) - require.Len(t, assets, 1) - require.Equal(t, "Kubernetes Node", assets[0].Platform.Title) - require.Equal(t, "k8s-node", assets[0].Platform.Name) - require.Equal(t, providers.Kind_KIND_K8S_OBJECT, assets[0].Platform.Kind) - require.ElementsMatch(t, []string{"k8s"}, assets[0].Platform.Family) - require.Equal(t, []string{"//platformid.api.mondoo.app/runtime/k8s/uid/e26043bb-8669-48a2-b684-b1e132198cdc/nodes/name/ip-10-0-5-36.eu-central-1.compute.internal"}, assets[0].PlatformIds) - - require.Len(t, assets[0].RelatedAssets, 0) - - require.Nil(t, relInfo[0].hostInstanceAsset) - require.Nil(t, relInfo[0].cloudAccountAsset) -} - -func TestListNodesK3S(t *testing.T) { - mockCtrl := gomock.NewController(t) - defer mockCtrl.Finish() - - p := k8s.NewMockKubernetesProvider(mockCtrl) - - nodes := []corev1.Node{ - { - TypeMeta: metav1.TypeMeta{ - Kind: "Node", - APIVersion: "v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "x1", - UID: "08677417-062a-4521-af10-901913b575cf", - Annotations: map[string]string{ - "k3s.io/hostname": "x1", - "k3s.io/internal-ip": "192.168.1.87", - "k3s.io/node-args": `'["server","--write-kubeconfig-mode","0644"]'`, - "k3s.io/node-config-hash": "LUZJBAJBVUEWLANIK5CQFBP3IKZUSSX643EDQVRRLL4O4D6AVNLQ====", - "k3s.io/node-env": `'{"K3S_DATA_DIR":"/var/lib/rancher/k3s/data/577968fa3d58539cc4265245941b7be688833e6bf5ad7869fa2afe02f15f1cd2"}'`, - "node.alpha.kubernetes.io/ttl": "0", - "volumes.kubernetes.io/controller-managed-attach-detach": "true", - }, - Labels: map[string]string{ - "beta.kubernetes.io/arch": "amd64", - "beta.kubernetes.io/instance-type": "k3s", - "beta.kubernetes.io/os": "linux", - "egress.k3s.io/cluster": "true", - "kubernetes.io/arch": "amd64", - "kubernetes.io/hostname": "x1", - "kubernetes.io/os": "linux", - "node-role.kubernetes.io/control-plane": "true", - "node-role.kubernetes.io/master": "true", - "node.kubernetes.io/instance-type": "k3s", - }, - }, - Spec: corev1.NodeSpec{ - ProviderID: "k3s://x1", - PodCIDR: "10.42.0.0/24", - PodCIDRs: []string{"10.42.0.0/24"}, - }, - }, - } - - p.EXPECT().Runtime().Return("k8s-cluster") - p.EXPECT().Nodes().Return(nodes, nil) - - clusterIdentifier := "//platformid.api.mondoo.app/runtime/k8s/uid/e26043bb-8669-48a2-b684-b1e132198cdc" - - pCfg := &providers.Config{} - assets, relInfo, err := ListNodes(p, pCfg, clusterIdentifier) - require.NoError(t, err) - require.Len(t, assets, 1) - require.Equal(t, "Kubernetes Node", assets[0].Platform.Title) - require.Equal(t, "k8s-node", assets[0].Platform.Name) - require.Equal(t, providers.Kind_KIND_K8S_OBJECT, assets[0].Platform.Kind) - require.ElementsMatch(t, []string{"k8s"}, assets[0].Platform.Family) - require.Equal(t, []string{"//platformid.api.mondoo.app/runtime/k8s/uid/e26043bb-8669-48a2-b684-b1e132198cdc/nodes/name/x1"}, assets[0].PlatformIds) - - // Adds relationship to host - require.Len(t, assets[0].RelatedAssets, 1) - require.Equal(t, "x1", assets[0].RelatedAssets[0].Name) - require.Equal(t, providers.Kind_KIND_UNKNOWN, assets[0].RelatedAssets[0].GetPlatform().GetKind()) - require.Equal(t, "", assets[0].RelatedAssets[0].GetPlatform().GetRuntime()) - require.Equal(t, []string{"//platformid.api.mondoo.app/hostname/x1"}, assets[0].RelatedAssets[0].PlatformIds) - - require.NotNil(t, relInfo[0].hostInstanceAsset) - require.Equal(t, assets[0].RelatedAssets[0], relInfo[0].hostInstanceAsset) - require.Nil(t, relInfo[0].cloudAccountAsset) -} diff --git a/_motor/discovery/k8s/list_workloads.go b/_motor/discovery/k8s/list_workloads.go deleted file mode 100644 index b202b9f720..0000000000 --- a/_motor/discovery/k8s/list_workloads.go +++ /dev/null @@ -1,231 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package k8s - -import ( - "fmt" - - "github.com/gobwas/glob" - "github.com/pkg/errors" - "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/motor/asset" - "go.mondoo.com/cnquery/v9/motor/providers" - "go.mondoo.com/cnquery/v9/motor/providers/k8s" - v1 "k8s.io/api/core/v1" - k8sErrors "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/api/meta" - "k8s.io/apimachinery/pkg/runtime" -) - -type NamespaceFilterOpts struct { - include []string - exclude []string -} - -// ListCronJobs list all cronjobs in the cluster. -func ListCronJobs( - p k8s.KubernetesProvider, - connection *providers.Config, - clusterIdentifier string, - nsFilter NamespaceFilterOpts, - resFilter map[string][]K8sResourceIdentifier, - od *k8s.PlatformIdOwnershipDirectory, -) ([]*asset.Asset, error) { - return ListNamespacedObj(p, connection, clusterIdentifier, nsFilter, resFilter, od, "cronjob", p.CronJob, p.CronJobs) -} - -func ListDaemonSets( - p k8s.KubernetesProvider, - connection *providers.Config, - clusterIdentifier string, - nsFilter NamespaceFilterOpts, - resFilter map[string][]K8sResourceIdentifier, - od *k8s.PlatformIdOwnershipDirectory, -) ([]*asset.Asset, error) { - return ListNamespacedObj(p, connection, clusterIdentifier, nsFilter, resFilter, od, "daemonset", p.DaemonSet, p.DaemonSets) -} - -// ListDeployments lits all deployments in the cluster. -func ListDeployments( - p k8s.KubernetesProvider, - connection *providers.Config, - clusterIdentifier string, - nsFilter NamespaceFilterOpts, - resFilter map[string][]K8sResourceIdentifier, - od *k8s.PlatformIdOwnershipDirectory, -) ([]*asset.Asset, error) { - return ListNamespacedObj(p, connection, clusterIdentifier, nsFilter, resFilter, od, "deployment", p.Deployment, p.Deployments) -} - -// ListJobs list all jobs in the cluster. -func ListJobs( - p k8s.KubernetesProvider, - connection *providers.Config, - clusterIdentifier string, - nsFilter NamespaceFilterOpts, - resFilter map[string][]K8sResourceIdentifier, - od *k8s.PlatformIdOwnershipDirectory, -) ([]*asset.Asset, error) { - return ListNamespacedObj(p, connection, clusterIdentifier, nsFilter, resFilter, od, "job", p.Job, p.Jobs) -} - -// ListPods list all pods in the cluster. -func ListPods( - p k8s.KubernetesProvider, - connection *providers.Config, - clusterIdentifier string, - nsFilter NamespaceFilterOpts, - resFilter map[string][]K8sResourceIdentifier, - od *k8s.PlatformIdOwnershipDirectory, -) ([]*asset.Asset, error) { - return ListNamespacedObj(p, connection, clusterIdentifier, nsFilter, resFilter, od, "pod", p.Pod, p.Pods) -} - -// ListReplicaSets list all replicaSets in the cluster. -func ListReplicaSets( - p k8s.KubernetesProvider, - connection *providers.Config, - clusterIdentifier string, - nsFilter NamespaceFilterOpts, - resFilter map[string][]K8sResourceIdentifier, - od *k8s.PlatformIdOwnershipDirectory, -) ([]*asset.Asset, error) { - return ListNamespacedObj(p, connection, clusterIdentifier, nsFilter, resFilter, od, "replicaset", p.ReplicaSet, p.ReplicaSets) -} - -// ListStatefulSets list all statefulsets in the cluster. -func ListStatefulSets( - p k8s.KubernetesProvider, - connection *providers.Config, - clusterIdentifier string, - nsFilter NamespaceFilterOpts, - resFilter map[string][]K8sResourceIdentifier, - od *k8s.PlatformIdOwnershipDirectory, -) ([]*asset.Asset, error) { - return ListNamespacedObj(p, connection, clusterIdentifier, nsFilter, resFilter, od, "statefulset", p.StatefulSet, p.StatefulSets) -} - -func ListNamespacedObj[T runtime.Object]( - p k8s.KubernetesProvider, - connection *providers.Config, - clusterIdentifier string, - nsFilter NamespaceFilterOpts, - resFilter map[string][]K8sResourceIdentifier, - od *k8s.PlatformIdOwnershipDirectory, - workloadType string, - getter func(string, string) (T, error), - lister func(v1.Namespace) ([]T, error), -) ([]*asset.Asset, error) { - workloads := []T{} - - if len(resFilter) > 0 { - // If there is a resources filter we should only retrieve the workloads that are in the filter. - if len(resFilter[workloadType]) == 0 { - return []*asset.Asset{}, nil - } - - for _, res := range resFilter[workloadType] { - ds, err := getter(res.Namespace, res.Name) - if err != nil { - return nil, errors.Wrapf(err, "failed to get %s %s/%s", workloadType, res.Namespace, res.Name) - } - - workloads = append(workloads, ds) - } - } else { - namespaces, err := p.Namespaces() - if err != nil { - // If we don't have rights to list the cluster namespaces, attempt getting them 1 by 1 - if k8sErrors.IsForbidden(err) && len(nsFilter.include) > 0 { - for _, ns := range nsFilter.include { - n, err := p.Namespace(ns) - if err != nil { - return nil, err - } - namespaces = append(namespaces, *n) - } - } else { - return nil, errors.Wrap(err, "could not list kubernetes namespaces") - } - } - - for i := range namespaces { - namespace := namespaces[i] - skip, err := skipNamespace(namespace, nsFilter) - if err != nil { - log.Error().Err(err).Str("namespace", namespace.Name).Msg("error checking whether Namespace should be included or excluded") - return nil, err - } - if skip { - log.Debug().Str("namespace", namespace.Name).Msg("ignoring namespace") - continue - } - - workloadsPerNamespace, err := lister(namespace) - if err != nil { - return nil, errors.Wrap(err, fmt.Sprintf("failed to list %ss", workloadType)) - } - workloads = append(workloads, workloadsPerNamespace...) - } - } - - assetsIdx := map[string]*asset.Asset{} - for i := range workloads { - od.Add(workloads[i]) - - asset, err := createAssetFromObject(workloads[i], p.Runtime(), connection, clusterIdentifier) - if err != nil { - return nil, errors.Wrap(err, fmt.Sprintf("failed to create asset from %s", workloadType)) - } - - // An error can never happen because of the type constraint. - obj, _ := meta.Accessor(workloads[i]) - log.Debug().Str("name", obj.GetName()).Str("connection", asset.Connections[0].Host).Msgf("resolved %s", workloadType) - - assetsIdx[asset.PlatformIds[0]] = asset - } - - // Return a unique list of assets. Manifests can contain a namespaces that is an empty string. When we try to list k8s - // resources for the empty namespace, that actually means list all resources. Therefore we can have duplicate entries in the list. - // Here we just return only the unique assets to make sure the code works correctly with both manifests and k8s API. - assets := make([]*asset.Asset, 0, len(assetsIdx)) - for k := range assetsIdx { - assets = append(assets, assetsIdx[k]) - } - - return assets, nil -} - -func skipNamespace(namespace v1.Namespace, filter NamespaceFilterOpts) (bool, error) { - // anything explicitly specified in the list of includes means accept only from that list - if len(filter.include) > 0 { - for _, ns := range filter.include { - g, err := glob.Compile(ns) - if err != nil { - return false, err - } - if g.Match(namespace.Name) { - // stop looking, we found our match - return false, nil - } - } - - // didn't find it, so it must be skipped - return true, nil - } - - // if nothing explicitly meant to be included, then check whether - // it should be excluded - for _, ns := range filter.exclude { - g, err := glob.Compile(ns) - if err != nil { - return false, err - } - if g.Match(namespace.Name) { - return true, nil - } - } - - return false, nil -} diff --git a/_motor/discovery/k8s/list_workloads_test.go b/_motor/discovery/k8s/list_workloads_test.go deleted file mode 100644 index 050e500a15..0000000000 --- a/_motor/discovery/k8s/list_workloads_test.go +++ /dev/null @@ -1,1659 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package k8s - -import ( - "strings" - "testing" - - "github.com/golang/mock/gomock" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/motor/providers" - "go.mondoo.com/cnquery/v9/motor/providers/k8s" - appsv1 "k8s.io/api/apps/v1" - batchv1 "k8s.io/api/batch/v1" - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -func TestListCronJobs(t *testing.T) { - mockCtrl := gomock.NewController(t) - defer mockCtrl.Finish() - - p := k8s.NewMockKubernetesProvider(mockCtrl) - - // Seed namespaces - nss := []corev1.Namespace{ - {ObjectMeta: metav1.ObjectMeta{Name: "default"}}, - } - p.EXPECT().Namespaces().Return(nss, nil) - // called for each CronJob - p.EXPECT().Runtime().Return("k8s-cluster") - p.EXPECT().Runtime().Return("k8s-cluster") - - // pretend cronjob owned by deployment - parent := appsv1.Deployment{ - TypeMeta: metav1.TypeMeta{ - Kind: "Deployment", - APIVersion: "apps/v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "nginx-deployment", - Namespace: nss[0].Name, - UID: "000", - }, - Spec: appsv1.DeploymentSpec{ - Template: corev1.PodTemplateSpec{ - Spec: corev1.PodSpec{ - Containers: []corev1.Container{{Image: "nginx:1.22.0-alpine"}}, - }, - }, - }, - } - - // Seed CronJobs - cronjobs := []*batchv1.CronJob{ - { - TypeMeta: metav1.TypeMeta{ - Kind: "CronJob", - APIVersion: "batch/v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "nginx", - Namespace: nss[0].Name, - UID: "123", - OwnerReferences: []metav1.OwnerReference{ - { - APIVersion: parent.APIVersion, - Kind: parent.Kind, - Name: parent.Name, - UID: parent.UID, - }, - }, - }, - Spec: batchv1.CronJobSpec{ - Schedule: "*/1 * * * *", - JobTemplate: batchv1.JobTemplateSpec{ - Spec: batchv1.JobSpec{ - Template: corev1.PodTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{ - "app": "nginx", - }, - }, - Spec: corev1.PodSpec{ - Containers: []corev1.Container{{Image: "nginx:1.22.0-alpine"}}, - }, - }, - }, - }, - }, - }, - { - TypeMeta: metav1.TypeMeta{ - Kind: "CronJob", - APIVersion: "batch/v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "nginx2", - Namespace: nss[0].Name, - UID: "456", - }, - Spec: batchv1.CronJobSpec{ - Schedule: "*/1 * * * *", - JobTemplate: batchv1.JobTemplateSpec{ - Spec: batchv1.JobSpec{ - Template: corev1.PodTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{ - "app": "nginx", - }, - }, - Spec: corev1.PodSpec{ - Containers: []corev1.Container{{Image: "nginx:1.22.0-alpine"}}, - }, - }, - }, - }, - }, - }, - } - - p.EXPECT().CronJobs(nss[0]).Return(cronjobs, nil) - - expectedAssetNames := []string{ - nss[0].Name + "/" + cronjobs[0].Name, - nss[0].Name + "/" + cronjobs[1].Name, - } - - clusterIdentifier := "//platformid.api.mondoo.app/runtime/k8s/uid/e26043bb-8669-48a2-b684-b1e132198cdc" - - expectedAssetPlatformIds := []string{ - clusterIdentifier + "/namespace/" + nss[0].Name + "/cronjobs/name/" + cronjobs[0].Name, - clusterIdentifier + "/namespace/" + nss[0].Name + "/cronjobs/name/" + cronjobs[1].Name, - } - - pCfg := &providers.Config{} - ownershipDir := k8s.NewEmptyPlatformIdOwnershipDirectory(clusterIdentifier) - assets, err := ListCronJobs(p, pCfg, clusterIdentifier, NamespaceFilterOpts{}, make(map[string][]K8sResourceIdentifier), ownershipDir) - require.NoError(t, err) - require.Equal(t, []string{k8s.NewPlatformWorkloadId(clusterIdentifier, - strings.ToLower(parent.Kind), - parent.Namespace, - parent.Name, - "")}, - ownershipDir.OwnedBy(expectedAssetPlatformIds[0])) - - var assetNames []string - for _, a := range assets { - assetNames = append(assetNames, a.Name) - } - - var assetPlatformIds []string - for _, a := range assets { - assetPlatformIds = append(assetPlatformIds, a.PlatformIds[0]) - } - - assert.ElementsMatch(t, expectedAssetNames, assetNames) - assert.ElementsMatch(t, expectedAssetPlatformIds, assetPlatformIds) - assert.Equal(t, "batch/v1", assets[0].Platform.Version) - assert.Equal(t, "k8s-cronjob", assets[0].Platform.Name) - assert.ElementsMatch(t, []string{"k8s", "k8s-workload"}, assets[0].Platform.Family) - assert.Equal(t, nss[0].Name, assets[0].Labels["k8s.mondoo.com/namespace"]) -} - -func TestListCronJobs_Filter(t *testing.T) { - mockCtrl := gomock.NewController(t) - defer mockCtrl.Finish() - - p := k8s.NewMockKubernetesProvider(mockCtrl) - - // called for each CronJob - p.EXPECT().Runtime().Return("k8s-cluster") - - // Seed CronJobs - cronjobs := []*batchv1.CronJob{ - { - TypeMeta: metav1.TypeMeta{ - Kind: "CronJob", - APIVersion: "batch/v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "nginx", - Namespace: "default", - UID: "123", - }, - Spec: batchv1.CronJobSpec{ - Schedule: "*/1 * * * *", - JobTemplate: batchv1.JobTemplateSpec{ - Spec: batchv1.JobSpec{ - Template: corev1.PodTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{ - "app": "nginx", - }, - }, - Spec: corev1.PodSpec{ - Containers: []corev1.Container{{Image: "nginx:1.22.0-alpine"}}, - }, - }, - }, - }, - }, - }, - { - TypeMeta: metav1.TypeMeta{ - Kind: "CronJob", - APIVersion: "batch/v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "nginx2", - Namespace: "default", - UID: "456", - }, - Spec: batchv1.CronJobSpec{ - Schedule: "*/1 * * * *", - JobTemplate: batchv1.JobTemplateSpec{ - Spec: batchv1.JobSpec{ - Template: corev1.PodTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{ - "app": "nginx", - }, - }, - Spec: corev1.PodSpec{ - Containers: []corev1.Container{{Image: "nginx:1.22.0-alpine"}}, - }, - }, - }, - }, - }, - }, - } - - p.EXPECT().CronJob(cronjobs[0].Namespace, cronjobs[0].Name).Return(cronjobs[0], nil) - - expectedAssetNames := []string{ - cronjobs[0].Namespace + "/" + cronjobs[0].Name, - } - - clusterIdentifier := "//platformid.api.mondoo.app/runtime/k8s/uid/e26043bb-8669-48a2-b684-b1e132198cdc" - - expectedAssetPlatformIds := []string{ - clusterIdentifier + "/namespace/" + cronjobs[0].Namespace + "/cronjobs/name/" + cronjobs[0].Name, - } - - pCfg := &providers.Config{} - ownershipDir := k8s.NewEmptyPlatformIdOwnershipDirectory(clusterIdentifier) - resFilter := map[string][]K8sResourceIdentifier{ - "cronjob": { - {Type: "cronjob", Name: cronjobs[0].Name, Namespace: cronjobs[0].Namespace}, - }, - } - assets, err := ListCronJobs(p, pCfg, clusterIdentifier, NamespaceFilterOpts{}, resFilter, ownershipDir) - require.NoError(t, err) - - var assetNames []string - for _, a := range assets { - assetNames = append(assetNames, a.Name) - } - - var assetPlatformIds []string - for _, a := range assets { - assetPlatformIds = append(assetPlatformIds, a.PlatformIds[0]) - } - - assert.ElementsMatch(t, expectedAssetNames, assetNames) - assert.ElementsMatch(t, expectedAssetPlatformIds, assetPlatformIds) - assert.Equal(t, "batch/v1", assets[0].Platform.Version) - assert.Equal(t, "k8s-cronjob", assets[0].Platform.Name) - assert.ElementsMatch(t, []string{"k8s", "k8s-workload"}, assets[0].Platform.Family) - assert.Equal(t, cronjobs[0].Namespace, assets[0].Labels["k8s.mondoo.com/namespace"]) -} - -func TestListDaemonsets(t *testing.T) { - mockCtrl := gomock.NewController(t) - defer mockCtrl.Finish() - - p := k8s.NewMockKubernetesProvider(mockCtrl) - - // Seed namespaces - nss := []corev1.Namespace{ - {ObjectMeta: metav1.ObjectMeta{Name: "default"}}, - } - p.EXPECT().Namespaces().Return(nss, nil) - // called for each DaemonSet - p.EXPECT().Runtime().Return("k8s-cluster") - p.EXPECT().Runtime().Return("k8s-cluster") - - // pretend daemon set owned by deployment - parent := appsv1.Deployment{ - TypeMeta: metav1.TypeMeta{ - Kind: "Deployment", - APIVersion: "apps/v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "nginx-deployment", - Namespace: nss[0].Name, - UID: "000", - }, - Spec: appsv1.DeploymentSpec{ - Template: corev1.PodTemplateSpec{ - Spec: corev1.PodSpec{ - Containers: []corev1.Container{{Image: "nginx:1.22.0-alpine"}}, - }, - }, - }, - } - - // Seed DaemonSets - daemonsets := []*appsv1.DaemonSet{ - { - TypeMeta: metav1.TypeMeta{ - Kind: "DaemonSet", - APIVersion: "apps/v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "nginx", - Namespace: nss[0].Name, - UID: "123", - OwnerReferences: []metav1.OwnerReference{ - { - APIVersion: parent.APIVersion, - Kind: parent.Kind, - Name: parent.Name, - UID: parent.UID, - }, - }, - }, - Spec: appsv1.DaemonSetSpec{ - Template: corev1.PodTemplateSpec{ - Spec: corev1.PodSpec{ - Containers: []corev1.Container{{Image: "nginx:1.22.0-alpine"}}, - }, - }, - }, - }, - { - TypeMeta: metav1.TypeMeta{ - Kind: "DaemonSet", - APIVersion: "apps/v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "nginx2", - Namespace: nss[0].Name, - UID: "456", - }, - Spec: appsv1.DaemonSetSpec{ - Template: corev1.PodTemplateSpec{ - Spec: corev1.PodSpec{ - Containers: []corev1.Container{{Image: "nginx:1.22.0-alpine"}}, - }, - }, - }, - }, - } - - p.EXPECT().DaemonSets(nss[0]).Return(daemonsets, nil) - - expectedAssetNames := []string{ - nss[0].Name + "/" + daemonsets[0].Name, - nss[0].Name + "/" + daemonsets[1].Name, - } - - clusterIdentifier := "//platformid.api.mondoo.app/runtime/k8s/uid/e26043bb-8669-48a2-b684-b1e132198cdc" - - expectedAssetPlatformIds := []string{ - clusterIdentifier + "/namespace/" + nss[0].Name + "/daemonsets/name/" + daemonsets[0].Name, - clusterIdentifier + "/namespace/" + nss[0].Name + "/daemonsets/name/" + daemonsets[1].Name, - } - - pCfg := &providers.Config{} - ownershipDir := k8s.NewEmptyPlatformIdOwnershipDirectory(clusterIdentifier) - assets, err := ListDaemonSets(p, pCfg, clusterIdentifier, NamespaceFilterOpts{}, make(map[string][]K8sResourceIdentifier), ownershipDir) - require.NoError(t, err) - require.Equal(t, []string{k8s.NewPlatformWorkloadId(clusterIdentifier, - strings.ToLower(parent.Kind), - parent.Namespace, - parent.Name, - "")}, - ownershipDir.OwnedBy(expectedAssetPlatformIds[0])) - - var assetNames []string - for _, a := range assets { - assetNames = append(assetNames, a.Name) - } - - var assetPlatformIds []string - for _, a := range assets { - assetPlatformIds = append(assetPlatformIds, a.PlatformIds[0]) - } - - assert.ElementsMatch(t, expectedAssetNames, assetNames) - assert.ElementsMatch(t, expectedAssetPlatformIds, assetPlatformIds) - assert.Equal(t, "apps/v1", assets[0].Platform.Version) - assert.Equal(t, "k8s-daemonset", assets[0].Platform.Name) - assert.ElementsMatch(t, []string{"k8s", "k8s-workload"}, assets[0].Platform.Family) - assert.Equal(t, nss[0].Name, assets[0].Labels["k8s.mondoo.com/namespace"]) -} - -func TestListDaemonsets_Filter(t *testing.T) { - mockCtrl := gomock.NewController(t) - defer mockCtrl.Finish() - - p := k8s.NewMockKubernetesProvider(mockCtrl) - - // called for each DaemonSet - p.EXPECT().Runtime().Return("k8s-cluster") - - // Seed DaemonSets - daemonsets := []*appsv1.DaemonSet{ - { - TypeMeta: metav1.TypeMeta{ - Kind: "DaemonSet", - APIVersion: "apps/v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "nginx", - Namespace: "default", - UID: "123", - }, - Spec: appsv1.DaemonSetSpec{ - Template: corev1.PodTemplateSpec{ - Spec: corev1.PodSpec{ - Containers: []corev1.Container{{Image: "nginx:1.22.0-alpine"}}, - }, - }, - }, - }, - { - TypeMeta: metav1.TypeMeta{ - Kind: "DaemonSet", - APIVersion: "apps/v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "nginx2", - Namespace: "default", - UID: "456", - }, - Spec: appsv1.DaemonSetSpec{ - Template: corev1.PodTemplateSpec{ - Spec: corev1.PodSpec{ - Containers: []corev1.Container{{Image: "nginx:1.22.0-alpine"}}, - }, - }, - }, - }, - } - - p.EXPECT().DaemonSet(daemonsets[0].Namespace, daemonsets[0].Name).Return(daemonsets[0], nil) - - expectedAssetNames := []string{ - daemonsets[0].Namespace + "/" + daemonsets[0].Name, - } - - clusterIdentifier := "//platformid.api.mondoo.app/runtime/k8s/uid/e26043bb-8669-48a2-b684-b1e132198cdc" - - expectedAssetPlatformIds := []string{ - clusterIdentifier + "/namespace/" + daemonsets[0].Namespace + "/daemonsets/name/" + daemonsets[0].Name, - } - - pCfg := &providers.Config{} - ownershipDir := k8s.NewEmptyPlatformIdOwnershipDirectory(clusterIdentifier) - resFilter := map[string][]K8sResourceIdentifier{ - "daemonset": { - {Type: "daemonset", Name: daemonsets[0].Name, Namespace: daemonsets[0].Namespace}, - }, - } - assets, err := ListDaemonSets(p, pCfg, clusterIdentifier, NamespaceFilterOpts{}, resFilter, ownershipDir) - require.NoError(t, err) - - var assetNames []string - for _, a := range assets { - assetNames = append(assetNames, a.Name) - } - - var assetPlatformIds []string - for _, a := range assets { - assetPlatformIds = append(assetPlatformIds, a.PlatformIds[0]) - } - - assert.ElementsMatch(t, expectedAssetNames, assetNames) - assert.ElementsMatch(t, expectedAssetPlatformIds, assetPlatformIds) - assert.Equal(t, "apps/v1", assets[0].Platform.Version) - assert.Equal(t, "k8s-daemonset", assets[0].Platform.Name) - assert.ElementsMatch(t, []string{"k8s", "k8s-workload"}, assets[0].Platform.Family) - assert.Equal(t, daemonsets[0].Namespace, assets[0].Labels["k8s.mondoo.com/namespace"]) -} - -func TestListDeployments(t *testing.T) { - mockCtrl := gomock.NewController(t) - defer mockCtrl.Finish() - - p := k8s.NewMockKubernetesProvider(mockCtrl) - - // Seed namespaces - nss := []corev1.Namespace{ - {ObjectMeta: metav1.ObjectMeta{Name: "default"}}, - } - p.EXPECT().Namespaces().Return(nss, nil) - // called for each Deployment - p.EXPECT().Runtime().Return("k8s-cluster") - p.EXPECT().Runtime().Return("k8s-cluster") - - // pretend the deployment is owned by something - parent := appsv1.Deployment{ - TypeMeta: metav1.TypeMeta{ - Kind: "Deployment", - APIVersion: "apps/v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "nginx-deployment-deployment", - Namespace: nss[0].Name, - UID: "000", - }, - } - - // Seed Deployments - deployments := []*appsv1.Deployment{ - { - TypeMeta: metav1.TypeMeta{ - Kind: "Deployment", - APIVersion: "apps/v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "nginx", - Namespace: nss[0].Name, - UID: "123", - OwnerReferences: []metav1.OwnerReference{ - { - APIVersion: parent.APIVersion, - Kind: parent.Kind, - Name: parent.Name, - UID: parent.UID, - }, - }, - }, - Spec: appsv1.DeploymentSpec{ - Template: corev1.PodTemplateSpec{ - Spec: corev1.PodSpec{ - Containers: []corev1.Container{{Image: "nginx:1.22.0-alpine"}}, - }, - }, - }, - }, - { - TypeMeta: metav1.TypeMeta{ - Kind: "Deployment", - APIVersion: "apps/v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "nginx2", - Namespace: nss[0].Name, - UID: "456", - }, - Spec: appsv1.DeploymentSpec{ - Template: corev1.PodTemplateSpec{ - Spec: corev1.PodSpec{ - Containers: []corev1.Container{{Image: "nginx:1.22.0-alpine"}}, - }, - }, - }, - }, - } - - p.EXPECT().Deployments(nss[0]).Return(deployments, nil) - - expectedAssetNames := []string{ - nss[0].Name + "/" + deployments[0].Name, - nss[0].Name + "/" + deployments[1].Name, - } - - clusterIdentifier := "//platformid.api.mondoo.app/runtime/k8s/uid/e26043bb-8669-48a2-b684-b1e132198cdc" - - expectedAssetPlatformIds := []string{ - clusterIdentifier + "/namespace/" + nss[0].Name + "/deployments/name/" + deployments[0].Name, - clusterIdentifier + "/namespace/" + nss[0].Name + "/deployments/name/" + deployments[1].Name, - } - - pCfg := &providers.Config{} - ownershipDir := k8s.NewEmptyPlatformIdOwnershipDirectory(clusterIdentifier) - assets, err := ListDeployments(p, pCfg, clusterIdentifier, NamespaceFilterOpts{}, make(map[string][]K8sResourceIdentifier), ownershipDir) - require.NoError(t, err) - require.Equal(t, []string{k8s.NewPlatformWorkloadId(clusterIdentifier, - strings.ToLower(parent.Kind), - parent.Namespace, - parent.Name, - "")}, - ownershipDir.OwnedBy(expectedAssetPlatformIds[0])) - - var assetNames []string - for _, a := range assets { - assetNames = append(assetNames, a.Name) - } - - var assetPlatformIds []string - for _, a := range assets { - assetPlatformIds = append(assetPlatformIds, a.PlatformIds[0]) - } - - assert.ElementsMatch(t, expectedAssetNames, assetNames) - assert.ElementsMatch(t, expectedAssetPlatformIds, assetPlatformIds) - assert.Equal(t, "apps/v1", assets[0].Platform.Version) - assert.Equal(t, "k8s-deployment", assets[0].Platform.Name) - assert.ElementsMatch(t, []string{"k8s", "k8s-workload"}, assets[0].Platform.Family) - assert.Equal(t, nss[0].Name, assets[0].Labels["k8s.mondoo.com/namespace"]) -} - -func TestListDeployments_Filter(t *testing.T) { - mockCtrl := gomock.NewController(t) - defer mockCtrl.Finish() - - p := k8s.NewMockKubernetesProvider(mockCtrl) - - // called for each Deployment - p.EXPECT().Runtime().Return("k8s-cluster") - - // Seed Deployments - deployments := []*appsv1.Deployment{ - { - TypeMeta: metav1.TypeMeta{ - Kind: "Deployment", - APIVersion: "apps/v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "nginx", - Namespace: "default", - UID: "123", - }, - Spec: appsv1.DeploymentSpec{ - Template: corev1.PodTemplateSpec{ - Spec: corev1.PodSpec{ - Containers: []corev1.Container{{Image: "nginx:1.22.0-alpine"}}, - }, - }, - }, - }, - { - TypeMeta: metav1.TypeMeta{ - Kind: "Deployment", - APIVersion: "apps/v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "nginx2", - Namespace: "default", - UID: "456", - }, - Spec: appsv1.DeploymentSpec{ - Template: corev1.PodTemplateSpec{ - Spec: corev1.PodSpec{ - Containers: []corev1.Container{{Image: "nginx:1.22.0-alpine"}}, - }, - }, - }, - }, - } - - p.EXPECT().Deployment(deployments[0].Namespace, deployments[0].Name).Return(deployments[0], nil) - - expectedAssetNames := []string{ - deployments[0].Namespace + "/" + deployments[0].Name, - } - - clusterIdentifier := "//platformid.api.mondoo.app/runtime/k8s/uid/e26043bb-8669-48a2-b684-b1e132198cdc" - - expectedAssetPlatformIds := []string{ - clusterIdentifier + "/namespace/" + deployments[0].Namespace + "/deployments/name/" + deployments[0].Name, - } - - pCfg := &providers.Config{} - ownershipDir := k8s.NewEmptyPlatformIdOwnershipDirectory(clusterIdentifier) - resFilter := map[string][]K8sResourceIdentifier{ - "deployment": { - {Type: "deployment", Name: deployments[0].Name, Namespace: deployments[0].Namespace}, - }, - } - assets, err := ListDeployments(p, pCfg, clusterIdentifier, NamespaceFilterOpts{}, resFilter, ownershipDir) - require.NoError(t, err) - - var assetNames []string - for _, a := range assets { - assetNames = append(assetNames, a.Name) - } - - var assetPlatformIds []string - for _, a := range assets { - assetPlatformIds = append(assetPlatformIds, a.PlatformIds[0]) - } - - assert.ElementsMatch(t, expectedAssetNames, assetNames) - assert.ElementsMatch(t, expectedAssetPlatformIds, assetPlatformIds) - assert.Equal(t, "apps/v1", assets[0].Platform.Version) - assert.Equal(t, "k8s-deployment", assets[0].Platform.Name) - assert.ElementsMatch(t, []string{"k8s", "k8s-workload"}, assets[0].Platform.Family) - assert.Equal(t, deployments[0].Namespace, assets[0].Labels["k8s.mondoo.com/namespace"]) -} - -func TestListJobs(t *testing.T) { - mockCtrl := gomock.NewController(t) - defer mockCtrl.Finish() - - p := k8s.NewMockKubernetesProvider(mockCtrl) - - // Seed namespaces - nss := []corev1.Namespace{ - {ObjectMeta: metav1.ObjectMeta{Name: "default"}}, - } - p.EXPECT().Namespaces().Return(nss, nil) - // called for each Job - p.EXPECT().Runtime().Return("k8s-cluster") - p.EXPECT().Runtime().Return("k8s-cluster") - - // pretend the job has a parent - parent := appsv1.ReplicaSet{ - TypeMeta: metav1.TypeMeta{ - Kind: "ReplicaSet", - APIVersion: "apps/v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "nginx-replicaset", - Namespace: nss[0].Name, - UID: "000", - }, - } - - // Seed Jobs - jobs := []*batchv1.Job{ - { - TypeMeta: metav1.TypeMeta{ - Kind: "Job", - APIVersion: "batch/v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "nginx", - Namespace: nss[0].Name, - UID: "123", - OwnerReferences: []metav1.OwnerReference{ - { - APIVersion: parent.APIVersion, - Kind: parent.Kind, - Name: parent.Name, - UID: parent.UID, - }, - }, - }, - Spec: batchv1.JobSpec{ - Template: corev1.PodTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{ - "app": "nginx", - }, - }, - Spec: corev1.PodSpec{ - Containers: []corev1.Container{{Image: "nginx:1.22.0-alpine"}}, - }, - }, - }, - }, - { - TypeMeta: metav1.TypeMeta{ - Kind: "Job", - APIVersion: "batch/v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "nginx2", - Namespace: nss[0].Name, - UID: "456", - }, - Spec: batchv1.JobSpec{ - Template: corev1.PodTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{ - "app": "nginx", - }, - }, - Spec: corev1.PodSpec{ - Containers: []corev1.Container{{Image: "nginx:1.22.0-alpine"}}, - }, - }, - }, - }, - } - - p.EXPECT().Jobs(nss[0]).Return(jobs, nil) - - expectedAssetNames := []string{ - nss[0].Name + "/" + jobs[0].Name, - nss[0].Name + "/" + jobs[1].Name, - } - - clusterIdentifier := "//platformid.api.mondoo.app/runtime/k8s/uid/e26043bb-8669-48a2-b684-b1e132198cdc" - - expectedAssetPlatformIds := []string{ - clusterIdentifier + "/namespace/" + nss[0].Name + "/jobs/name/" + jobs[0].Name, - clusterIdentifier + "/namespace/" + nss[0].Name + "/jobs/name/" + jobs[1].Name, - } - - pCfg := &providers.Config{} - ownershipDir := k8s.NewEmptyPlatformIdOwnershipDirectory(clusterIdentifier) - ownershipDir.Add(&parent) - assets, err := ListJobs(p, pCfg, clusterIdentifier, NamespaceFilterOpts{}, make(map[string][]K8sResourceIdentifier), ownershipDir) - require.NoError(t, err) - require.Equal(t, []string{k8s.NewPlatformWorkloadId(clusterIdentifier, - strings.ToLower(parent.Kind), - parent.Namespace, - parent.Name, - "")}, - ownershipDir.OwnedBy(expectedAssetPlatformIds[0])) - - var assetNames []string - for _, a := range assets { - assetNames = append(assetNames, a.Name) - } - - var assetPlatformIds []string - for _, a := range assets { - assetPlatformIds = append(assetPlatformIds, a.PlatformIds[0]) - } - - assert.ElementsMatch(t, expectedAssetNames, assetNames) - assert.ElementsMatch(t, expectedAssetPlatformIds, assetPlatformIds) - assert.Equal(t, "batch/v1", assets[0].Platform.Version) - assert.Equal(t, "k8s-job", assets[0].Platform.Name) - assert.ElementsMatch(t, []string{"k8s", "k8s-workload"}, assets[0].Platform.Family) - assert.Equal(t, nss[0].Name, assets[0].Labels["k8s.mondoo.com/namespace"]) -} - -func TestListJobs_Filter(t *testing.T) { - mockCtrl := gomock.NewController(t) - defer mockCtrl.Finish() - - p := k8s.NewMockKubernetesProvider(mockCtrl) - - // called for each Job - p.EXPECT().Runtime().Return("k8s-cluster") - - // Seed Jobs - jobs := []*batchv1.Job{ - { - TypeMeta: metav1.TypeMeta{ - Kind: "Job", - APIVersion: "batch/v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "nginx", - Namespace: "default", - UID: "123", - }, - Spec: batchv1.JobSpec{ - Template: corev1.PodTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{ - "app": "nginx", - }, - }, - Spec: corev1.PodSpec{ - Containers: []corev1.Container{{Image: "nginx:1.22.0-alpine"}}, - }, - }, - }, - }, - { - TypeMeta: metav1.TypeMeta{ - Kind: "Job", - APIVersion: "batch/v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "nginx2", - Namespace: "default", - UID: "456", - }, - Spec: batchv1.JobSpec{ - Template: corev1.PodTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{ - "app": "nginx", - }, - }, - Spec: corev1.PodSpec{ - Containers: []corev1.Container{{Image: "nginx:1.22.0-alpine"}}, - }, - }, - }, - }, - } - - p.EXPECT().Job(jobs[0].Namespace, jobs[0].Name).Return(jobs[0], nil) - - expectedAssetNames := []string{ - jobs[0].Namespace + "/" + jobs[0].Name, - } - - clusterIdentifier := "//platformid.api.mondoo.app/runtime/k8s/uid/e26043bb-8669-48a2-b684-b1e132198cdc" - - expectedAssetPlatformIds := []string{ - clusterIdentifier + "/namespace/" + jobs[0].Namespace + "/jobs/name/" + jobs[0].Name, - } - - pCfg := &providers.Config{} - ownershipDir := k8s.NewEmptyPlatformIdOwnershipDirectory(clusterIdentifier) - resFilter := map[string][]K8sResourceIdentifier{ - "job": { - {Type: "job", Name: jobs[0].Name, Namespace: jobs[0].Namespace}, - }, - } - assets, err := ListJobs(p, pCfg, clusterIdentifier, NamespaceFilterOpts{}, resFilter, ownershipDir) - require.NoError(t, err) - - var assetNames []string - for _, a := range assets { - assetNames = append(assetNames, a.Name) - } - - var assetPlatformIds []string - for _, a := range assets { - assetPlatformIds = append(assetPlatformIds, a.PlatformIds[0]) - } - - assert.ElementsMatch(t, expectedAssetNames, assetNames) - assert.ElementsMatch(t, expectedAssetPlatformIds, assetPlatformIds) - assert.Equal(t, "batch/v1", assets[0].Platform.Version) - assert.Equal(t, "k8s-job", assets[0].Platform.Name) - assert.ElementsMatch(t, []string{"k8s", "k8s-workload"}, assets[0].Platform.Family) - assert.Equal(t, jobs[0].Namespace, assets[0].Labels["k8s.mondoo.com/namespace"]) -} - -func TestListPods(t *testing.T) { - mockCtrl := gomock.NewController(t) - defer mockCtrl.Finish() - - p := k8s.NewMockKubernetesProvider(mockCtrl) - - // Seed namespaces - nss := []corev1.Namespace{ - {ObjectMeta: metav1.ObjectMeta{Name: "default"}}, - } - p.EXPECT().Namespaces().Return(nss, nil) - // called for each Pod - p.EXPECT().Runtime().Return("k8s-cluster") - p.EXPECT().Runtime().Return("k8s-cluster") - - parent := appsv1.ReplicaSet{ - TypeMeta: metav1.TypeMeta{ - Kind: "ReplicaSet", - APIVersion: "apps/v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "nginx-replicaset", - Namespace: nss[0].Name, - UID: "000", - }, - } - - // Seed Pods - pods := []*corev1.Pod{ - { - TypeMeta: metav1.TypeMeta{ - Kind: "Pod", - APIVersion: "v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "nginx", - Namespace: nss[0].Name, - UID: "123", - OwnerReferences: []metav1.OwnerReference{ - { - APIVersion: parent.APIVersion, - Kind: parent.Kind, - Name: parent.Name, - UID: parent.UID, - }, - }, - }, - Spec: corev1.PodSpec{ - Containers: []corev1.Container{{Image: "nginx:1.22.0-alpine"}}, - }, - }, - { - TypeMeta: metav1.TypeMeta{ - Kind: "Pod", - APIVersion: "v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "nginx2", - Namespace: nss[0].Name, - UID: "456", - }, - Spec: corev1.PodSpec{ - Containers: []corev1.Container{{Image: "nginx:1.22.0-alpine"}}, - }, - }, - } - - p.EXPECT().Pods(nss[0]).Return(pods, nil) - - expectedAssetNames := []string{ - nss[0].Name + "/" + pods[0].Name, - nss[0].Name + "/" + pods[1].Name, - } - - clusterIdentifier := "//platformid.api.mondoo.app/runtime/k8s/uid/e26043bb-8669-48a2-b684-b1e132198cdc" - - expectedAssetPlatformIds := []string{ - clusterIdentifier + "/namespace/" + nss[0].Name + "/pods/name/" + pods[0].Name, - clusterIdentifier + "/namespace/" + nss[0].Name + "/pods/name/" + pods[1].Name, - } - - pCfg := &providers.Config{} - ownershipDir := k8s.NewEmptyPlatformIdOwnershipDirectory(clusterIdentifier) - assets, err := ListPods(p, pCfg, clusterIdentifier, NamespaceFilterOpts{}, make(map[string][]K8sResourceIdentifier), ownershipDir) - require.NoError(t, err) - require.Equal(t, []string{k8s.NewPlatformWorkloadId(clusterIdentifier, - strings.ToLower(parent.Kind), - parent.Namespace, - parent.Name, - "")}, - ownershipDir.OwnedBy(expectedAssetPlatformIds[0])) - var assetNames []string - for _, a := range assets { - assetNames = append(assetNames, a.Name) - } - - var assetPlatformIds []string - for _, a := range assets { - assetPlatformIds = append(assetPlatformIds, a.PlatformIds[0]) - } - - assert.ElementsMatch(t, expectedAssetNames, assetNames) - assert.ElementsMatch(t, expectedAssetPlatformIds, assetPlatformIds) - assert.Equal(t, "v1", assets[0].Platform.Version) - assert.Equal(t, "k8s-pod", assets[0].Platform.Name) - assert.ElementsMatch(t, []string{"k8s", "k8s-workload"}, assets[0].Platform.Family) - assert.Equal(t, nss[0].Name, assets[0].Labels["k8s.mondoo.com/namespace"]) -} - -func TestListPods_Filter(t *testing.T) { - mockCtrl := gomock.NewController(t) - defer mockCtrl.Finish() - - p := k8s.NewMockKubernetesProvider(mockCtrl) - - // called for each Pod - p.EXPECT().Runtime().Return("k8s-cluster") - - // Seed Pods - pods := []*corev1.Pod{ - { - TypeMeta: metav1.TypeMeta{ - Kind: "Pod", - APIVersion: "v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "nginx", - Namespace: "default", - UID: "123", - }, - Spec: corev1.PodSpec{ - Containers: []corev1.Container{{Image: "nginx:1.22.0-alpine"}}, - }, - }, - { - TypeMeta: metav1.TypeMeta{ - Kind: "Pod", - APIVersion: "v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "nginx2", - Namespace: "default", - UID: "456", - }, - Spec: corev1.PodSpec{ - Containers: []corev1.Container{{Image: "nginx:1.22.0-alpine"}}, - }, - }, - } - - p.EXPECT().Pod(pods[0].Namespace, pods[0].Name).Return(pods[0], nil) - - expectedAssetNames := []string{ - pods[0].Namespace + "/" + pods[0].Name, - } - - clusterIdentifier := "//platformid.api.mondoo.app/runtime/k8s/uid/e26043bb-8669-48a2-b684-b1e132198cdc" - - expectedAssetPlatformIds := []string{ - clusterIdentifier + "/namespace/" + pods[0].Namespace + "/pods/name/" + pods[0].Name, - } - - pCfg := &providers.Config{} - ownershipDir := k8s.NewEmptyPlatformIdOwnershipDirectory(clusterIdentifier) - resFilter := map[string][]K8sResourceIdentifier{ - "pod": { - {Type: "pod", Name: pods[0].Name, Namespace: pods[0].Namespace}, - }, - } - assets, err := ListPods(p, pCfg, clusterIdentifier, NamespaceFilterOpts{}, resFilter, ownershipDir) - require.NoError(t, err) - var assetNames []string - for _, a := range assets { - assetNames = append(assetNames, a.Name) - } - - var assetPlatformIds []string - for _, a := range assets { - assetPlatformIds = append(assetPlatformIds, a.PlatformIds[0]) - } - - assert.ElementsMatch(t, expectedAssetNames, assetNames) - assert.ElementsMatch(t, expectedAssetPlatformIds, assetPlatformIds) - assert.Equal(t, "v1", assets[0].Platform.Version) - assert.Equal(t, "k8s-pod", assets[0].Platform.Name) - assert.ElementsMatch(t, []string{"k8s", "k8s-workload"}, assets[0].Platform.Family) - assert.Equal(t, pods[0].Namespace, assets[0].Labels["k8s.mondoo.com/namespace"]) -} - -func TestListReplicaSets(t *testing.T) { - mockCtrl := gomock.NewController(t) - defer mockCtrl.Finish() - - p := k8s.NewMockKubernetesProvider(mockCtrl) - - // Seed namespaces - nss := []corev1.Namespace{ - {ObjectMeta: metav1.ObjectMeta{Name: "default"}}, - } - p.EXPECT().Namespaces().Return(nss, nil) - // called for each ReplicaSet - p.EXPECT().Runtime().Return("k8s-cluster") - p.EXPECT().Runtime().Return("k8s-cluster") - parent := appsv1.Deployment{ - TypeMeta: metav1.TypeMeta{ - Kind: "Deployment", - APIVersion: "apps/v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "nginx-deployment", - Namespace: nss[0].Name, - UID: "000", - }, - Spec: appsv1.DeploymentSpec{ - Template: corev1.PodTemplateSpec{ - Spec: corev1.PodSpec{ - Containers: []corev1.Container{{Image: "nginx:1.22.0-alpine"}}, - }, - }, - }, - } - // Seed ReplicaSets - replicaSets := []*appsv1.ReplicaSet{ - { - TypeMeta: metav1.TypeMeta{ - Kind: "ReplicaSet", - APIVersion: "apps/v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "nginx", - Namespace: nss[0].Name, - UID: "123", - OwnerReferences: []metav1.OwnerReference{ - { - APIVersion: parent.APIVersion, - Kind: parent.Kind, - Name: parent.Name, - UID: parent.UID, - }, - }, - }, - Spec: appsv1.ReplicaSetSpec{ - Template: corev1.PodTemplateSpec{ - Spec: corev1.PodSpec{ - Containers: []corev1.Container{{Image: "nginx:1.22.0-alpine"}}, - }, - }, - }, - }, - { - TypeMeta: metav1.TypeMeta{ - Kind: "ReplicaSet", - APIVersion: "apps/v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "nginx2", - Namespace: nss[0].Name, - UID: "456", - }, - Spec: appsv1.ReplicaSetSpec{ - Template: corev1.PodTemplateSpec{ - Spec: corev1.PodSpec{ - Containers: []corev1.Container{{Image: "nginx:1.22.0-alpine"}}, - }, - }, - }, - }, - } - - p.EXPECT().ReplicaSets(nss[0]).Return(replicaSets, nil) - - expectedAssetNames := []string{ - nss[0].Name + "/" + replicaSets[0].Name, - nss[0].Name + "/" + replicaSets[1].Name, - } - - clusterIdentifier := "//platformid.api.mondoo.app/runtime/k8s/uid/e26043bb-8669-48a2-b684-b1e132198cdc" - - expectedAssetPlatformIds := []string{ - clusterIdentifier + "/namespace/" + nss[0].Name + "/replicasets/name/" + replicaSets[0].Name, - clusterIdentifier + "/namespace/" + nss[0].Name + "/replicasets/name/" + replicaSets[1].Name, - } - - pCfg := &providers.Config{} - ownershipDir := k8s.NewEmptyPlatformIdOwnershipDirectory(clusterIdentifier) - assets, err := ListReplicaSets(p, pCfg, clusterIdentifier, NamespaceFilterOpts{}, make(map[string][]K8sResourceIdentifier), ownershipDir) - require.NoError(t, err) - require.Equal(t, []string{k8s.NewPlatformWorkloadId(clusterIdentifier, - strings.ToLower(parent.Kind), - parent.Namespace, - parent.Name, - "")}, - ownershipDir.OwnedBy(expectedAssetPlatformIds[0])) - - var assetNames []string - for _, a := range assets { - assetNames = append(assetNames, a.Name) - } - - var assetPlatformIds []string - for _, a := range assets { - assetPlatformIds = append(assetPlatformIds, a.PlatformIds[0]) - } - - assert.ElementsMatch(t, expectedAssetNames, assetNames) - assert.ElementsMatch(t, expectedAssetPlatformIds, assetPlatformIds) - assert.Equal(t, "apps/v1", assets[0].Platform.Version) - assert.Equal(t, "k8s-replicaset", assets[0].Platform.Name) - assert.ElementsMatch(t, []string{"k8s", "k8s-workload"}, assets[0].Platform.Family) - assert.Equal(t, nss[0].Name, assets[0].Labels["k8s.mondoo.com/namespace"]) -} - -func TestListReplicaSets_Filter(t *testing.T) { - mockCtrl := gomock.NewController(t) - defer mockCtrl.Finish() - - p := k8s.NewMockKubernetesProvider(mockCtrl) - - // called for each ReplicaSet - p.EXPECT().Runtime().Return("k8s-cluster") - - // Seed ReplicaSets - replicaSets := []*appsv1.ReplicaSet{ - { - TypeMeta: metav1.TypeMeta{ - Kind: "ReplicaSet", - APIVersion: "apps/v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "nginx", - Namespace: "default", - UID: "123", - }, - Spec: appsv1.ReplicaSetSpec{ - Template: corev1.PodTemplateSpec{ - Spec: corev1.PodSpec{ - Containers: []corev1.Container{{Image: "nginx:1.22.0-alpine"}}, - }, - }, - }, - }, - { - TypeMeta: metav1.TypeMeta{ - Kind: "ReplicaSet", - APIVersion: "apps/v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "nginx2", - Namespace: "default", - UID: "456", - }, - Spec: appsv1.ReplicaSetSpec{ - Template: corev1.PodTemplateSpec{ - Spec: corev1.PodSpec{ - Containers: []corev1.Container{{Image: "nginx:1.22.0-alpine"}}, - }, - }, - }, - }, - } - - p.EXPECT().ReplicaSet(replicaSets[0].Namespace, replicaSets[0].Name).Return(replicaSets[0], nil) - - expectedAssetNames := []string{ - replicaSets[0].Namespace + "/" + replicaSets[0].Name, - } - - clusterIdentifier := "//platformid.api.mondoo.app/runtime/k8s/uid/e26043bb-8669-48a2-b684-b1e132198cdc" - - expectedAssetPlatformIds := []string{ - clusterIdentifier + "/namespace/" + replicaSets[0].Namespace + "/replicasets/name/" + replicaSets[0].Name, - } - - pCfg := &providers.Config{} - ownershipDir := k8s.NewEmptyPlatformIdOwnershipDirectory(clusterIdentifier) - resFilter := map[string][]K8sResourceIdentifier{ - "replicaset": { - {Type: "replicaset", Name: replicaSets[0].Name, Namespace: replicaSets[0].Namespace}, - }, - } - assets, err := ListReplicaSets(p, pCfg, clusterIdentifier, NamespaceFilterOpts{}, resFilter, ownershipDir) - require.NoError(t, err) - - var assetNames []string - for _, a := range assets { - assetNames = append(assetNames, a.Name) - } - - var assetPlatformIds []string - for _, a := range assets { - assetPlatformIds = append(assetPlatformIds, a.PlatformIds[0]) - } - - assert.ElementsMatch(t, expectedAssetNames, assetNames) - assert.ElementsMatch(t, expectedAssetPlatformIds, assetPlatformIds) - assert.Equal(t, "apps/v1", assets[0].Platform.Version) - assert.Equal(t, "k8s-replicaset", assets[0].Platform.Name) - assert.ElementsMatch(t, []string{"k8s", "k8s-workload"}, assets[0].Platform.Family) - assert.Equal(t, replicaSets[0].Namespace, assets[0].Labels["k8s.mondoo.com/namespace"]) -} - -func TestListStatefulSets(t *testing.T) { - mockCtrl := gomock.NewController(t) - defer mockCtrl.Finish() - - p := k8s.NewMockKubernetesProvider(mockCtrl) - - // Seed namespaces - nss := []corev1.Namespace{ - {ObjectMeta: metav1.ObjectMeta{Name: "default"}}, - } - p.EXPECT().Namespaces().Return(nss, nil) - // called for each StatefulSet - p.EXPECT().Runtime().Return("k8s-cluster") - p.EXPECT().Runtime().Return("k8s-cluster") - - // pretend stateful set owned by deployment - parent := appsv1.Deployment{ - TypeMeta: metav1.TypeMeta{ - Kind: "Deployment", - APIVersion: "apps/v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "nginx-deployment", - Namespace: nss[0].Name, - UID: "000", - }, - Spec: appsv1.DeploymentSpec{ - Template: corev1.PodTemplateSpec{ - Spec: corev1.PodSpec{ - Containers: []corev1.Container{{Image: "nginx:1.22.0-alpine"}}, - }, - }, - }, - } - - // Seed StatefulSets - statefulsets := []*appsv1.StatefulSet{ - { - TypeMeta: metav1.TypeMeta{ - Kind: "StatefulSet", - APIVersion: "apps/v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "nginx", - Namespace: nss[0].Name, - UID: "123", - OwnerReferences: []metav1.OwnerReference{ - { - APIVersion: parent.APIVersion, - Kind: parent.Kind, - Name: parent.Name, - UID: parent.UID, - }, - }, - }, - Spec: appsv1.StatefulSetSpec{ - Template: corev1.PodTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{ - "app": "nginx", - }, - }, - Spec: corev1.PodSpec{ - Containers: []corev1.Container{{Image: "nginx:1.22.0-alpine"}}, - }, - }, - }, - }, - { - TypeMeta: metav1.TypeMeta{ - Kind: "StatefulSet", - APIVersion: "apps/v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "nginx2", - Namespace: nss[0].Name, - UID: "456", - }, - Spec: appsv1.StatefulSetSpec{ - Template: corev1.PodTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{ - "app": "nginx", - }, - }, - Spec: corev1.PodSpec{ - Containers: []corev1.Container{{Image: "nginx:1.22.0-alpine"}}, - }, - }, - }, - }, - } - - p.EXPECT().StatefulSets(nss[0]).Return(statefulsets, nil) - - expectedAssetNames := []string{ - nss[0].Name + "/" + statefulsets[0].Name, - nss[0].Name + "/" + statefulsets[1].Name, - } - - clusterIdentifier := "//platformid.api.mondoo.app/runtime/k8s/uid/e26043bb-8669-48a2-b684-b1e132198cdc" - - expectedAssetPlatformIds := []string{ - clusterIdentifier + "/namespace/" + nss[0].Name + "/statefulsets/name/" + statefulsets[0].Name, - clusterIdentifier + "/namespace/" + nss[0].Name + "/statefulsets/name/" + statefulsets[1].Name, - } - - pCfg := &providers.Config{} - ownershipDir := k8s.NewEmptyPlatformIdOwnershipDirectory(clusterIdentifier) - assets, err := ListStatefulSets(p, pCfg, clusterIdentifier, NamespaceFilterOpts{}, make(map[string][]K8sResourceIdentifier), ownershipDir) - require.NoError(t, err) - require.Equal(t, []string{k8s.NewPlatformWorkloadId(clusterIdentifier, - strings.ToLower(parent.Kind), - parent.Namespace, - parent.Name, - "")}, - ownershipDir.OwnedBy(expectedAssetPlatformIds[0])) - - var assetNames []string - for _, a := range assets { - assetNames = append(assetNames, a.Name) - } - - var assetPlatformIds []string - for _, a := range assets { - assetPlatformIds = append(assetPlatformIds, a.PlatformIds[0]) - } - - assert.ElementsMatch(t, expectedAssetNames, assetNames) - assert.ElementsMatch(t, expectedAssetPlatformIds, assetPlatformIds) - assert.Equal(t, "apps/v1", assets[0].Platform.Version) - assert.Equal(t, "k8s-statefulset", assets[0].Platform.Name) - assert.ElementsMatch(t, []string{"k8s", "k8s-workload"}, assets[0].Platform.Family) - assert.Equal(t, nss[0].Name, assets[0].Labels["k8s.mondoo.com/namespace"]) -} - -func TestListStatefulSets_Filter(t *testing.T) { - mockCtrl := gomock.NewController(t) - defer mockCtrl.Finish() - - p := k8s.NewMockKubernetesProvider(mockCtrl) - - // called for each StatefulSet - p.EXPECT().Runtime().Return("k8s-cluster") - - // Seed StatefulSets - statefulsets := []*appsv1.StatefulSet{ - { - TypeMeta: metav1.TypeMeta{ - Kind: "StatefulSet", - APIVersion: "apps/v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "nginx", - Namespace: "default", - UID: "123", - }, - Spec: appsv1.StatefulSetSpec{ - Template: corev1.PodTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{ - "app": "nginx", - }, - }, - Spec: corev1.PodSpec{ - Containers: []corev1.Container{{Image: "nginx:1.22.0-alpine"}}, - }, - }, - }, - }, - { - TypeMeta: metav1.TypeMeta{ - Kind: "StatefulSet", - APIVersion: "apps/v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "nginx2", - Namespace: "default", - UID: "456", - }, - Spec: appsv1.StatefulSetSpec{ - Template: corev1.PodTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{ - "app": "nginx", - }, - }, - Spec: corev1.PodSpec{ - Containers: []corev1.Container{{Image: "nginx:1.22.0-alpine"}}, - }, - }, - }, - }, - } - - p.EXPECT().StatefulSet(statefulsets[0].Namespace, statefulsets[0].Name).Return(statefulsets[0], nil) - - expectedAssetNames := []string{ - statefulsets[0].Namespace + "/" + statefulsets[0].Name, - } - - clusterIdentifier := "//platformid.api.mondoo.app/runtime/k8s/uid/e26043bb-8669-48a2-b684-b1e132198cdc" - - expectedAssetPlatformIds := []string{ - clusterIdentifier + "/namespace/" + statefulsets[0].Namespace + "/statefulsets/name/" + statefulsets[0].Name, - } - - pCfg := &providers.Config{} - ownershipDir := k8s.NewEmptyPlatformIdOwnershipDirectory(clusterIdentifier) - resFilter := map[string][]K8sResourceIdentifier{ - "statefulset": { - {Type: "statefulset", Name: statefulsets[0].Name, Namespace: statefulsets[0].Namespace}, - }, - } - assets, err := ListStatefulSets(p, pCfg, clusterIdentifier, NamespaceFilterOpts{}, resFilter, ownershipDir) - require.NoError(t, err) - - var assetNames []string - for _, a := range assets { - assetNames = append(assetNames, a.Name) - } - - var assetPlatformIds []string - for _, a := range assets { - assetPlatformIds = append(assetPlatformIds, a.PlatformIds[0]) - } - - assert.ElementsMatch(t, expectedAssetNames, assetNames) - assert.ElementsMatch(t, expectedAssetPlatformIds, assetPlatformIds) - assert.Equal(t, "apps/v1", assets[0].Platform.Version) - assert.Equal(t, "k8s-statefulset", assets[0].Platform.Name) - assert.ElementsMatch(t, []string{"k8s", "k8s-workload"}, assets[0].Platform.Family) - assert.Equal(t, statefulsets[0].Namespace, assets[0].Labels["k8s.mondoo.com/namespace"]) -} - -func TestListFiltering(t *testing.T) { - mockCtrl := gomock.NewController(t) - defer mockCtrl.Finish() - - p := k8s.NewMockKubernetesProvider(mockCtrl) - - // Seed namespaces - nss := []corev1.Namespace{ - {ObjectMeta: metav1.ObjectMeta{Name: "default"}}, - {ObjectMeta: metav1.ObjectMeta{Name: "kube-system"}}, - {ObjectMeta: metav1.ObjectMeta{Name: "kube-system-alternative"}}, - } - p.EXPECT().Namespaces().Return(nss, nil).AnyTimes() - - // Seed pods - defaultNamespacePods := []*corev1.Pod{ - { - TypeMeta: metav1.TypeMeta{Kind: "Pod", APIVersion: "v1"}, - ObjectMeta: metav1.ObjectMeta{Name: "nginx", Namespace: nss[0].Name}, - }, - { - TypeMeta: metav1.TypeMeta{Kind: "Pod", APIVersion: "v1"}, - ObjectMeta: metav1.ObjectMeta{Name: "nginx2", Namespace: nss[0].Name}, - }, - } - - kubeSystemPods := []*corev1.Pod{ - { - TypeMeta: metav1.TypeMeta{Kind: "Pod", APIVersion: "v1"}, - ObjectMeta: metav1.ObjectMeta{Name: "kube-proxy", Namespace: nss[1].Name}, - }, - } - - otherNamespacePods := []*corev1.Pod{ - { - TypeMeta: metav1.TypeMeta{Kind: "Pod", APIVersion: "v1"}, - ObjectMeta: metav1.ObjectMeta{Name: "some-workload", Namespace: nss[2].Name}, - }, - { - TypeMeta: metav1.TypeMeta{Kind: "Pod", APIVersion: "v1"}, - ObjectMeta: metav1.ObjectMeta{Name: "some-workload2", Namespace: nss[2].Name}, - }, - { - TypeMeta: metav1.TypeMeta{Kind: "Pod", APIVersion: "v1"}, - ObjectMeta: metav1.ObjectMeta{Name: "some-workload3", Namespace: nss[2].Name}, - }, - } - p.EXPECT().Pods(nss[0]).Return(defaultNamespacePods, nil).AnyTimes() - p.EXPECT().Pods(nss[1]).Return(kubeSystemPods, nil).AnyTimes() - p.EXPECT().Pods(nss[2]).Return(otherNamespacePods, nil).AnyTimes() - p.EXPECT().Runtime().Return("k8s-cluster").AnyTimes() - - clusterIdentifier := "//platformid.api.mondoo.app/runtime/k8s/uid/e26043bb-8669-48a2-b684-b1e132198cdc" - ownershipDir := k8s.NewEmptyPlatformIdOwnershipDirectory(clusterIdentifier) - pCfg := &providers.Config{} - - // List with no filtering - assets, err := ListPods(p, pCfg, clusterIdentifier, NamespaceFilterOpts{}, make(map[string][]K8sResourceIdentifier), ownershipDir) - require.NoError(t, err) - assert.Equal(t, 6, len(assets), "expected all Pods to be found when no filter specified") - - // List only 'kube-system' - assets, err = ListPods(p, pCfg, clusterIdentifier, NamespaceFilterOpts{include: []string{nss[1].Name}}, make(map[string][]K8sResourceIdentifier), ownershipDir) - require.NoError(t, err) - assert.Equal(t, 1, len(assets), "expected only 1 Pod to be returned") - - // List 'kube-system' and 'other-namespace' - assets, err = ListPods(p, pCfg, clusterIdentifier, NamespaceFilterOpts{include: []string{nss[1].Name, nss[2].Name}}, make(map[string][]K8sResourceIdentifier), ownershipDir) - require.NoError(t, err) - assert.Equal(t, 4, len(assets), "expected only 4 Pods to be returned") - - // Exclude kube-system - assets, err = ListPods(p, pCfg, clusterIdentifier, NamespaceFilterOpts{exclude: []string{nss[1].Name}}, make(map[string][]K8sResourceIdentifier), ownershipDir) - require.NoError(t, err) - assert.Equal(t, 5, len(assets), "expected only 5 Pods to be returned") - - // Include and exclude list should behave like only include list - assets, err = ListPods(p, pCfg, clusterIdentifier, NamespaceFilterOpts{include: []string{nss[1].Name}, exclude: []string{nss[1].Name}}, make(map[string][]K8sResourceIdentifier), ownershipDir) - require.NoError(t, err) - assert.Equal(t, 1, len(assets), "expected only 1 Pod to be returned") - - // List w/glob 'kube*' - assets, err = ListPods(p, pCfg, clusterIdentifier, NamespaceFilterOpts{include: []string{"kube*"}}, make(map[string][]K8sResourceIdentifier), ownershipDir) - require.NoError(t, err) - assert.Equal(t, 4, len(assets), "expected 4 Pods to be returned from matched Namespaces") - - // List w/glob '*alt*' - assets, err = ListPods(p, pCfg, clusterIdentifier, NamespaceFilterOpts{include: []string{"*alt*"}}, make(map[string][]K8sResourceIdentifier), ownershipDir) - require.NoError(t, err) - assert.Equal(t, 3, len(assets), "expected 3 Pods to be returned from matched Namespaces") - - // Exclude w/glob '*default*' - assets, err = ListPods(p, pCfg, clusterIdentifier, NamespaceFilterOpts{exclude: []string{"*default*"}}, make(map[string][]K8sResourceIdentifier), ownershipDir) - require.NoError(t, err) - assert.Equal(t, 4, len(assets), "expected 4 Pods to be returned from non-excluded Namespaces") -} diff --git a/_motor/discovery/k8s/resolver.go b/_motor/discovery/k8s/resolver.go deleted file mode 100644 index d4d117a0c9..0000000000 --- a/_motor/discovery/k8s/resolver.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package k8s - -import ( - "context" - - "go.mondoo.com/cnquery/v9/motor/asset" - "go.mondoo.com/cnquery/v9/motor/discovery/common" - "go.mondoo.com/cnquery/v9/motor/providers" - "go.mondoo.com/cnquery/v9/motor/providers/k8s/resources" - "go.mondoo.com/cnquery/v9/motor/vault" -) - -var _ common.ContextInitializer = (*NamespaceResolver)(nil) - -type Resolver struct{} - -func (r *Resolver) Name() string { - return "Kubernetes Resolver" -} - -func (r *Resolver) AvailableDiscoveryTargets() []string { - return []string{ - common.DiscoveryAuto, - common.DiscoveryAll, - DiscoveryClusters, - DiscoveryPods, - DiscoveryJobs, - DiscoveryCronJobs, - DiscoveryStatefulSets, - DiscoveryDeployments, - DiscoveryReplicaSets, - DiscoveryDaemonSets, - DiscoveryContainerImages, - DiscoveryAdmissionReviews, - DiscoveryIngresses, - DiscoveryNamespaces, - } -} - -func (r *Resolver) InitCtx(ctx context.Context) context.Context { - return resources.SetDiscoveryCache(ctx, resources.NewDiscoveryCache()) -} - -func (r *Resolver) Resolve(ctx context.Context, root *asset.Asset, tc *providers.Config, credsResolver vault.Resolver, sfn common.QuerySecretFn, userIdDetectors ...providers.PlatformIdDetector) ([]*asset.Asset, error) { - nsFilter := tc.Options["namespaces"] - if len(nsFilter) > 0 { - return (&NamespaceResolver{}).Resolve(ctx, root, tc, credsResolver, sfn, userIdDetectors...) - } - return (&ClusterResolver{}).Resolve(ctx, root, tc, credsResolver, sfn, userIdDetectors...) -} diff --git a/_motor/discovery/k8s/resolver_cluster.go b/_motor/discovery/k8s/resolver_cluster.go deleted file mode 100644 index edf5560d96..0000000000 --- a/_motor/discovery/k8s/resolver_cluster.go +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package k8s - -import ( - "context" - "strings" - - "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9" - "go.mondoo.com/cnquery/v9/motor/asset" - "go.mondoo.com/cnquery/v9/motor/discovery/common" - "go.mondoo.com/cnquery/v9/motor/platform/detector" - "go.mondoo.com/cnquery/v9/motor/providers" - "go.mondoo.com/cnquery/v9/motor/providers/k8s" - "go.mondoo.com/cnquery/v9/motor/providers/k8s/resources" - "go.mondoo.com/cnquery/v9/motor/providers/local" - "go.mondoo.com/cnquery/v9/motor/vault" - "go.mondoo.com/cnquery/v9/resources/packs/os/kubectl" -) - -var _ common.ContextInitializer = (*ClusterResolver)(nil) - -type ClusterResolver struct{} - -func (r *ClusterResolver) Name() string { - return "Kubernetes Cluster Resolver" -} - -func (r *ClusterResolver) AvailableDiscoveryTargets() []string { - return []string{ - common.DiscoveryAuto, - common.DiscoveryAll, - DiscoveryClusters, - DiscoveryPods, - DiscoveryJobs, - DiscoveryCronJobs, - DiscoveryStatefulSets, - DiscoveryDeployments, - DiscoveryReplicaSets, - DiscoveryDaemonSets, - DiscoveryContainerImages, - DiscoveryAdmissionReviews, - DiscoveryIngresses, - DiscoveryNamespaces, - } -} - -func (r *ClusterResolver) Resolve(ctx context.Context, root *asset.Asset, tc *providers.Config, credsResolver vault.Resolver, sfn common.QuerySecretFn, userIdDetectors ...providers.PlatformIdDetector) ([]*asset.Asset, error) { - features := cnquery.GetFeatures(ctx) - resolved := []*asset.Asset{} - nsFilter := NamespaceFilterOpts{} - excludeNamespaces := tc.Options["namespaces-exclude"] - if len(excludeNamespaces) > 0 { - nsFilter.exclude = strings.Split(excludeNamespaces, ",") - } - - var k8sctlConfig *kubectl.KubectlConfig - localProvider, err := local.New() - if err == nil { - k8sctlConfig, err = kubectl.LoadKubeConfig(localProvider) - if err != nil { - return nil, err - } - } - - p, err := k8s.New(ctx, tc) - if err != nil { - return nil, err - } - - resourcesFilter, err := resourceFilters(tc) - if err != nil { - return nil, err - } - - if tc.IncludesDiscoveryTarget(common.DiscoveryAuto) { - log.Info().Msg("discovery option auto is used. This will detect the assets: cluster, cronjobs, daemonsets, deployments, ingresses, jobs, pods, replicasets, statefulsets") - } - - clusterIdentifier, err := p.Identifier() - if err != nil { - return nil, err - } - - // detect platform info for the asset - detector := detector.New(p) - pf, err := detector.Platform() - if err != nil { - return nil, err - } - - // Only discover cluster and nodes if there are no resource filters. - var clusterAsset *asset.Asset - ownershipDir := k8s.NewEmptyPlatformIdOwnershipDirectory(clusterIdentifier) - if tc.IncludesOneOfDiscoveryTarget(common.DiscoveryAll, common.DiscoveryAuto, DiscoveryClusters) && - len(resourcesFilter) == 0 { - var clusterName string - // the name is still a bit unreliable - // see https://github.com/kubernetes/kubernetes/issues/44954 - if len(tc.Options["context"]) > 0 { - clusterName = tc.Options["context"] - log.Info().Str("cluster-name", clusterName).Msg("use cluster name from --context") - } else { - clusterName = "" - - if tc.Options[k8s.OPTION_MANIFEST] != "" || tc.Options[k8s.OPTION_ADMISSION] != "" || tc.Options[k8s.OPTION_IMMEMORY_CONTENT] != "" { - clusterName, _ = p.Name() - } else { - // try to parse context from kubectl config - if clusterName == "" && k8sctlConfig != nil && len(k8sctlConfig.CurrentContext) > 0 { - clusterName = k8sctlConfig.CurrentClusterName() - log.Info().Str("cluster-name", clusterName).Msg("use cluster name from kube config") - } - - // fallback to first node name if we could not gather the name from kubeconfig - if clusterName == "" { - name, err := p.Name() - if err == nil { - clusterName = name - log.Info().Str("cluster-name", clusterName).Msg("use cluster name from node name") - } - } - - clusterName = "K8s Cluster " + clusterName - } - } - - clusterAsset = &asset.Asset{ - PlatformIds: []string{clusterIdentifier}, - Name: clusterName, - Platform: pf, - Connections: []*providers.Config{tc}, // pass-in the current config - State: asset.State_STATE_RUNNING, - } - resolved = append(resolved, clusterAsset) - - if features.IsActive(cnquery.K8sNodeDiscovery) { - // nodes are only added as related assets because we have no policies to scan them - nodes, nodeRelationshipInfos, err := ListNodes(p, tc, clusterIdentifier) - if err == nil && len(nodes) > 0 { - ri := nodeRelationshipInfos[0] - if ri.cloudAccountAsset != nil { - clusterAsset.RelatedAssets = append(clusterAsset.RelatedAssets, ri.cloudAccountAsset) - } - clusterAsset.RelatedAssets = append(clusterAsset.RelatedAssets, nodes...) - } - } - } - - additionalAssets, err := addSeparateAssets(tc, p, nsFilter, resourcesFilter, clusterIdentifier, ownershipDir, features) - if err != nil { - return nil, err - } - - if clusterAsset != nil { - isRelatedFn := func(a *asset.Asset) bool { - return a.Platform.GetKind() == providers.Kind_KIND_K8S_OBJECT - } - - for _, aa := range additionalAssets { - if isRelatedFn(aa) { - clusterAsset.RelatedAssets = append(clusterAsset.RelatedAssets, aa) - } - } - } - resolved = append(resolved, additionalAssets...) - - return resolved, nil -} - -func (r *ClusterResolver) InitCtx(ctx context.Context) context.Context { - return resources.SetDiscoveryCache(ctx, resources.NewDiscoveryCache()) -} diff --git a/_motor/discovery/k8s/resolver_namespace.go b/_motor/discovery/k8s/resolver_namespace.go deleted file mode 100644 index c8a3ce54a2..0000000000 --- a/_motor/discovery/k8s/resolver_namespace.go +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package k8s - -import ( - "context" - "fmt" - "regexp" - "strings" - - "github.com/gobwas/glob" - "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9" - "go.mondoo.com/cnquery/v9/motor/asset" - "go.mondoo.com/cnquery/v9/motor/discovery/common" - "go.mondoo.com/cnquery/v9/motor/providers" - "go.mondoo.com/cnquery/v9/motor/providers/k8s" - "go.mondoo.com/cnquery/v9/motor/providers/k8s/resources" - "go.mondoo.com/cnquery/v9/motor/vault" - "k8s.io/apimachinery/pkg/api/errors" -) - -var _ common.ContextInitializer = (*NamespaceResolver)(nil) - -type NamespaceResolver struct{} - -func (r *NamespaceResolver) Name() string { - return "Kubernetes Namespace Resolver" -} - -func (r *NamespaceResolver) AvailableDiscoveryTargets() []string { - return []string{ - common.DiscoveryAuto, - common.DiscoveryAll, - DiscoveryClusters, - DiscoveryPods, - DiscoveryJobs, - DiscoveryCronJobs, - DiscoveryStatefulSets, - DiscoveryDeployments, - DiscoveryReplicaSets, - DiscoveryDaemonSets, - DiscoveryContainerImages, - DiscoveryAdmissionReviews, - DiscoveryIngresses, - } -} - -func (r *NamespaceResolver) InitCtx(ctx context.Context) context.Context { - return resources.SetDiscoveryCache(ctx, resources.NewDiscoveryCache()) -} - -func (r *NamespaceResolver) Resolve(ctx context.Context, root *asset.Asset, tc *providers.Config, credsResolver vault.Resolver, sfn common.QuerySecretFn, userIdDetectors ...providers.PlatformIdDetector) ([]*asset.Asset, error) { - features := cnquery.GetFeatures(ctx) - resolved := []*asset.Asset{} - - nsFilter := NamespaceFilterOpts{} - includeNamespaces := tc.Options["namespaces"] - if len(includeNamespaces) > 0 { - nsFilter.include = append(nsFilter.include, strings.Split(includeNamespaces, ",")...) - } - - p, err := k8s.New(ctx, tc) - if err != nil { - return nil, err - } - - // Put a Warn() message if a Namespace that doesn't exist was part of the - // list of Namespaces to include. We can only check that if the k8s user is allowed to list the - // cluster namespaces. - clusterNamespaces, err := p.Namespaces() - if err != nil { - if errors.IsForbidden(err) { - // If the user does not have permissions to list the cluster namespaces, we cannot do glob matching. - // We can only work with exact matching in that case - if containsGlob, _ := regexp.MatchString(`[\*\/\\\[\]\{\}\?]`, includeNamespaces); containsGlob { - return nil, fmt.Errorf("glob patterns are not allowed for k8s users with no list namespace permissions") - } - log.Warn().Msg("cannot list cluster namespaces, skipping check for non-existent namespaces...") - } else { - return nil, err - } - } else { - for _, ns := range nsFilter.include { - foundNamespace := false - g, err := glob.Compile(ns) - if err != nil { - log.Error().Err(err).Str("namespaceFilter", ns).Msg("failed to parse Namespace filter glob") - return nil, err - } - for _, clusterNs := range clusterNamespaces { - if g.Match(clusterNs.Name) { - foundNamespace = true - break - } - } - if !foundNamespace { - log.Warn().Msgf("Namespace filter %q did not match any Namespaces in cluster", ns) - } - } - } - - excludeNamespaces := tc.Options["namespaces-exclude"] - if len(excludeNamespaces) > 0 { - nsFilter.exclude = strings.Split(excludeNamespaces, ",") - } - - log.Debug().Strs("namespacesIncludeFilter", nsFilter.include).Strs("namespacesExcludeFilter", nsFilter.exclude).Msg("resolve k8s assets") - - resourcesFilter, err := resourceFilters(tc) - if err != nil { - return nil, err - } - - nss, err := ListNamespaces(p, tc, "", nsFilter, resourcesFilter, nil) - if err != nil { - return nil, err - } - - resolved = append(resolved, nss...) - for _, ns := range nss { - identifier := ns.PlatformIds[0] - ownershipDir := k8s.NewEmptyPlatformIdOwnershipDirectory(identifier) - additionalAssets, err := addSeparateAssets(tc, p, nsFilter, resourcesFilter, identifier, ownershipDir, features) - if err != nil { - return nil, err - } - resolved = append(resolved, additionalAssets...) - } - - return resolved, nil -} diff --git a/_motor/discovery/k8s/resolver_test.go b/_motor/discovery/k8s/resolver_test.go deleted file mode 100644 index 15a7849672..0000000000 --- a/_motor/discovery/k8s/resolver_test.go +++ /dev/null @@ -1,263 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package k8s - -import ( - "context" - "encoding/base64" - "os" - "sort" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/motor/asset" - "go.mondoo.com/cnquery/v9/motor/providers" - "go.mondoo.com/cnquery/v9/motor/providers/k8s" - "go.mondoo.com/cnquery/v9/motor/providers/k8s/resources" -) - -func TestManifestResolver(t *testing.T) { - resolver := &Resolver{} - manifestFile := "../../providers/k8s/resources/testdata/pod.yaml" - - ctx := resources.SetDiscoveryCache(context.Background(), resources.NewDiscoveryCache()) - - assetList, err := resolver.Resolve(ctx, &asset.Asset{}, &providers.Config{ - PlatformId: "//platform/k8s/uid/123/namespace/default/pods/name/mondoo", - Backend: providers.ProviderType_K8S, - Options: map[string]string{ - "path": manifestFile, - }, - Discover: &providers.Discovery{ - Targets: []string{"all"}, - }, - }, nil, nil) - require.NoError(t, err) - assert.Equal(t, 4, len(assetList)) - assert.Equal(t, assetList[0].Platform.Name, "k8s-manifest") - assert.Equal(t, assetList[1].Platform.Name, "k8s-pod") - assert.Contains(t, assetList[1].Platform.Family, "k8s-workload") - assert.Contains(t, assetList[1].Platform.Family, "k8s") - assert.Equal(t, assetList[3].Platform.Runtime, "docker-registry") -} - -func TestManifestResolver_NoNamespace(t *testing.T) { - resolver := &Resolver{} - manifestFile := "../../providers/k8s/resources/testdata/deployment-nons.yaml" - - ctx := resources.SetDiscoveryCache(context.Background(), resources.NewDiscoveryCache()) - - assetList, err := resolver.Resolve(ctx, &asset.Asset{}, &providers.Config{ - PlatformId: "//platform/k8s/uid/123/namespace/default/deployment/name/mondoo", - Backend: providers.ProviderType_K8S, - Options: map[string]string{ - "path": manifestFile, - }, - Discover: &providers.Discovery{ - Targets: []string{"all"}, - }, - }, nil, nil) - require.NoError(t, err) - assert.Equal(t, 2, len(assetList)) - assert.Equal(t, assetList[0].Platform.Name, "k8s-manifest") - assert.Equal(t, assetList[1].Platform.Name, "k8s-deployment") - assert.Contains(t, assetList[1].Platform.Family, "k8s-workload") - assert.Contains(t, assetList[1].Platform.Family, "k8s") -} - -func TestAdmissionReviewResolver(t *testing.T) { - resolver := &Resolver{} - - ctx := resources.SetDiscoveryCache(context.Background(), resources.NewDiscoveryCache()) - data, err := os.ReadFile("../../providers/k8s/resources/testdata/admission-review.json") - require.NoError(t, err) - - admission := base64.StdEncoding.EncodeToString(data) - assetList, err := resolver.Resolve(ctx, &asset.Asset{}, &providers.Config{ - Backend: providers.ProviderType_K8S, - Options: map[string]string{ - k8s.OPTION_ADMISSION: admission, - }, - Discover: &providers.Discovery{ - Targets: []string{"all"}, - }, - }, nil, nil) - require.NoError(t, err) - assert.Equal(t, 4, len(assetList)) - assert.Equal(t, assetList[0].Platform.Name, "kubernetes") - assert.Equal(t, assetList[1].Platform.Name, "k8s-pod") - assert.Contains(t, assetList[1].Platform.Family, "k8s-workload") - assert.Contains(t, assetList[1].Platform.Family, "k8s") - assert.Equal(t, assetList[2].Platform.Runtime, "docker-registry") - assert.Equal(t, assetList[3].Platform.Runtime, "k8s-admission") -} - -func TestManifestResolverDiscoveries(t *testing.T) { - testCases := []struct { - kind string - discoveryOption string - platformName string - expectedAssetNames []string - }{ - { - kind: "pod", - discoveryOption: "pods", - platformName: "k8s-pod", - expectedAssetNames: []string{"default/mondoo", "default/hello-pod-2"}, - }, - { - kind: "cronjob", - discoveryOption: "cronjobs", - platformName: "k8s-cronjob", - expectedAssetNames: []string{"default/mondoo"}, - }, - { - kind: "job", - discoveryOption: "jobs", - platformName: "k8s-job", - expectedAssetNames: []string{"default/mondoo"}, - }, - { - kind: "statefulset", - discoveryOption: "statefulsets", - platformName: "k8s-statefulset", - expectedAssetNames: []string{"default/mondoo"}, - }, - { - kind: "daemonset", - discoveryOption: "daemonsets", - platformName: "k8s-daemonset", - expectedAssetNames: []string{"default/mondoo"}, - }, - { - kind: "replicaset", - discoveryOption: "replicasets", - platformName: "k8s-replicaset", - expectedAssetNames: []string{"default/mondoo"}, - }, - { - kind: "deployment", - discoveryOption: "deployments", - platformName: "k8s-deployment", - expectedAssetNames: []string{"default/mondoo"}, - }, - } - - for _, testCase := range testCases { - t.Run("discover k8s "+testCase.kind, func(t *testing.T) { - resolver := &Resolver{} - manifestFile := "../../providers/k8s/resources/testdata/" + testCase.kind + ".yaml" - - ctx := resources.SetDiscoveryCache(context.Background(), resources.NewDiscoveryCache()) - - assetList, err := resolver.Resolve(ctx, &asset.Asset{}, &providers.Config{ - PlatformId: "//platform/k8s/uid/123/namespace/default/" + testCase.discoveryOption + "/name/mondoo", - Backend: providers.ProviderType_K8S, - Options: map[string]string{ - "path": manifestFile, - }, - Discover: &providers.Discovery{ - Targets: []string{testCase.discoveryOption}, - }, - }, nil, nil) - require.NoError(t, err) - // When this check fails locally, check your kubeconfig. - // context has to reference the default namespace - assert.Equal(t, len(testCase.expectedAssetNames), len(assetList)) - - for _, a := range assetList { - assert.Contains(t, a.Platform.Family, "k8s-workload") - assert.Contains(t, a.Platform.Family, "k8s") - assert.Equal(t, "k8s-manifest", a.Platform.Runtime) - assert.Equal(t, testCase.platformName, a.Platform.Name) - assert.Contains(t, testCase.expectedAssetNames, a.Name) - } - }) - } -} - -func TestManifestResolverMultiPodDiscovery(t *testing.T) { - resolver := &Resolver{} - manifestFile := "../../providers/k8s/resources/testdata/pod.yaml" - - ctx := resources.SetDiscoveryCache(context.Background(), resources.NewDiscoveryCache()) - - assetList, err := resolver.Resolve(ctx, &asset.Asset{}, &providers.Config{ - PlatformId: "//platform/k8s/uid/123/namespace/default/pods/name/mondoo", - Backend: providers.ProviderType_K8S, - Options: map[string]string{ - "path": manifestFile, - }, - Discover: &providers.Discovery{ - Targets: []string{"pods"}, - }, - }, nil, nil) - require.NoError(t, err) - // When this check fails locally, check your kubeconfig. - // context has to reference the default namespace - assert.Equal(t, 2, len(assetList)) - sort.Slice(assetList, func(i, j int) bool { - return assetList[i].Name < assetList[j].Name - }) - assert.Contains(t, assetList[0].Platform.Family, "k8s-workload") - assert.Contains(t, assetList[0].Platform.Family, "k8s") - assert.Equal(t, "k8s-manifest", assetList[0].Platform.Runtime) - assert.Equal(t, "k8s-pod", assetList[0].Platform.Name) - assert.Equal(t, "default/hello-pod-2", assetList[0].Name) - assert.Contains(t, assetList[1].Platform.Family, "k8s-workload") - assert.Contains(t, assetList[1].Platform.Family, "k8s") - assert.Equal(t, "k8s-manifest", assetList[1].Platform.Runtime) - assert.Equal(t, "k8s-pod", assetList[1].Platform.Name) - assert.Equal(t, "default/mondoo", assetList[1].Name) -} - -func TestManifestResolverWrongDiscovery(t *testing.T) { - resolver := &Resolver{} - manifestFile := "../../providers/k8s/resources/testdata/cronjob.yaml" - - ctx := resources.SetDiscoveryCache(context.Background(), resources.NewDiscoveryCache()) - - assetList, err := resolver.Resolve(ctx, &asset.Asset{}, &providers.Config{ - Backend: providers.ProviderType_K8S, - Options: map[string]string{ - "path": manifestFile, - "namespace": "default", - }, - Discover: &providers.Discovery{ - Targets: []string{"pods"}, - }, - }, nil, nil) - require.NoError(t, err) - // When this check fails locally, check your kubeconfig. - // context has to reference the default namespace - assert.Equalf(t, 0, len(assetList), "discovering pods in a cronjob manifest should result in no assets") -} - -func TestResourceFilter(t *testing.T) { - cfg := &providers.Config{ - Backend: providers.ProviderType_K8S, - Options: map[string]string{ - "k8s-resources": "pod:default:nginx, pod:default:redis, deployment:test:redis, node:node1", - }, - } - - resFilters, err := resourceFilters(cfg) - require.NoError(t, err) - - expected := map[string][]K8sResourceIdentifier{ - "pod": { - {Type: "pod", Namespace: "default", Name: "nginx"}, - {Type: "pod", Namespace: "default", Name: "redis"}, - }, - "deployment": { - {Type: "deployment", Namespace: "test", Name: "redis"}, - }, - "node": { - {Type: "node", Namespace: "", Name: "node1"}, - }, - } - - assert.Equal(t, expected, resFilters) -} diff --git a/_motor/discovery/local/local.go b/_motor/discovery/local/local.go deleted file mode 100644 index 6411a7a14a..0000000000 --- a/_motor/discovery/local/local.go +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package local - -import ( - "context" - - "go.mondoo.com/cnquery/v9/motor/asset" - "go.mondoo.com/cnquery/v9/motor/discovery/common" - "go.mondoo.com/cnquery/v9/motor/discovery/docker_engine" - "go.mondoo.com/cnquery/v9/motor/motorid" - "go.mondoo.com/cnquery/v9/motor/motorid/hostname" - "go.mondoo.com/cnquery/v9/motor/platform" - "go.mondoo.com/cnquery/v9/motor/providers" - "go.mondoo.com/cnquery/v9/motor/providers/os" - "go.mondoo.com/cnquery/v9/motor/providers/resolver" - "go.mondoo.com/cnquery/v9/motor/vault" -) - -type Resolver struct{} - -func (r *Resolver) Name() string { - return "Local Resolver" -} - -func (r *Resolver) AvailableDiscoveryTargets() []string { - return []string{ - common.DiscoveryAuto, - common.DiscoveryAll, - docker_engine.DiscoveryContainerRunning, - docker_engine.DiscoveryContainerImages, - } -} - -func (r *Resolver) Resolve(ctx context.Context, root *asset.Asset, tc *providers.Config, credsResolver vault.Resolver, sfn common.QuerySecretFn, userIdDetectors ...providers.PlatformIdDetector) ([]*asset.Asset, error) { - assetObj := &asset.Asset{ - Name: root.Name, - State: asset.State_STATE_ONLINE, - Connections: []*providers.Config{tc}, - } - - // use hostname as name if asset name was not explicitly provided - if assetObj.Name == "" { - assetObj.Name = tc.Host - } - - m, err := resolver.NewMotorConnection(ctx, tc, credsResolver) - if err != nil { - return nil, err - } - defer m.Close() - - // determine platform information - p, err := m.Platform() - if err == nil { - assetObj.Platform = p - } else { - assetObj.Platform = &platform.Platform{} - } - assetObj.Platform.Kind = providers.Kind_KIND_BARE_METAL - - fingerprint, err := motorid.IdentifyPlatform(m.Provider, p, userIdDetectors) - if err != nil { - return nil, err - } - - assetObj.PlatformIds = fingerprint.PlatformIDs - if fingerprint.Name != "" && assetObj.Name == "" { - assetObj.Name = fingerprint.Name - } - - if fingerprint.Runtime != "" { - p.Runtime = fingerprint.Runtime - } - - if fingerprint.Kind != providers.Kind_KIND_UNKNOWN { - p.Kind = fingerprint.Kind - } - - for _, pf := range fingerprint.RelatedAssets { - assetObj.RelatedAssets = append(assetObj.RelatedAssets, &asset.Asset{ - Name: pf.Name, - PlatformIds: pf.PlatformIDs, - }) - } - - // use hostname as asset name - if p != nil && assetObj.Name == "" { - osProvider, isOSProvider := m.Provider.(os.OperatingSystemProvider) - if isOSProvider { - // retrieve hostname - hostname, err := hostname.Hostname(osProvider, p) - if err == nil && len(hostname) > 0 { - assetObj.Name = hostname - } - } - } - assetList := []*asset.Asset{assetObj} - - // search for container assets on local machine - if tc.IncludesOneOfDiscoveryTarget(common.DiscoveryAll, docker_engine.DiscoveryContainerRunning, docker_engine.DiscoveryContainerImages) { - engineAssets, err := docker_engine.DiscoverDockerEngineAssets(tc) - if err != nil { - return nil, err - } - for _, a := range engineAssets { - a.RelatedAssets = append(a.RelatedAssets, assetObj) - } - assetList = append(assetList, engineAssets...) - } - - return assetList, nil -} diff --git a/_motor/discovery/network/resolver.go b/_motor/discovery/network/resolver.go deleted file mode 100644 index 0d5c60c9fb..0000000000 --- a/_motor/discovery/network/resolver.go +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package network - -import ( - "context" - - "go.mondoo.com/cnquery/v9/motor/asset" - "go.mondoo.com/cnquery/v9/motor/discovery/common" - "go.mondoo.com/cnquery/v9/motor/platform/detector" - "go.mondoo.com/cnquery/v9/motor/providers" - network_transport "go.mondoo.com/cnquery/v9/motor/providers/network" - "go.mondoo.com/cnquery/v9/motor/vault" -) - -type Resolver struct{} - -func (r *Resolver) Name() string { - return "Network Resolver" -} - -func (r *Resolver) AvailableDiscoveryTargets() []string { - return []string{common.DiscoveryAuto, common.DiscoveryAll} -} - -func (r *Resolver) Resolve(ctx context.Context, root *asset.Asset, conf *providers.Config, credsResolver vault.Resolver, sfn common.QuerySecretFn, userIdDetectors ...providers.PlatformIdDetector) ([]*asset.Asset, error) { - transport, err := network_transport.New(conf) - if err != nil { - return nil, err - } - - detector := detector.New(transport) - platform, err := detector.Platform() - if err != nil { - return nil, err - } - - platformID, err := transport.Identifier() - if err != nil { - return nil, err - } - - assetObj := &asset.Asset{ - PlatformIds: []string{platformID}, - Platform: platform, - Name: root.Name, - Connections: []*providers.Config{conf}, - // FIXME: We don't really know at this point if it is online... need to - // check first - State: asset.State_STATE_ONLINE, - } - - if assetObj.Name == "" { - assetObj.Name = conf.Host - } - - return []*asset.Asset{assetObj}, nil -} diff --git a/_motor/discovery/os/os.go b/_motor/discovery/os/os.go deleted file mode 100644 index 70e30e3719..0000000000 --- a/_motor/discovery/os/os.go +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package os - -import ( - "context" - - "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/motor/asset" - "go.mondoo.com/cnquery/v9/motor/discovery/common" - "go.mondoo.com/cnquery/v9/motor/motorid" - "go.mondoo.com/cnquery/v9/motor/motorid/hostname" - "go.mondoo.com/cnquery/v9/motor/providers" - "go.mondoo.com/cnquery/v9/motor/providers/os" - "go.mondoo.com/cnquery/v9/motor/providers/resolver" - "go.mondoo.com/cnquery/v9/motor/vault" -) - -type Resolver struct{} - -func (r *Resolver) Name() string { - return "OS Resolver" -} - -func (r *Resolver) AvailableDiscoveryTargets() []string { - return []string{common.DiscoveryAuto, common.DiscoveryAll} -} - -func (r *Resolver) Resolve(ctx context.Context, root *asset.Asset, tc *providers.Config, credsResolver vault.Resolver, sfn common.QuerySecretFn, userIdDetectors ...providers.PlatformIdDetector) ([]*asset.Asset, error) { - assetObj := &asset.Asset{ - Name: root.Name, - Connections: []*providers.Config{tc}, - State: asset.State_STATE_ONLINE, - } - - if len(assetObj.Connections[0].Credentials) == 0 { - cred, err := sfn(assetObj) - if err != nil { - log.Debug().Err(err).Msg("could not determine credential for asset") - return nil, err - } - if cred != nil { - assetObj.Connections[0].Credentials = append(assetObj.Connections[0].Credentials, cred) - } - } - - m, err := resolver.NewMotorConnection(ctx, tc, credsResolver) - if err != nil { - return nil, err - } - defer m.Close() - - // determine platform information - p, err := m.Platform() - if err == nil { - assetObj.Platform = p - } - - fingerprint, err := motorid.IdentifyPlatform(m.Provider, p, userIdDetectors) - if err != nil { - return nil, err - } - assetObj.PlatformIds = fingerprint.PlatformIDs - if fingerprint.Name != "" { - assetObj.Name = fingerprint.Name - } - - if fingerprint.Runtime != "" { - p.Runtime = fingerprint.Runtime - } - - if fingerprint.Kind != providers.Kind_KIND_UNKNOWN { - p.Kind = fingerprint.Kind - } - - for _, pf := range fingerprint.RelatedAssets { - assetObj.RelatedAssets = append(assetObj.RelatedAssets, &asset.Asset{ - Name: pf.Name, - PlatformIds: pf.PlatformIDs, - }) - } - - // use hostname as asset name - if p != nil && assetObj.Name == "" { - osProvider, isOSProvider := m.Provider.(os.OperatingSystemProvider) - if isOSProvider { - // retrieve hostname - hostname, err := hostname.Hostname(osProvider, p) - if err == nil && len(hostname) > 0 { - assetObj.Name = hostname - } - } - } - - // use hostname as name if asset name was not explicitly provided - if assetObj.Name == "" { - assetObj.Name = tc.Host - } - - return []*asset.Asset{assetObj}, nil -} diff --git a/_motor/discovery/resolve.go b/_motor/discovery/resolve.go deleted file mode 100644 index d8258f39c5..0000000000 --- a/_motor/discovery/resolve.go +++ /dev/null @@ -1,254 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package discovery - -// The discovery package is responsible to determine all assets reachable. E.g. If you provide an AWS -// connection, multiple assets like EC2, ECR images as well as EKS clusters can be determined automatically -// -// This package implements all the resolution steps and returns a fully resolved list of assets that mondoo -// can connect to. -// -// As part of the discovery process, secrets need to be determined. This package is designed to have know -// no knowledge about inventory or vault packages. It defines two `common.CredentialFn` and `common.QuerySecretFn` -// to retrieve the required information. The inventory manager injects the correct functions upon initialization - -import ( - "context" - "strings" - - "github.com/cockroachdb/errors" - "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/motor/discovery/common" - inventory "go.mondoo.com/cnquery/v9/motor/inventory/v1" - "go.mondoo.com/cnquery/v9/motor/providers" - pr "go.mondoo.com/cnquery/v9/motor/providers/resolver" - "go.mondoo.com/cnquery/v9/motor/vault" - "go.mondoo.com/cnquery/v9/stringx" -) - -type Resolver interface { - Name() string - Resolve(ctx context.Context, root *inventory.Asset, t *inventory.Config, credsResolver vault.Resolver, sfn common.QuerySecretFn, - userIdDetectors ...providers.PlatformIdDetector) ([]*inventory.Asset, error) - AvailableDiscoveryTargets() []string -} - -var resolver map[string]Resolver - -func init() { - resolver = map[string]Resolver{} -} - -// InitCtx initializes the context to support all resolvers -func InitCtx(ctx context.Context) context.Context { - initCtx := ctx - for _, r := range resolver { - if ctxInitializer, ok := r.(common.ContextInitializer); ok { - initCtx = ctxInitializer.InitCtx(initCtx) - } - } - return initCtx -} - -func ResolveAsset(ctx context.Context, root *inventory.Asset, credsResolver vault.Resolver, sfn common.QuerySecretFn) ([]*inventory.Asset, error) { - resolved := []*inventory.Asset{} - - // if the asset is missing a secret, we try to add this for the asset - common.EnrichAssetWithSecrets(root, sfn) - - assetFallbackName := func(a *inventory.Asset, c *inventory.Config) { - // set the asset name to the config name. This is only required for error cases where the discovery - // is not successful - if a.Name == "" { - a.Name = c.Host - } - } - - for i := range root.Connections { - pCfg := root.Connections[i] - - resolverId := pCfg.Type - r, ok := resolver[resolverId] - if !ok { - assetFallbackName(root, pCfg) - return nil, errors.New("cannot discover backend: " + resolverId) - } - log.Debug().Str("resolver-id", resolverId).Str("resolver", r.Name()).Msg("run resolver") - - // check that all discovery options are supported and show a user warning - availableTargets := r.AvailableDiscoveryTargets() - if pCfg.Discover != nil { - for i := range pCfg.Discover.Targets { - target := pCfg.Discover.Targets[i] - if !stringx.Contains(availableTargets, target) { - log.Warn().Str("resolver", r.Name()).Msgf("resolver does not support discovery target '%s', the following are supported: %s", target, strings.Join(availableTargets, ",")) - } - } - } - - userIdDetectors := providers.ToPlatformIdDetectors(root.IdDetector) - - // resolve assets - resolvedAssets, err := r.Resolve(ctx, root, pCfg, credsResolver, sfn, userIdDetectors...) - if err != nil { - assetFallbackName(root, pCfg) - return nil, err - } - - for ai := range resolvedAssets { - assetObj := resolvedAssets[ai] - - // copy over id detector overwrite - assetObj.IdDetector = root.IdDetector - - // copy over labels from root - if assetObj.Labels == nil { - assetObj.Labels = map[string]string{} - } - - for k, v := range root.Labels { - assetObj.Labels[k] = v - } - - // copy over annotations from root - if assetObj.Annotations == nil { - assetObj.Annotations = map[string]string{} - } - - for k, v := range root.Annotations { - assetObj.Annotations[k] = v - } - assetObj.Category = root.Category - - // copy over managedBy from root - assetObj.ManagedBy = root.GetManagedBy() - - // if the user set the asset name via flag, --asset-name, - // that value should override the discovered one - if root.Name != "" { - assetObj.Name = root.Name - } - resolved = append(resolved, assetObj) - } - } - return resolved, nil -} - -type ResolvedAssets struct { - Assets []*inventory.Asset - RelatedAssets []*inventory.Asset - Errors map[*inventory.Asset]error -} - -func ResolveAssets(ctx context.Context, rootAssets []*inventory.Asset, credsResolver vault.Resolver, sfn common.QuerySecretFn) ResolvedAssets { - resolved := []*inventory.Asset{} - resolvedMap := map[string]struct{}{} - errors := map[*inventory.Asset]error{} - relatedAssets := []*inventory.Asset{} - platformIdToAssetMap := map[string]*inventory.Asset{} - - for i := range rootAssets { - asset := rootAssets[i] - - resolverAssets, err := ResolveAsset(ctx, asset, credsResolver, sfn) - if err != nil { - errors[asset] = err - continue - } - - for _, resolvedAsset := range resolverAssets { - for _, platformId := range resolvedAsset.PlatformIds { - if platformId != "" { - platformIdToAssetMap[platformId] = asset - resolvedMap[platformId] = struct{}{} - } - } - - for _, a := range resolvedAsset.RelatedAssets { - relatedAssets = append(relatedAssets, a) - } - } - - resolved = append(resolved, resolverAssets...) - } - - resolveRelatedAssets(ctx, relatedAssets, platformIdToAssetMap, credsResolver) - - neededRelatedAssets := []*inventory.Asset{} - for _, a := range relatedAssets { - found := false - for _, platformId := range a.PlatformIds { - if _, ok := resolvedMap[platformId]; ok { - found = true - break - } - } - if found { - continue - } - neededRelatedAssets = append(neededRelatedAssets, a) - } - - return ResolvedAssets{ - Assets: resolved, - RelatedAssets: neededRelatedAssets, - Errors: errors, - } -} - -func resolveRelatedAssets(ctx context.Context, relatedAssets []*inventory.Asset, platformIdToAssetMap map[string]*inventory.Asset, credsResolver vault.Resolver) { - for _, assetObj := range relatedAssets { - if len(assetObj.PlatformIds) > 0 { - for _, platformId := range assetObj.PlatformIds { - platformIdToAssetMap[platformId] = assetObj - } - continue - } - if len(assetObj.Connections) > 0 { - tc := assetObj.Connections[0] - if tc.PlatformId != "" { - assetObj.PlatformIds = []string{tc.PlatformId} - platformIdToAssetMap[tc.PlatformId] = assetObj - continue - } - - func() { - m, err := pr.NewMotorConnection(ctx, tc, credsResolver) - if err != nil { - log.Warn().Err(err).Msg("could not connect to related asset") - return - } - defer m.Close() - // p, err := m.Platform() - if err != nil { - log.Warn().Err(err).Msg("could not get related asset platform") - return - } - - panic("REDO") - // fingerprint, err := motorid.IdentifyPlatform(m.Provider, p, m.Provider.PlatformIdDetectors()) - // if err != nil { - // return - // } - - // if fingerprint.Runtime != "" { - // p.Runtime = fingerprint.Runtime - // } - - // if fingerprint.Kind != providers.Kind_KIND_UNKNOWN { - // p.Kind = fingerprint.Kind - // } - - // assetObj.State = asset.State_STATE_ONLINE - // assetObj.Name = fingerprint.Name - // assetObj.PlatformIds = fingerprint.PlatformIDs - // assetObj.Platform = p - - // for _, v := range fingerprint.PlatformIDs { - // platformIdToAssetMap[v] = assetObj - // } - }() - } - } -} diff --git a/_motor/discovery/resolve_test.go b/_motor/discovery/resolve_test.go deleted file mode 100644 index 0e2bc207aa..0000000000 --- a/_motor/discovery/resolve_test.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package discovery_test - -import ( - "context" - "testing" - - "github.com/stretchr/testify/assert" - "go.mondoo.com/cnquery/v9/motor/discovery" - v1 "go.mondoo.com/cnquery/v9/motor/inventory/v1" -) - -func TestResolverWithAssetName(t *testing.T) { - inventory := &v1.Inventory{ - Spec: &v1.InventorySpec{ - Assets: []*v1.Asset{ - { - Name: "test", - Connections: []*v1.Config{ - { - Type: "local", - }, - }, - }, - { - Connections: []*v1.Config{ - { - Type: "mock", - Options: map[string]string{ - "path": "./testdata/mock.toml", - }, - }, - }, - }, - }, - }, - } - - resolved := discovery.ResolveAssets(context.Background(), inventory.Spec.Assets, nil, nil) - assert.Equal(t, 2, len(resolved.Assets)) - assert.Equal(t, "test", resolved.Assets[0].Name) - assert.Equal(t, "testmachine", resolved.Assets[1].Name) - assert.Equal(t, 0, len(resolved.Errors)) -} diff --git a/_motor/discovery/tar/tar.go b/_motor/discovery/tar/tar.go deleted file mode 100644 index 547e8b483e..0000000000 --- a/_motor/discovery/tar/tar.go +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package tar - -import ( - "context" - - "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/motor/asset" - "go.mondoo.com/cnquery/v9/motor/discovery/common" - "go.mondoo.com/cnquery/v9/motor/motorid" - "go.mondoo.com/cnquery/v9/motor/providers" - "go.mondoo.com/cnquery/v9/motor/providers/resolver" - "go.mondoo.com/cnquery/v9/motor/vault" -) - -type Resolver struct{} - -func (r *Resolver) Name() string { - return "Tar Resolver" -} - -func (r *Resolver) AvailableDiscoveryTargets() []string { - return []string{common.DiscoveryAuto, common.DiscoveryAll} -} - -func (r *Resolver) Resolve(ctx context.Context, root *asset.Asset, tc *providers.Config, credsResolver vault.Resolver, sfn common.QuerySecretFn, userIdDetectors ...providers.PlatformIdDetector) ([]*asset.Asset, error) { - assetObj := &asset.Asset{ - Name: root.Name, - Connections: []*providers.Config{tc}, - State: asset.State_STATE_ONLINE, - } - - m, err := resolver.NewMotorConnection(ctx, tc, credsResolver) - if err != nil { - return nil, err - } - defer m.Close() - - // determine platform information - p, err := m.Platform() - if err == nil { - assetObj.Platform = p - } - - fingerprint, err := motorid.IdentifyPlatform(m.Provider, p, userIdDetectors) - if err != nil { - return nil, err - } - - assetObj.PlatformIds = fingerprint.PlatformIDs - if assetObj.Name != "" { - assetObj.Name = fingerprint.Name - } - - log.Debug().Strs("identifier", assetObj.PlatformIds).Msg("motor connection") - - // use hostname as name if asset name was not explicitly provided - if assetObj.Name == "" && tc.Options["path"] != "" { - assetObj.Name = tc.Options["path"] - } - - return []*asset.Asset{assetObj}, nil -} diff --git a/_motor/discovery/terraform/terraform.go b/_motor/discovery/terraform/terraform.go deleted file mode 100644 index 2eb79f1b6b..0000000000 --- a/_motor/discovery/terraform/terraform.go +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package terraform - -import ( - "context" - "path/filepath" - - "go.mondoo.com/cnquery/v9/motor/asset" - "go.mondoo.com/cnquery/v9/motor/discovery/common" - "go.mondoo.com/cnquery/v9/motor/motorid" - "go.mondoo.com/cnquery/v9/motor/providers" - "go.mondoo.com/cnquery/v9/motor/providers/resolver" - "go.mondoo.com/cnquery/v9/motor/vault" -) - -type Resolver struct{} - -func (r *Resolver) Name() string { - return "Terraform Static Analysis Resolver" -} - -func (r *Resolver) AvailableDiscoveryTargets() []string { - return []string{common.DiscoveryAuto, common.DiscoveryAll} -} - -func (r *Resolver) Resolve(ctx context.Context, root *asset.Asset, tc *providers.Config, credsResolver vault.Resolver, sfn common.QuerySecretFn, userIdDetectors ...providers.PlatformIdDetector) ([]*asset.Asset, error) { - name := "" - if tc.Options["path"] != "" { - // manifest parent directory name - name = common.ProjectNameFromPath(tc.Options["path"]) - } - - assetObj := &asset.Asset{ - Name: root.Name, - Connections: []*providers.Config{tc}, - State: asset.State_STATE_ONLINE, - Labels: map[string]string{}, - } - - if assetObj.Name == "" { - assetObj.Name = "Terraform Static Analysis " + name - } - - // we have 3 different asset types for terraform: hcl, plan and state - // platform name will differ: terraform-hcl, terraform-plan, terraform-state - // platform family will be terraform - - path, ok := tc.Options["path"] - if ok { - absPath, _ := filepath.Abs(path) - assetObj.Labels["path"] = absPath - } - - m, err := resolver.NewMotorConnection(ctx, tc, credsResolver) - if err != nil { - return nil, err - } - defer m.Close() - - // determine platform information - p, err := m.Platform() - if err == nil { - assetObj.Platform = p - } - - fingerprint, err := motorid.IdentifyPlatform(m.Provider, p, userIdDetectors) - if err != nil { - return nil, err - } - assetObj.PlatformIds = fingerprint.PlatformIDs - if fingerprint.Name != "" { - assetObj.Name = fingerprint.Name - } - - return []*asset.Asset{assetObj}, nil -} diff --git a/_motor/discovery/testdata/mock.toml b/_motor/discovery/testdata/mock.toml deleted file mode 100644 index e348682f77..0000000000 --- a/_motor/discovery/testdata/mock.toml +++ /dev/null @@ -1,162 +0,0 @@ -[commands."ls /"] -stdout = "bin boot dev etc home lib lib64 media mnt opt proc root run sbin srv sys tmp usr var" - -[commands."uname -m"] -stdout = "x86_64" - -[commands."uname -s"] -stdout = "Linux" - -[commands."hostname"] -stdout = "testmachine" - -[files."/etc/os-release"] -content = """ -NAME="Ubuntu" -VERSION="18.04 LTS (Bionic Beaver)" -ID=ubuntu -ID_LIKE=debian -PRETTY_NAME="Ubuntu 18.04 LTS" -VERSION_ID="18.04" -HOME_URL="https://www.ubuntu.com/" -SUPPORT_URL="https://help.ubuntu.com/" -BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" -PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" -VERSION_CODENAME=bionic -UBUNTU_CODENAME=bionic -""" - -[files."/etc/ssh/sshd_config"] -content = """ -# $OpenBSD: sshd_config,v 1.101 2017/03/14 07:19:07 djm Exp $ - -# This is the sshd server system-wide configuration file. See -# sshd_config(5) for more information. - -# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin - -# The strategy used for options in the default sshd_config shipped with -# OpenSSH is to specify options with their default value where -# possible, but leave them commented. Uncommented options override the -# default value. - -#Port 22 -#AddressFamily any -#ListenAddress 0.0.0.0 -#ListenAddress :: - -#HostKey /etc/ssh/ssh_host_rsa_key -#HostKey /etc/ssh/ssh_host_dsa_key -#HostKey /etc/ssh/ssh_host_ecdsa_key -#HostKey /etc/ssh/ssh_host_ed25519_key - -# Ciphers and keying -#RekeyLimit default none - -# Logging -#SyslogFacility AUTH -#LogLevel INFO - -# Authentication: - -#LoginGraceTime 2m -#PermitRootLogin prohibit-password -#StrictModes yes -#MaxAuthTries 6 -#MaxSessions 10 - -#PubkeyAuthentication yes - -# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2 -# but this is overridden so installations will only check .ssh/authorized_keys -AuthorizedKeysFile .ssh/authorized_keys - -#AuthorizedPrincipalsFile none - -#AuthorizedKeysCommand none -#AuthorizedKeysCommandUser nobody - -# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts -#HostbasedAuthentication no -# Change to yes if you don't trust ~/.ssh/known_hosts for -# HostbasedAuthentication -#IgnoreUserKnownHosts no -# Don't read the user's ~/.rhosts and ~/.shosts files -#IgnoreRhosts yes - -# To disable tunneled clear text passwords, change to no here! -#PasswordAuthentication yes -#PermitEmptyPasswords no - -# Change to no to disable s/key passwords -#ChallengeResponseAuthentication yes - -# Kerberos options -#KerberosAuthentication no -#KerberosOrLocalPasswd yes -#KerberosTicketCleanup yes -#KerberosGetAFSToken no - -# GSSAPI options -#GSSAPIAuthentication no -#GSSAPICleanupCredentials yes - -# Set this to 'yes' to enable PAM authentication, account processing, -# and session processing. If this is enabled, PAM authentication will -# be allowed through the ChallengeResponseAuthentication and -# PasswordAuthentication. Depending on your PAM configuration, -# PAM authentication via ChallengeResponseAuthentication may bypass -# the setting of "PermitRootLogin without-password". -# If you just want the PAM account and session checks to run without -# PAM authentication, then enable this but set PasswordAuthentication -# and ChallengeResponseAuthentication to 'no'. -UsePAM yes - -#AllowAgentForwarding yes -#AllowTcpForwarding yes -#GatewayPorts no -#X11Forwarding no -#X11DisplayOffset 10 -#X11UseLocalhost yes -#PermitTTY yes -#PrintMotd yes -#PrintLastLog yes -#TCPKeepAlive yes -#UseLogin no -#PermitUserEnvironment no -#Compression delayed -#ClientAliveInterval 0 -#ClientAliveCountMax 3 -#UseDNS no -#PidFile /var/run/sshd.pid -#MaxStartups 10:30:100 -#PermitTunnel no -#ChrootDirectory none -#VersionAddendum none - -# pass locale information -AcceptEnv LANG LC_* - -# no default banner path -#Banner none - -# override default of no subsystems -Subsystem sftp /usr/libexec/sftp-server - -# Example of overriding settings on a per-user basis -#Match User anoncvs -# X11Forwarding no -# AllowTcpForwarding no -# PermitTTY no -# ForceCommand cvs server -""" - -[files."/sys/class/dmi/id"] - [files."/sys/class/dmi/id".stat] - isdir = true - -[files."/sys/class/dmi/id/bios_date"] -content = "12/01/2006" - -[files."/sys/class/dmi/id/bios_vendor"] -content = "innotek GmbH" \ No newline at end of file diff --git a/_motor/discovery/vcd/resolver.go b/_motor/discovery/vcd/resolver.go deleted file mode 100644 index d7fc8242b2..0000000000 --- a/_motor/discovery/vcd/resolver.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package vcd - -import ( - "context" - "errors" - - "go.mondoo.com/cnquery/v9/motor/asset" - "go.mondoo.com/cnquery/v9/motor/discovery/common" - "go.mondoo.com/cnquery/v9/motor/providers" - "go.mondoo.com/cnquery/v9/motor/providers/resolver" - vcd_provider "go.mondoo.com/cnquery/v9/motor/providers/vcd" - "go.mondoo.com/cnquery/v9/motor/vault" -) - -type Resolver struct{} - -func (k *Resolver) Name() string { - return "VMware Cloud Director Resolver" -} - -func (r *Resolver) AvailableDiscoveryTargets() []string { - return []string{common.DiscoveryAuto, common.DiscoveryAll} -} - -func (r *Resolver) Resolve(ctx context.Context, root *asset.Asset, cc *providers.Config, credsResolver vault.Resolver, sfn common.QuerySecretFn, userIdDetectors ...providers.PlatformIdDetector) ([]*asset.Asset, error) { - resolved := []*asset.Asset{} - - m, err := resolver.NewMotorConnection(ctx, cc, credsResolver) - if err != nil { - return nil, err - } - defer m.Close() - - provider, ok := m.Provider.(*vcd_provider.Provider) - if !ok { - return nil, errors.New("could not create VMware Cloud Director provider") - } - - identifier, err := provider.Identifier() - if err != nil { - return nil, err - } - - // detect platform info for the asset - pf, err := m.Platform() - if err != nil { - return nil, err - } - - if cc.IncludesOneOfDiscoveryTarget(common.DiscoveryAuto, common.DiscoveryAll) { - resolved = append(resolved, &asset.Asset{ - PlatformIds: []string{identifier}, - Name: "VMware Cloud Director", - Platform: pf, - Connections: []*providers.Config{cc}, // pass-in the current config - Labels: map[string]string{}, - }) - } - - return resolved, nil -} diff --git a/_motor/providers/awsec2ebs/destroy.go b/_motor/providers/awsec2ebs/destroy.go deleted file mode 100644 index a9231c6b8d..0000000000 --- a/_motor/providers/awsec2ebs/destroy.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package awsec2ebs - -import ( - "context" - "time" - - "github.com/aws/aws-sdk-go-v2/service/ec2" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/aws-sdk-go/aws" - "github.com/rs/zerolog/log" -) - -func (p *Provider) DetachVolumeFromInstance(ctx context.Context, volume *VolumeInfo) error { - log.Info().Msg("detach volume") - res, err := p.scannerRegionEc2svc.DetachVolume(ctx, &ec2.DetachVolumeInput{ - Device: aws.String(p.volumeMounter.VolumeAttachmentLoc), VolumeId: &volume.Id, - InstanceId: &p.scannerInstance.Id, - }) - if err != nil { - return err - } - if res.State != types.VolumeAttachmentStateDetached { // check if it's detached already - var volState types.VolumeState - for volState != types.VolumeStateAvailable { - time.Sleep(10 * time.Second) - resp, err := p.scannerRegionEc2svc.DescribeVolumes(ctx, &ec2.DescribeVolumesInput{VolumeIds: []string{volume.Id}}) - if err != nil { - return err - } - if len(resp.Volumes) == 1 { - volState = resp.Volumes[0].State - } - log.Info().Interface("state", volState).Msg("waiting for volume detachment completion") - } - } - return nil -} - -func (p *Provider) DeleteCreatedVolume(ctx context.Context, volume *VolumeInfo) error { - log.Info().Msg("delete created volume") - _, err := p.scannerRegionEc2svc.DeleteVolume(ctx, &ec2.DeleteVolumeInput{VolumeId: &volume.Id}) - return err -} diff --git a/_motor/providers/awsec2ebs/provider.go b/_motor/providers/awsec2ebs/provider.go deleted file mode 100644 index 0bb48dcfb9..0000000000 --- a/_motor/providers/awsec2ebs/provider.go +++ /dev/null @@ -1,258 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package awsec2ebs - -import ( - "context" - "math/rand" - "time" - - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/config" - "github.com/aws/aws-sdk-go-v2/feature/ec2/imds" - "github.com/aws/aws-sdk-go-v2/service/ec2" - "github.com/cockroachdb/errors" - "github.com/rs/zerolog/log" - "github.com/spf13/afero" - "go.mondoo.com/cnquery/v9/motor/providers" - "go.mondoo.com/cnquery/v9/motor/providers/fs" - "go.mondoo.com/cnquery/v9/motor/providers/os" - "go.mondoo.com/cnquery/v9/motor/providers/os/snapshot" -) - -var ( - _ providers.Instance = (*Provider)(nil) - _ providers.PlatformIdentifier = (*Provider)(nil) - _ os.OperatingSystemProvider = (*Provider)(nil) -) - -// New creates a new aws-ec2-ebs provider -// It expects to be running on an ec2 instance with ssm iam role and -// permissions for copy snapshot, create snapshot, create volume, attach volume, detach volume -// TODO: validate the expected permissions here -func New(pCfg *providers.Config) (*Provider, error) { - rand.Seed(time.Now().UnixNano()) - - // 1. validate; load - // TODO allow custom aws config - cfg, err := config.LoadDefaultConfig(context.Background()) - if err != nil { - return nil, errors.Wrap(err, "could not load aws configuration") - } - i, err := RawInstanceInfo(cfg) - if err != nil { - return nil, errors.Wrap(err, "could not load instance info: aws-ec2-ebs provider only valid on ec2 instances") - } - - // ec2 client for the scanner region - cfg.Region = i.Region - scannerSvc := ec2.NewFromConfig(cfg) - - // ec2 client for the target region - cfgCopy := cfg.Copy() - cfgCopy.Region = pCfg.Options["region"] - targetSvc := ec2.NewFromConfig(cfgCopy) - - shell := []string{"sh", "-c"} - volumeMounter := snapshot.NewVolumeMounter(shell) - - // 2. create provider instance - p := &Provider{ - config: cfg, - opts: pCfg.Options, - target: TargetInfo{ - PlatformId: pCfg.PlatformId, - AccountId: pCfg.Options["account"], - Region: pCfg.Options["region"], - Id: pCfg.Options["id"], - }, - targetType: pCfg.Options["type"], - scannerInstance: &InstanceId{ - Id: i.InstanceID, - Region: i.Region, - Account: i.AccountID, - Zone: i.AvailabilityZone, - }, - targetRegionEc2svc: targetSvc, - scannerRegionEc2svc: scannerSvc, - volumeMounter: volumeMounter, - } - log.Debug().Interface("info", p.target).Str("type", p.targetType).Msg("target") - - ctx := context.Background() - - // 3. validate - instanceinfo, volumeid, snapshotid, err := p.Validate(ctx) - if err != nil { - return p, errors.Wrap(err, "unable to validate") - } - - // 4. setup the volume for scanning - // check if we got the no setup override option. this implies the target volume is already attached to the instance - // this is used in cases where we need to test a snapshot created from a public marketplace image. the volume gets attached to a brand - // new instance, and then that instance is started and we scan the attached fs - if pCfg.Options[snapshot.NoSetup] == "true" { - log.Info().Msg("skipping setup step") - } else { - var ok bool - var err error - switch p.targetType { - case EBSTargetInstance: - ok, err = p.SetupForTargetInstance(ctx, instanceinfo) - case EBSTargetVolume: - ok, err = p.SetupForTargetVolume(ctx, *volumeid) - case EBSTargetSnapshot: - ok, err = p.SetupForTargetSnapshot(ctx, *snapshotid) - default: - return p, errors.New("invalid target type") - } - if err != nil { - log.Error().Err(err).Msg("unable to complete setup step") - p.Close() - return p, err - } - if !ok { - return p, errors.New("something went wrong; unable to complete setup for ebs volume scan") - } - } - - // Mount Volume - err = p.volumeMounter.Mount() - if err != nil { - log.Error().Err(err).Msg("unable to complete mount step") - p.Close() - return p, err - } - - // Create and initialize fs provider - fsProvider, err := fs.NewWithClose(&providers.Config{ - Path: p.volumeMounter.ScanDir, - Backend: providers.ProviderType_FS, - PlatformId: pCfg.PlatformId, - Options: pCfg.Options, - }, p.Close) - if err != nil { - return nil, err - } - p.FsProvider = fsProvider - return p, nil -} - -type Provider struct { - FsProvider *fs.Provider - scannerRegionEc2svc *ec2.Client - targetRegionEc2svc *ec2.Client - config aws.Config - opts map[string]string - scannerInstance *InstanceId // the instance the transport is running on - scanVolumeInfo *VolumeInfo // the info of the volume we attached to the instance - target TargetInfo // info about the target - targetType string // the type of object we're targeting (instance, volume, snapshot) - volumeMounter *snapshot.VolumeMounter -} - -type TargetInfo struct { - PlatformId string - AccountId string - Region string - Id string -} - -func (p *Provider) RunCommand(command string) (*os.Command, error) { - return nil, errors.New("RunCommand not implemented") -} - -func (p *Provider) FileInfo(path string) (os.FileInfoDetails, error) { - return os.FileInfoDetails{}, errors.New("FileInfo not implemented") -} - -func (p *Provider) FS() afero.Fs { - return p.FsProvider.FS() -} - -func (p *Provider) Close() { - if p.opts != nil { - if p.opts[snapshot.NoSetup] == "true" { - return - } - } - ctx := context.Background() - err := p.volumeMounter.UnmountVolumeFromInstance() - if err != nil { - log.Error().Err(err).Msg("unable to unmount volume") - } - err = p.DetachVolumeFromInstance(ctx, p.scanVolumeInfo) - if err != nil { - log.Error().Err(err).Msg("unable to detach volume") - } - // only delete the volume if we created it, e.g., if we're scanning a snapshot - if val, ok := p.scanVolumeInfo.Tags["createdBy"]; ok { - if val == "Mondoo" { - err = p.DeleteCreatedVolume(ctx, p.scanVolumeInfo) - if err != nil { - log.Error().Err(err).Msg("unable to delete volume") - } - log.Info().Str("vol-id", p.scanVolumeInfo.Id).Msg("deleted temporary volume created by Mondoo") - } - } else { - log.Debug().Str("vol-id", p.scanVolumeInfo.Id).Msg("skipping volume deletion, not created by Mondoo") - } - err = p.volumeMounter.RemoveTempScanDir() - if err != nil { - log.Error().Err(err).Msg("unable to remove dir") - } -} - -func (p *Provider) Capabilities() providers.Capabilities { - return providers.Capabilities{ - providers.Capability_Aws_Ebs, - } -} - -func (p *Provider) Kind() providers.Kind { - return providers.Kind_KIND_API -} - -func (p *Provider) Runtime() string { - return providers.RUNTIME_AWS_EC2_EBS -} - -func (p *Provider) PlatformIdDetectors() []providers.PlatformIdDetector { - return []providers.PlatformIdDetector{ - providers.TransportPlatformIdentifierDetector, - } -} - -func RawInstanceInfo(cfg aws.Config) (*imds.InstanceIdentityDocument, error) { - metadata := imds.NewFromConfig(cfg) - ctx := context.Background() - doc, err := metadata.GetInstanceIdentityDocument(ctx, &imds.GetInstanceIdentityDocumentInput{}) - if err != nil { - return nil, err - } - return &doc.InstanceIdentityDocument, nil -} - -func (p *Provider) Identifier() (string, error) { - return p.target.PlatformId, nil -} - -func GetRawInstanceInfo(profile string) (*imds.InstanceIdentityDocument, error) { - ctx := context.Background() - var cfg aws.Config - var err error - if profile == "" { - cfg, err = config.LoadDefaultConfig(ctx) - } else { - cfg, err = config.LoadDefaultConfig(ctx, config.WithSharedConfigProfile(profile)) - } - if err != nil { - return nil, errors.Wrap(err, "could not load aws configuration") - } - i, err := RawInstanceInfo(cfg) - if err != nil { - return nil, errors.Wrap(err, "could not load instance info: aws-ec2-ebs provider is only valid on ec2 instances") - } - return i, nil -} diff --git a/_motor/providers/awsec2ebs/setup.go b/_motor/providers/awsec2ebs/setup.go deleted file mode 100644 index 5d41a4c6d1..0000000000 --- a/_motor/providers/awsec2ebs/setup.go +++ /dev/null @@ -1,437 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package awsec2ebs - -import ( - "context" - "math/rand" - "strings" - "time" - - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/service/ec2" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go" - "github.com/cockroachdb/errors" - "github.com/rs/zerolog/log" - motoraws "go.mondoo.com/cnquery/v9/motor/discovery/aws" -) - -func (t *Provider) Validate(ctx context.Context) (*types.Instance, *VolumeInfo, *SnapshotId, error) { - target := t.target - switch t.targetType { - case EBSTargetInstance: - log.Info().Interface("instance", target).Msg("validate state") - resp, err := t.targetRegionEc2svc.DescribeInstances(ctx, &ec2.DescribeInstancesInput{InstanceIds: []string{target.Id}}) - if err != nil { - return nil, nil, nil, err - } - if !motoraws.InstanceIsInRunningOrStoppedState(resp.Reservations[0].Instances[0].State) { - return nil, nil, nil, errors.New("instance must be in running or stopped state") - } - return &resp.Reservations[0].Instances[0], nil, nil, nil - case EBSTargetVolume: - log.Info().Interface("volume", target).Msg("validate exists") - vols, err := t.targetRegionEc2svc.DescribeVolumes(ctx, &ec2.DescribeVolumesInput{VolumeIds: []string{target.Id}}) - if err != nil { - return nil, nil, nil, err - } - if len(vols.Volumes) > 0 { - vol := vols.Volumes[0] - if vol.State != types.VolumeStateAvailable { - // we can still scan it, it just means we have to do the whole snapshot/create volume dance - log.Warn().Msg("volume specified is not in available state") - return nil, &VolumeInfo{Id: t.target.Id, Account: t.target.AccountId, Region: t.target.Region, IsAvailable: false, Tags: awsTagsToMap(vol.Tags)}, nil, nil - } - return nil, &VolumeInfo{Id: t.target.Id, Account: t.target.AccountId, Region: t.target.Region, IsAvailable: true, Tags: awsTagsToMap(vol.Tags)}, nil, nil - } - case EBSTargetSnapshot: - log.Info().Interface("snapshot", target).Msg("validate exists") - snaps, err := t.targetRegionEc2svc.DescribeSnapshots(ctx, &ec2.DescribeSnapshotsInput{SnapshotIds: []string{target.Id}}) - if err != nil { - return nil, nil, nil, err - } - if len(snaps.Snapshots) > 0 { - return nil, nil, &SnapshotId{Id: t.target.Id, Account: t.target.AccountId, Region: t.target.Region}, nil - } - default: - return nil, nil, nil, errors.New("cannot validate; unrecognized ebs target") - } - return nil, nil, nil, errors.New("cannot validate; unrecognized ebs target") -} - -func (t *Provider) SetupForTargetVolume(ctx context.Context, volume VolumeInfo) (bool, error) { - log.Debug().Interface("volume", volume).Msg("setup for target volume") - if !volume.IsAvailable { - return t.SetupForTargetVolumeUnavailable(ctx, volume) - } - t.scanVolumeInfo = &volume - return t.AttachVolumeToInstance(ctx, volume) -} - -func (t *Provider) SetupForTargetVolumeUnavailable(ctx context.Context, volume VolumeInfo) (bool, error) { - found, snapId, err := t.FindRecentSnapshotForVolume(ctx, volume) - if err != nil { - // only log the error here, this is not a blocker - log.Error().Err(err).Msg("unable to find recent snapshot for volume") - } - if !found { - snapId, err = t.CreateSnapshotFromVolume(ctx, volume) - if err != nil { - return false, err - } - } - snapId, err = t.CopySnapshotToRegion(ctx, snapId) - if err != nil { - return false, err - } - volId, err := t.CreateVolumeFromSnapshot(ctx, snapId) - if err != nil { - return false, err - } - t.scanVolumeInfo = &volId - return t.AttachVolumeToInstance(ctx, volId) -} - -func (t *Provider) SetupForTargetSnapshot(ctx context.Context, snapshot SnapshotId) (bool, error) { - log.Debug().Interface("snapshot", snapshot).Msg("setup for target snapshot") - snapId, err := t.CopySnapshotToRegion(ctx, snapshot) - if err != nil { - return false, err - } - volId, err := t.CreateVolumeFromSnapshot(ctx, snapId) - if err != nil { - return false, err - } - t.scanVolumeInfo = &volId - return t.AttachVolumeToInstance(ctx, volId) -} - -func (t *Provider) SetupForTargetInstance(ctx context.Context, instanceinfo *types.Instance) (bool, error) { - log.Debug().Str("instance id", *instanceinfo.InstanceId).Msg("setup for target instance") - var err error - v, err := t.GetVolumeInfoForInstance(ctx, instanceinfo) - if err != nil { - return false, err - } - found, snapId, err := t.FindRecentSnapshotForVolume(ctx, v) - if err != nil { - // only log the error here, this is not a blocker - log.Error().Err(err).Msg("unable to find recent snapshot for volume") - } - if !found { - snapId, err = t.CreateSnapshotFromVolume(ctx, v) - if err != nil { - return false, err - } - } - snapId, err = t.CopySnapshotToRegion(ctx, snapId) - if err != nil { - return false, err - } - volId, err := t.CreateVolumeFromSnapshot(ctx, snapId) - if err != nil { - return false, err - } - t.scanVolumeInfo = &volId - return t.AttachVolumeToInstance(ctx, volId) -} - -func (t *Provider) GetVolumeInfoForInstance(ctx context.Context, instanceinfo *types.Instance) (VolumeInfo, error) { - i := t.target - log.Info().Interface("instance", i).Msg("find volume id") - - if volID := GetVolumeInfoForInstance(instanceinfo); volID != nil { - return VolumeInfo{Id: *volID, Region: i.Region, Account: i.AccountId, Tags: map[string]string{}}, nil - } - return VolumeInfo{}, errors.New("no volume id found for instance") -} - -func GetVolumeInfoForInstance(instanceinfo *types.Instance) *string { - if len(instanceinfo.BlockDeviceMappings) == 1 { - return instanceinfo.BlockDeviceMappings[0].Ebs.VolumeId - } - if len(instanceinfo.BlockDeviceMappings) > 1 { - for bi := range instanceinfo.BlockDeviceMappings { - log.Info().Interface("device", *instanceinfo.BlockDeviceMappings[bi].DeviceName).Msg("found instance block devices") - // todo: revisit this. this works for the standard ec2 instance setup, but no guarantees outside of that.. - if strings.Contains(*instanceinfo.BlockDeviceMappings[bi].DeviceName, "xvda") { // xvda is the root volume - return instanceinfo.BlockDeviceMappings[bi].Ebs.VolumeId - } - if strings.Contains(*instanceinfo.BlockDeviceMappings[bi].DeviceName, "sda1") { - return instanceinfo.BlockDeviceMappings[bi].Ebs.VolumeId - } - } - } - return nil -} - -func (t *Provider) FindRecentSnapshotForVolume(ctx context.Context, v VolumeInfo) (bool, SnapshotId, error) { - return FindRecentSnapshotForVolume(ctx, v, t.scannerRegionEc2svc) -} - -func FindRecentSnapshotForVolume(ctx context.Context, v VolumeInfo, svc *ec2.Client) (bool, SnapshotId, error) { - log.Info().Msg("find recent snapshot") - res, err := svc.DescribeSnapshots(ctx, - &ec2.DescribeSnapshotsInput{Filters: []types.Filter{ - {Name: aws.String("volume-id"), Values: []string{v.Id}}, - }}) - if err != nil { - return false, SnapshotId{}, err - } - - eighthrsago := time.Now().Add(-8 * time.Hour) - for i := range res.Snapshots { - // check the start time on all the snapshots - snapshot := res.Snapshots[i] - if snapshot.StartTime.After(eighthrsago) { - s := SnapshotId{Account: v.Account, Region: v.Region, Id: *snapshot.SnapshotId} - log.Info().Interface("snapshot", s).Msg("found snapshot") - snapState := snapshot.State - timeout := 0 - for snapState != types.SnapshotStateCompleted { - log.Info().Interface("state", snapState).Msg("waiting for snapshot copy completion; sleeping 10 seconds") - time.Sleep(10 * time.Second) - snaps, err := svc.DescribeSnapshots(ctx, &ec2.DescribeSnapshotsInput{SnapshotIds: []string{s.Id}}) - if err != nil { - var ae smithy.APIError - if errors.As(err, &ae) { - if ae.ErrorCode() == "InvalidSnapshot.NotFound" { - return false, SnapshotId{}, nil - } - } - return false, SnapshotId{}, err - } - snapState = snaps.Snapshots[0].State - if timeout == 6 { // we've waited a minute - return false, SnapshotId{}, errors.New("timed out waiting for recent snapshot to complete") - } - timeout++ - } - return true, s, nil - } - } - return false, SnapshotId{}, nil -} - -func (t *Provider) CreateSnapshotFromVolume(ctx context.Context, v VolumeInfo) (SnapshotId, error) { - log.Info().Msg("create snapshot") - // snapshot the volume - // use region from volume for aws config - cfgCopy := t.config.Copy() - cfgCopy.Region = v.Region - snapId, err := CreateSnapshotFromVolume(ctx, cfgCopy, v.Id, resourceTags(types.ResourceTypeSnapshot, t.target.Id)) - if err != nil { - return SnapshotId{}, err - } - - return SnapshotId{Id: *snapId, Region: v.Region, Account: v.Account}, nil -} - -func CreateSnapshotFromVolume(ctx context.Context, cfg aws.Config, volID string, tags []types.TagSpecification) (*string, error) { - ec2svc := ec2.NewFromConfig(cfg) - res, err := ec2svc.CreateSnapshot(ctx, &ec2.CreateSnapshotInput{VolumeId: &volID, TagSpecifications: tags}) - if err != nil { - return nil, err - } - - /* - NOTE re: encrypted snapshots - Snapshots that are taken from encrypted volumes are - automatically encrypted/decrypted. Volumes that are created from encrypted snapshots are - also automatically encrypted/decrypted. - */ - - // wait for snapshot to be ready - time.Sleep(10 * time.Second) - snapProgress := *res.Progress - snapState := res.State - timeout := 0 - notFoundTimeout := 0 - for snapState != types.SnapshotStateCompleted || !strings.Contains(snapProgress, "100") { - log.Info().Str("progress", snapProgress).Msg("waiting for snapshot completion; sleeping 10 seconds") - time.Sleep(10 * time.Second) - snaps, err := ec2svc.DescribeSnapshots(ctx, &ec2.DescribeSnapshotsInput{SnapshotIds: []string{*res.SnapshotId}}) - if err != nil { - var ae smithy.APIError - if errors.As(err, &ae) { - if ae.ErrorCode() == "InvalidSnapshot.NotFound" { - time.Sleep(30 * time.Second) // if it says it doesn't exist, even though we just created it, then it must still be busy creating - notFoundTimeout++ - if notFoundTimeout > 10 { - return nil, errors.New("timed out wating for created snapshot to complete; snapshot not found") - } - continue - } - } - return nil, err - } - if len(snaps.Snapshots) != 1 { - return nil, errors.Newf("expected one snapshot, got %d", len(snaps.Snapshots)) - } - snapProgress = *snaps.Snapshots[0].Progress - snapState = snaps.Snapshots[0].State - if timeout > 24 { // 4 minutes - return nil, errors.New("timed out wating for created snapshot to complete") - } - } - log.Info().Str("progress", snapProgress).Msg("snapshot complete") - - return res.SnapshotId, nil -} - -func (t *Provider) CopySnapshotToRegion(ctx context.Context, snapshot SnapshotId) (SnapshotId, error) { - log.Info().Str("snapshot", snapshot.Region).Str("scanner instance", t.scannerInstance.Region).Msg("checking snapshot region") - if snapshot.Region == t.scannerInstance.Region { - // we only need to copy the snapshot to the scanner region if it is not already in the same region - return snapshot, nil - } - var newSnapshot SnapshotId - log.Info().Msg("copy snapshot") - // snapshot the volume - res, err := t.scannerRegionEc2svc.CopySnapshot(ctx, &ec2.CopySnapshotInput{SourceRegion: &snapshot.Region, SourceSnapshotId: &snapshot.Id, TagSpecifications: resourceTags(types.ResourceTypeSnapshot, t.target.Id)}) - if err != nil { - return newSnapshot, err - } - - // wait for snapshot to be ready - snaps, err := t.scannerRegionEc2svc.DescribeSnapshots(ctx, &ec2.DescribeSnapshotsInput{SnapshotIds: []string{*res.SnapshotId}}) - if err != nil { - return newSnapshot, err - } - snapState := snaps.Snapshots[0].State - for snapState != types.SnapshotStateCompleted { - log.Info().Interface("state", snapState).Msg("waiting for snapshot copy completion; sleeping 10 seconds") - time.Sleep(10 * time.Second) - snaps, err := t.scannerRegionEc2svc.DescribeSnapshots(ctx, &ec2.DescribeSnapshotsInput{SnapshotIds: []string{*res.SnapshotId}}) - if err != nil { - return newSnapshot, err - } - snapState = snaps.Snapshots[0].State - } - return SnapshotId{Id: *res.SnapshotId, Region: t.config.Region, Account: t.scannerInstance.Account}, nil -} - -func (t *Provider) CreateVolumeFromSnapshot(ctx context.Context, snapshot SnapshotId) (VolumeInfo, error) { - log.Info().Msg("create volume") - var vol VolumeInfo - - out, err := t.scannerRegionEc2svc.CreateVolume(ctx, &ec2.CreateVolumeInput{ - SnapshotId: &snapshot.Id, - AvailabilityZone: &t.scannerInstance.Zone, - TagSpecifications: resourceTags(types.ResourceTypeVolume, t.target.Id), - }) - if err != nil { - return vol, err - } - - /* - NOTE re: encrypted snapshots - Snapshots that are taken from encrypted volumes are - automatically encrypted/decrypted. Volumes that are created from encrypted snapshots are - also automatically encrypted/decrypted. - */ - - state := out.State - for state != types.VolumeStateAvailable { - log.Info().Interface("state", state).Msg("waiting for volume creation completion; sleeping 10 seconds") - time.Sleep(10 * time.Second) - vols, err := t.scannerRegionEc2svc.DescribeVolumes(ctx, &ec2.DescribeVolumesInput{VolumeIds: []string{*out.VolumeId}}) - if err != nil { - return vol, err - } - state = vols.Volumes[0].State - } - return VolumeInfo{Id: *out.VolumeId, Region: t.config.Region, Account: t.scannerInstance.Account, Tags: awsTagsToMap(out.Tags)}, nil -} - -func newVolumeAttachmentLoc() string { - chars := []rune("bcdefghijklmnopqrstuvwxyz") // a is reserved for the root volume - randomIndex := rand.Intn(len(chars)) - c := chars[randomIndex] - // https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/device_naming.html - return "/dev/sd" + string(c) -} - -func AttachVolume(ctx context.Context, ec2svc *ec2.Client, location string, volID string, instanceID string) (string, types.VolumeAttachmentState, error) { - res, err := ec2svc.AttachVolume(ctx, &ec2.AttachVolumeInput{ - Device: aws.String(location), VolumeId: &volID, - InstanceId: &instanceID, - }) - if err != nil { - log.Error().Err(err).Str("volume", volID).Msg("attach volume err") - var ae smithy.APIError - if errors.As(err, &ae) { - if ae.ErrorCode() != "InvalidParameterValue" { - // we don't want to return the err if it's invalid parameter value - return location, "", err - } - } - // if invalid, it could be something else is using that space, try to mount to diff location - newlocation := newVolumeAttachmentLoc() - if location != newlocation { - location = newlocation - } else { - location = newVolumeAttachmentLoc() // we shouldn't have gotten the same one the first go round, but it is randomized, so there is a possibility. try again in that case. - } - res, err = ec2svc.AttachVolume(ctx, &ec2.AttachVolumeInput{ - Device: aws.String(location), VolumeId: &volID, // warning: there is no guarantee that aws will place the volume at this location - InstanceId: &instanceID, - }) - if err != nil { - log.Error().Err(err).Str("volume", volID).Msg("attach volume err") - return location, "", err - } - } - if res.Device != nil { - log.Debug().Str("location", *res.Device).Msg("attached volume") - location = *res.Device - } - return location, res.State, nil -} - -func (t *Provider) AttachVolumeToInstance(ctx context.Context, volume VolumeInfo) (bool, error) { - log.Info().Str("volume id", volume.Id).Msg("attach volume") - t.volumeMounter.VolumeAttachmentLoc = newVolumeAttachmentLoc() - ready := false - location, state, err := AttachVolume(ctx, t.scannerRegionEc2svc, newVolumeAttachmentLoc(), volume.Id, t.scannerInstance.Id) - if err != nil { - return ready, err - } - t.volumeMounter.VolumeAttachmentLoc = location // warning: there is no guarantee from AWS that the device will be placed there - log.Debug().Str("location", location).Msg("target volume") - - /* - NOTE: re: encrypted volumes - Encrypted EBS volumes must be attached - to instances that support Amazon EBS encryption: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html - */ - - // here we have the attachment state - if state != types.VolumeAttachmentStateAttached { - var volState types.VolumeState - for volState != types.VolumeStateInUse { - time.Sleep(10 * time.Second) - resp, err := t.scannerRegionEc2svc.DescribeVolumes(ctx, &ec2.DescribeVolumesInput{VolumeIds: []string{volume.Id}}) - if err != nil { - return ready, err - } - if len(resp.Volumes) == 1 { - volState = resp.Volumes[0].State - } - log.Info().Interface("state", volState).Msg("waiting for volume attachment completion") - } - } - return true, nil -} - -func awsTagsToMap(tags []types.Tag) map[string]string { - m := make(map[string]string) - for _, t := range tags { - if t.Key != nil && t.Value != nil { - m[*t.Key] = *t.Value - } - } - return m -} diff --git a/_motor/providers/awsec2ebs/setup_test.go b/_motor/providers/awsec2ebs/setup_test.go deleted file mode 100644 index 97767e3e7c..0000000000 --- a/_motor/providers/awsec2ebs/setup_test.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -//go:build debugtest -// +build debugtest - -package awsec2ebs - -import ( - "context" - "testing" - - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/config" - "github.com/aws/aws-sdk-go-v2/service/ec2" - "github.com/stretchr/testify/assert" -) - -func awsTestConfig() aws.Config { - cfg, err := config.LoadDefaultConfig(context.Background(), - config.WithSharedConfigProfile("mondoo-demo"), - config.WithRegion("us-east-1"), - ) - if err != nil { - panic(err) - } - - return cfg -} - -func TestFindRecentSnapshot(t *testing.T) { - ec2svc := ec2.NewFromConfig(awsTestConfig()) - e := Provider{scannerRegionEc2svc: ec2svc} - found, _ := e.FindRecentSnapshotForVolume(context.Background(), VolumeId{Id: "vol-0c04d709ea3e59096", Region: "us-east-1", Account: "185972265011"}) - assert.Equal(t, found, true) - // found, _ = e.FindRecentSnapshotForVolume(context.Background(), VolumeId{Id: "vol-0d5df63d656ac4d9c", Region: "us-east-1", Account: "185972265011"}) - // assert.Equal(t, found, true) -} diff --git a/_motor/providers/awsec2ebs/setup_unit_test.go b/_motor/providers/awsec2ebs/setup_unit_test.go deleted file mode 100644 index 605e603b47..0000000000 --- a/_motor/providers/awsec2ebs/setup_unit_test.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package awsec2ebs - -import ( - "math/rand" - "strings" - "testing" - "time" - - "github.com/stretchr/testify/require" -) - -func TestNewVolumeAttachmentLoc(t *testing.T) { - rand.Seed(time.Now().UnixNano()) - loc1 := newVolumeAttachmentLoc() - require.Equal(t, len(loc1), 8) - require.Equal(t, strings.HasPrefix(loc1, "/dev/sd"), true) -} diff --git a/_motor/providers/awsec2ebs/types.go b/_motor/providers/awsec2ebs/types.go deleted file mode 100644 index 291558edb8..0000000000 --- a/_motor/providers/awsec2ebs/types.go +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package awsec2ebs - -import ( - "path" - "regexp" - "strings" - - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/aws-sdk-go/aws" - "github.com/cockroachdb/errors" -) - -type InstanceId struct { - Id string - Region string - Name string - Account string - Zone string - MarketplaceImg bool -} - -func NewInstanceId(account string, region string, id string) (*InstanceId, error) { - if region == "" || id == "" || account == "" { - return nil, errors.New("invalid instance id. account, region and instance id required.") - } - return &InstanceId{Account: account, Region: region, Id: id}, nil -} - -func (s *InstanceId) String() string { - // e.g. account/999000999000/region/us-east-2/instance/i-0989478343232 - return path.Join("account", s.Account, "region", s.Region, "instance", s.Id) -} - -func ParseInstanceId(path string) (*InstanceId, error) { - if !IsValidInstanceId(path) { - return nil, errors.New("invalid instance id. expected account//region//instance/") - } - keyValues := strings.Split(path, "/") - if len(keyValues) != 6 { - return nil, errors.New("invalid instance id. expected account//region//instance/") - } - return NewInstanceId(keyValues[1], keyValues[3], keyValues[5]) -} - -var VALID_INSTANCE_ID = regexp.MustCompile(`^account/\d{12}/region\/(us(-gov)?|ap|ca|cn|eu|sa)-(central|(north|south)?(east|west)?)-\d\/instance\/.+$`) - -func IsValidInstanceId(path string) bool { - return VALID_INSTANCE_ID.MatchString(path) -} - -type SnapshotId struct { - Id string - Region string - Account string -} - -type VolumeInfo struct { - Id string - Region string - Account string - IsAvailable bool - Tags map[string]string -} - -func resourceTags(resourceType types.ResourceType, instanceId string) []types.TagSpecification { - return []types.TagSpecification{ - { - ResourceType: resourceType, - Tags: []types.Tag{ - {Key: aws.String("createdBy"), Value: aws.String("Mondoo")}, - {Key: aws.String("Created By"), Value: aws.String("Mondoo")}, - {Key: aws.String("Created From Instance"), Value: aws.String(instanceId)}, - }, - }, - } -} - -const ( - EBSTargetInstance = "instance" - EBSTargetVolume = "volume" - EBSTargetSnapshot = "snapshot" -) - -type EbsTransportTarget struct { - Account string - Region string - Id string - Type string -} - -func ParseEbsTransportUrl(path string) (*EbsTransportTarget, error) { - keyValues := strings.Split(path, "/") - if len(keyValues) != 6 { - return nil, errors.New("invalid id. expected account//region//{instance, volume, or snapshot}/") - } - - var itemType string - switch keyValues[4] { - case "volume": - itemType = EBSTargetVolume - case "snapshot": - itemType = EBSTargetSnapshot - default: - itemType = EBSTargetInstance - } - - return &EbsTransportTarget{Account: keyValues[1], Region: keyValues[3], Id: keyValues[5], Type: itemType}, nil -} diff --git a/_motor/providers/awsec2ebs/types_test.go b/_motor/providers/awsec2ebs/types_test.go deleted file mode 100644 index cd106707f0..0000000000 --- a/_motor/providers/awsec2ebs/types_test.go +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package awsec2ebs - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestParseInstanceId(t *testing.T) { - path := "account/185972265011/region/us-east-1/instance/i-07f67838ada5879af" - id, err := ParseInstanceId(path) - assert.NotNil(t, err) - assert.Equal(t, id.Account, "185972265011") - assert.Equal(t, id.Region, "us-east-1") - assert.Equal(t, id.Id, "i-07f67838ada5879af") -} diff --git a/_motor/providers/capabilities.go b/_motor/providers/capabilities.go deleted file mode 100644 index b30f07afe3..0000000000 --- a/_motor/providers/capabilities.go +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package providers - -import "strconv" - -type Capability int - -const ( - Capability_RunCommand Capability = iota - Capability_File - Capability_FileSearch - Capability_AWS - Capability_vSphere - Capability_Azure - Capability_Google - Capability_Arista - Capability_Microsoft365 - Capability_Ipmi - Capability_Equinix - Capability_Github - Capability_Aws_Ebs - Capability_Gitlab -) - -var CapabilityNames = map[Capability]string{ - Capability_RunCommand: "run-command", - Capability_File: "file", - Capability_FileSearch: "file-search", - Capability_AWS: "api-aws", - Capability_vSphere: "api-vsphere", - Capability_Azure: "api-azure", - Capability_Google: "api-google", - Capability_Arista: "api-arista", - Capability_Microsoft365: "api-ms365", - Capability_Ipmi: "api-ipmi", - Capability_Equinix: "api-equinix", - Capability_Github: "api-github", - Capability_Aws_Ebs: "aws-ebs", - Capability_Gitlab: "api-gitlab", -} - -func (c Capability) String() string { - v, ok := CapabilityNames[c] - if ok { - return v - } - return strconv.Itoa(int(c)) -} - -type Capabilities []Capability - -func (c Capabilities) HasCapability(x Capability) bool { - for i := range c { - if c[i] == x { - return true - } - } - return false -} diff --git a/_motor/providers/network/provider.go b/_motor/providers/network/provider.go deleted file mode 100644 index 81856a9266..0000000000 --- a/_motor/providers/network/provider.go +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package network - -import ( - "strconv" - - "go.mondoo.com/cnquery/v9/motor/providers" -) - -type Provider struct { - FQDN string - Port int32 - Scheme string - Family []string - Options map[string]string -} - -func New(conf *providers.Config) (*Provider, error) { - family := []string{"network"} - s := providers.ProviderID_HOST - if _, ok := conf.Options["tls"]; ok { - family = append(family, "tls") - s = providers.ProviderID_TLS - } - - return &Provider{ - FQDN: conf.Host, - Port: conf.Port, - Scheme: s, - Family: family, - Options: conf.Options, - }, nil -} - -func (p *Provider) Identifier() (string, error) { - host := p.FQDN - if p.Port != 0 { - host = p.FQDN + ":" + strconv.Itoa(int(p.Port)) - } - - if _, ok := p.Options["tls"]; ok { - return "//platformid.api.mondoo.app/runtime/network/tls/" + host, nil - } else { - return "//platformid.api.mondoo.app/runtime/network/host/" + host, nil - } -} - -func (p *Provider) URI() string { - if p.Port == 0 { - return p.Scheme + "://" + p.FQDN - } - return p.Scheme + "://" + p.FQDN + ":" + strconv.Itoa(int(p.Port)) -} - -func (p *Provider) Supports(mode string) bool { - for i := range p.Family { - if p.Family[i] == mode { - return true - } - } - return false -} - -// ----------------- other requirements vv ------------------------- - -func (p *Provider) Close() {} - -func (p *Provider) Capabilities() providers.Capabilities { - return providers.Capabilities{} -} - -func (p *Provider) Kind() providers.Kind { - return providers.Kind_KIND_NETWORK -} - -func (p *Provider) PlatformIdDetectors() []providers.PlatformIdDetector { - return []providers.PlatformIdDetector{} -} - -func (p *Provider) Runtime() string { - return "" -} diff --git a/_motor/providers/os/cmd/command.go b/_motor/providers/os/cmd/command.go deleted file mode 100644 index 6a70d211a9..0000000000 --- a/_motor/providers/os/cmd/command.go +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package cmd - -import ( - "bytes" - "os/exec" - "strings" - "syscall" - "time" - - "go.mondoo.com/cnquery/v9/motor/providers/os" -) - -type CommandRunner struct { - os.Command - cmdExecutor *exec.Cmd - Shell []string -} - -func (c *CommandRunner) Exec(usercmd string, args []string) (*os.Command, error) { - c.Command.Stats.Start = time.Now() - - var cmd string - cmdArgs := []string{} - - if len(c.Shell) > 0 { - shellCommand, shellArgs := c.Shell[0], c.Shell[1:] - cmd = shellCommand - cmdArgs = append(cmdArgs, shellArgs...) - cmdArgs = append(cmdArgs, usercmd) - } else { - cmd = usercmd - } - cmdArgs = append(cmdArgs, args...) - - // this only stores the user command, not the shell - c.Command.Command = usercmd + " " + strings.Join(args, " ") - c.cmdExecutor = exec.Command(cmd, cmdArgs...) - - var stdoutBuffer bytes.Buffer - var stderrBuffer bytes.Buffer - - // create buffered stream - c.Command.Stdout = &stdoutBuffer - c.Command.Stderr = &stderrBuffer - - c.cmdExecutor.Stdout = c.Command.Stdout - c.cmdExecutor.Stderr = c.Command.Stderr - - err := c.cmdExecutor.Run() - c.Command.Stats.Duration = time.Since(c.Command.Stats.Start) - - // command completed successfully, great :-) - if err == nil { - return &c.Command, nil - } - - // if the program failed, we do not return err but its exit code - if exiterr, ok := err.(*exec.ExitError); ok { - if status, ok := exiterr.Sys().(syscall.WaitStatus); ok { - c.Command.ExitStatus = status.ExitStatus() - } - return &c.Command, nil - } - - // all other errors are real errors and not expected - return &c.Command, err -} diff --git a/_motor/providers/os/cmd/command_test.go b/_motor/providers/os/cmd/command_test.go deleted file mode 100644 index 3d285ff7cf..0000000000 --- a/_motor/providers/os/cmd/command_test.go +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package cmd - -import ( - "io/ioutil" - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestCommandResource(t *testing.T) { - c := &CommandRunner{} - - if assert.NotNil(t, c) { - cmd, err := c.Exec("echo", []string{"test"}) - assert.Equal(t, nil, err, "should execute without error") - assert.Equal(t, "echo test", cmd.Command, "they should be equal") - - stdoutContent, _ := ioutil.ReadAll(cmd.Stdout) - assert.Equal(t, "test\n", string(stdoutContent), "stdout output should be correct") - stderrContent, _ := ioutil.ReadAll(cmd.Stderr) - assert.Equal(t, "", string(stderrContent), "stderr output should be correct") - } -} diff --git a/_motor/providers/os/cmd/sudo.go b/_motor/providers/os/cmd/sudo.go deleted file mode 100644 index b4b23ab00b..0000000000 --- a/_motor/providers/os/cmd/sudo.go +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package cmd - -import ( - "fmt" - "strings" -) - -type Wrapper interface { - Build(cmd string) string -} - -func NewSudo() *Sudo { - return &Sudo{ - user: "", - executable: "sudo", - shell: "", - } -} - -type Sudo struct { - user string - executable string - shell string -} - -func (sudo *Sudo) Build(cmd string) string { - var sb strings.Builder - - sb.WriteString(sudo.executable) - - if len(sudo.user) > 0 { - user := fmt.Sprintf(" -u %s", sudo.user) - sb.WriteString(user) - } - - if len(sudo.shell) > 0 { - cmd = fmt.Sprintf(" %s -c %s", sudo.shell, cmd) - sb.WriteString(cmd) - } else { - sb.WriteString(" ") - sb.WriteString(cmd) - } - - return sb.String() -} diff --git a/_motor/providers/os/cmd/sudo_test.go b/_motor/providers/os/cmd/sudo_test.go deleted file mode 100644 index 47b332b0c3..0000000000 --- a/_motor/providers/os/cmd/sudo_test.go +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package cmd - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestSudo(t *testing.T) { - s := NewSudo() - cmd := s.Build("echo") - assert.Equal(t, "sudo echo", cmd) -} diff --git a/_motor/providers/os/events/README.md b/_motor/providers/os/events/README.md deleted file mode 100644 index 719a8761e2..0000000000 --- a/_motor/providers/os/events/README.md +++ /dev/null @@ -1,34 +0,0 @@ -# Motor Events - -Motor events implement a watcher on file and commands, so that the user of the library has the latest information available. - -It implements that by two different mechanism: - -* polling -* pushing - -By default, we assume polling since it works across all motor transports, while pushing is a special optimization for specific transports. Motor Events abstracts that mechanism away, therefore users do not need to take care about. - - ┌────────────────┐ - │ Watcher │ - └────────────────┘ - │ - ┌───────────────┴──────────────┐ - ▼ ▼ -┌───────────────┐ ┌───────────────┐ -│ eg. iNotify │ │ polling │ -└───────────────┘ └───────────────┘ - │ │ - │ ▼ - │ ┌───────────────┐ - │ │ runnable │ - │ └───────────────┘ - │ │ - │ ▼ - │ ┌───────────────┐ - │ │ diff │ - │ └───────────────┘ - │ │ - │ ┌────────────────┐ │ - └─────▶│ update() │◀─────┘ - └────────────────┘ \ No newline at end of file diff --git a/_motor/providers/os/events/command.go b/_motor/providers/os/events/command.go deleted file mode 100644 index 3150fbdf35..0000000000 --- a/_motor/providers/os/events/command.go +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package events - -import ( - "go.mondoo.com/cnquery/v9/motor/providers" - "go.mondoo.com/cnquery/v9/motor/providers/os" -) - -type CommandObservable struct { - Result *os.Command -} - -func (co *CommandObservable) Type() providers.ObservableType { - return providers.CommandType -} - -func (co *CommandObservable) ID() string { - return co.Result.Command -} - -func NewCommandRunnable(command string) func(p os.OperatingSystemProvider) (providers.Observable, error) { - return func(p os.OperatingSystemProvider) (providers.Observable, error) { - cmd, err := p.RunCommand(command) - res := &CommandObservable{Result: cmd} - return res, err - } -} diff --git a/_motor/providers/os/events/file.go b/_motor/providers/os/events/file.go deleted file mode 100644 index b61b0e1e3f..0000000000 --- a/_motor/providers/os/events/file.go +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package events - -import ( - "github.com/rs/zerolog/log" - "github.com/spf13/afero" - "go.mondoo.com/cnquery/v9/motor/providers" - "go.mondoo.com/cnquery/v9/motor/providers/os" -) - -// FileOp describes a set of file operations. -type FileOp uint32 - -// These are the generalized file operations that can trigger a notification. -const ( - Create FileOp = 1 << iota - Write - Remove - Rename - Chmod - Modify // is this the same of rewrite - Enoent - // TODO: distingush between file content and file metadata modify - Error -) - -// file events handling -type FileObservable struct { - identifier string - FileOp FileOp - File afero.File - Error error -} - -func (fo *FileObservable) Type() providers.ObservableType { - return providers.FileType -} - -func (fo *FileObservable) ID() string { - return fo.identifier -} - -func (fo *FileObservable) Op() FileOp { - return fo.FileOp -} - -func NewFileRunnable(path string) func(m os.OperatingSystemProvider) (providers.Observable, error) { - return func(m os.OperatingSystemProvider) (providers.Observable, error) { - fileop := Modify - file, err := m.FS().Open(path) - // TODO: we may want to distingush further, but it does not make sense to do transport specific error handling here - // therefore we may need common types similar to https://github.com/golang/go/blob/master/src/os/error.go#L22-L23 - if err != nil { - log.Debug().Err(err).Msg("watch on non-existing file") - fileop = Error - } - return &FileObservable{File: file, FileOp: fileop, Error: err}, nil - } -} diff --git a/_motor/providers/os/events/jobmanager.go b/_motor/providers/os/events/jobmanager.go deleted file mode 100644 index a3ddde311e..0000000000 --- a/_motor/providers/os/events/jobmanager.go +++ /dev/null @@ -1,288 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package events - -import ( - "errors" - "sync" - "time" - - "go.mondoo.com/cnquery/v9/motor/providers/os" - - uuid "github.com/gofrs/uuid" - "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/motor/providers" -) - -// the job state -type JobState int32 - -const ( - // pending is the default state - Job_PENDING JobState = 0 - Job_RUNNING JobState = 1 - Job_TERMINATED JobState = 2 -) - -type Job struct { - ID string - - Runnable func(provider os.OperatingSystemProvider) (providers.Observable, error) - Callback []func(providers.Observable) - - State JobState - ScheduledFor time.Time - Interval time.Duration - // -1 means infinity - Repeat int32 - - Metrics struct { - RunAt time.Time - Duration time.Duration - Count int32 - Errors int32 - Successes int32 - } -} - -func (j *Job) sanitize() error { - // ensure we have an id - if len(j.ID) == 0 { - j.ID = uuid.Must(uuid.NewV4()).String() - } - - // verify that the interval is set for the job, otherwise overwrite with the default - if j.Interval == 0 { - j.Interval = time.Duration(60 * time.Second) - } - - // verify that we have the required things for a schedule - if j.ScheduledFor.Before(time.Now().Add(time.Duration(-10 * time.Second))) { - return errors.New("schedule for the past") - } - - if j.Runnable == nil { - return errors.New("no runnable defined") - } - - if len(j.Callback) == 0 { - return errors.New("no callback defined") - } - - return nil -} - -func (j *Job) SetInfinity() { - j.Repeat = -1 -} - -func (j *Job) isPending() bool { - return j.State == Job_PENDING -} - -func NewJobManager(provider os.OperatingSystemProvider) *JobManager { - jm := &JobManager{provider: provider, jobs: &Jobs{}} - jm.jobSelectionMutex = &sync.Mutex{} - jm.quit = make(chan chan struct{}) - jm.Serve() - return jm -} - -type JobManagerMetrics struct { - Jobs int -} - -// Jobs is a map to store all jobs -type Jobs struct{ sync.Map } - -// Store a new job -func (c *Jobs) Store(k string, v *Job) { - c.Map.Store(k, v) -} - -// Load a job -func (c *Jobs) Load(k string) (*Job, bool) { - res, ok := c.Map.Load(k) - if !ok { - return nil, ok - } - return res.(*Job), ok -} - -func (c *Jobs) Range(f func(string, *Job) bool) { - c.Map.Range(func(key interface{}, value interface{}) bool { - return f(key.(string), value.(*Job)) - }) -} - -func (c *Jobs) Len() int { - i := 0 - c.Range(func(k string, j *Job) bool { - i++ - return true - }) - return i -} - -func (c *Jobs) Delete(k string) { - c.Map.Delete(k) -} - -type JobManager struct { - provider os.OperatingSystemProvider - quit chan chan struct{} - jobSelectionMutex *sync.Mutex - jobs *Jobs - jobMetrics JobManagerMetrics -} - -// Schedule stores the job in the run list and sanitize the job before execution -func (jm *JobManager) Schedule(job *Job) (string, error) { - // ensure all defaults are set - err := job.sanitize() - if err != nil { - return "", err - } - - log.Trace().Str("jobid", job.ID).Msg("motor.job> schedule new job") - - // store job, with a mutex - jm.jobs.Store(job.ID, job) - - // return job id - return job.ID, nil -} - -func (jm *JobManager) GetJob(jobid string) (*Job, error) { - job, ok := jm.jobs.Load(jobid) - if !ok { - return nil, errors.New("job " + jobid + " does not exist") - } - return job, nil -} - -func (jm *JobManager) Delete(jobid string) { - log.Trace().Str("jobid", jobid).Msg("motor.job> delete job") - jm.jobs.Delete(jobid) -} - -func (jm *JobManager) Metrics() *JobManagerMetrics { - jm.jobMetrics.Jobs = jm.jobs.Len() - return &jm.jobMetrics -} - -// Serve creates a goroutine and runs jobs in the background -func (jm *JobManager) Serve() { - // create a new channel and starte a new go routine - go func() { - for { - select { - case doneChan := <-jm.quit: - close(doneChan) - return - default: - // fetch job - job, err := jm.nextJob() - - if err == nil { - // run job - jm.Run(job) - - // if repeat is 0 and it is not the last iteration of a reoccuring task, - // we need to remove the job - if job.Repeat == 0 && job.State == Job_TERMINATED { - jm.Delete(job.ID) - } - } - - // TODO: wake up, when new jobs come in - time.Sleep(100 * time.Millisecond) - } - } - }() -} - -func (jm *JobManager) Run(job *Job) { - log.Trace().Str("jobid", job.ID).Msg("motor.job> run job") - job.Metrics.RunAt = time.Now() - - // execute job - observable, err := job.Runnable(jm.provider) - - // update metrics - job.Metrics.Count = job.Metrics.Count + 1 - if err != nil { - job.Metrics.Errors = job.Metrics.Errors + 1 - } else { - job.Metrics.Successes = job.Metrics.Successes + 1 - } - - // determine the next run or delete the job - if job.Repeat != 0 { - job.ScheduledFor = time.Now().Add(job.Interval) - log.Trace().Str("jobid", job.ID).Time("time", job.ScheduledFor).Msg("motor.job> scheduled job for the future") - job.State = Job_PENDING - } else { - log.Trace().Str("jobid", job.ID).Msg("motor.job> last run for this job, yeah") - job.State = Job_TERMINATED - } - - // if we have a positive repeat, we need to decrement - if job.Repeat > 0 { - job.Repeat = job.Repeat - 1 - } - - // calc duration - job.Metrics.Duration = time.Now().Sub(job.Metrics.RunAt) - log.Trace().Str("jobid", job.ID).Msg("motor.job> completed") - - // send observable to all subscribers - // since this call is synchronous in the same go routine, we need to do this as the last step, to ensure - // all job planning is completed before a potential canceling comes in. - log.Trace().Str("jobid", job.ID).Msg("motor.job> call subscriber") - for _, subscriber := range job.Callback { - subscriber(observable) - } -} - -// nextJob looks for the oldest job and does that one first -func (jm *JobManager) nextJob() (*Job, error) { - // use lock to prevent concurrent access on that list - var oldestJob *Job - oldest := time.Date(9999, 1, 1, 0, 0, 0, 0, time.UTC) - - // iterate over list of jobs of pending jobs and find the oldest one - jm.jobSelectionMutex.Lock() - now := time.Now() - - jm.jobs.Range(func(k string, job *Job) bool { - if job.State == Job_PENDING && oldest.After(job.ScheduledFor) && job.ScheduledFor.Before(now) { - oldest = job.ScheduledFor - oldestJob = job - } - return true - }) - - // set the job to running to ensure other parallel go routines do not fetch the same job - if oldestJob != nil { - oldestJob.State = Job_RUNNING - } - jm.jobSelectionMutex.Unlock() - - if oldestJob == nil { - return nil, errors.New("no job available") - } - - // extrats the next run from the nextruns - return oldestJob, nil -} - -// TeadDown deletes all -func (jm *JobManager) TearDown() { - log.Trace().Msg("motor.job> tear down") - // ensures the go routines are canceled - done := make(chan struct{}) - jm.quit <- done - <-done -} diff --git a/_motor/providers/os/events/jobmanager_test.go b/_motor/providers/os/events/jobmanager_test.go deleted file mode 100644 index 795d6c1167..0000000000 --- a/_motor/providers/os/events/jobmanager_test.go +++ /dev/null @@ -1,216 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package events - -import ( - "io/ioutil" - "path/filepath" - "sync" - "testing" - "time" - - "go.mondoo.com/cnquery/v9/motor/providers/os" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/motor/providers" - "go.mondoo.com/cnquery/v9/motor/providers/mock" -) - -func SetupTest() *JobManager { - filepath, _ := filepath.Abs("testdata/watcher_test.toml") - trans, _ := mock.NewFromTomlFile(filepath) - return NewJobManager(trans) -} - -func TeardownTest(jm *JobManager) { - jm.TearDown() -} - -func TestJobCreation(t *testing.T) { - jm := SetupTest() - jobid, err := jm.Schedule(&Job{ - ID: "command", - ScheduledFor: time.Now(), - Interval: time.Duration(10 * time.Second), - Repeat: 5, - Runnable: func(m os.OperatingSystemProvider) (providers.Observable, error) { - cmd, _ := m.RunCommand("hostname") - return &CommandObservable{Result: cmd}, nil - }, - Callback: []func(o providers.Observable){ - func(o providers.Observable) { - // noop - }, - }, - }) - - assert.NotNil(t, jobid, "job is scheduled") - assert.Nil(t, err, "job could be scheduled without any error") - - job, err := jm.GetJob(jobid) - assert.NotNil(t, job, "able to retrieve the job") - assert.Nil(t, err, "job could be retrieved without any error") - - TeardownTest(jm) -} - -func TestJobDeletion(t *testing.T) { - jm := SetupTest() - - assert.Equal(t, 0, jm.Metrics().Jobs, "no job is scheduled") - - // schedule a new job - jobid, err := jm.Schedule(&Job{ - ID: "command", - ScheduledFor: time.Now(), - Interval: time.Duration(10 * time.Second), - Repeat: 5, - Runnable: func(m os.OperatingSystemProvider) (providers.Observable, error) { - cmd, _ := m.RunCommand("hostname") - return &CommandObservable{Result: cmd}, nil - }, - Callback: []func(o providers.Observable){ - func(o providers.Observable) { - // noop - }, - }, - }) - assert.Nil(t, err, "job was scheduled without any error") - - // verify that the job is stored with the ID - job, err := jm.GetJob(jobid) - assert.Nil(t, err, "job was retrieved without any error") - assert.NotNil(t, job, "job could be retrieved") - - // cancel the job - jm.Delete(jobid) - assert.Nil(t, err, "job could be deleted without any error") - - // verify that the job is not there anymore - job, err = jm.GetJob(jobid) - assert.NotNil(t, err, "job could not be retrieved") - assert.Nil(t, job) - - assert.Equal(t, 0, jm.Metrics().Jobs, "no job is scheduled") - TeardownTest(jm) -} - -func TestRejectEmptyJob(t *testing.T) { - jm := SetupTest() - - assert.Equal(t, 0, jm.Metrics().Jobs, "no job is scheduled") - - // schedule a new job - id, err := jm.Schedule(&Job{}) - assert.Equal(t, 0, len(id), "job is not scheduled") - assert.NotNil(t, err, "job schedule returns an error") - - assert.Equal(t, 0, jm.Metrics().Jobs, "no job is scheduled") - TeardownTest(jm) -} - -func TestCommandJob(t *testing.T) { - var wg sync.WaitGroup - jm := SetupTest() - - var res *CommandObservable - wg.Add(1) - _, err := jm.Schedule(&Job{ - ID: "command-abc", - ScheduledFor: time.Now(), - Interval: time.Duration(10 * time.Second), - Repeat: 5, - Runnable: func(m os.OperatingSystemProvider) (providers.Observable, error) { - cmd, _ := m.RunCommand("hostname") - return &CommandObservable{Result: cmd}, nil - }, - Callback: []func(o providers.Observable){ - func(o providers.Observable) { - defer wg.Done() - switch x := o.(type) { - case *CommandObservable: - res = x - } - }, - }, - }) - require.NoError(t, err) - - wg.Wait() - - stdout, err := ioutil.ReadAll(res.Result.Stdout) - assert.Nil(t, err, "could extract stdout") - assert.Equal(t, "mockland.local", string(stdout), "get the expected command output") - TeardownTest(jm) -} - -func TestFileJob(t *testing.T) { - var wg sync.WaitGroup - jm := SetupTest() - path := "/tmp/test" - var res *FileObservable - wg.Add(1) - _, err := jm.Schedule(&Job{ - ID: "file-abc", - ScheduledFor: time.Now(), - Interval: time.Duration(10 * time.Second), - Runnable: func(m os.OperatingSystemProvider) (providers.Observable, error) { - file, _ := m.FS().Open(path) - return &FileObservable{File: file, FileOp: Modify}, nil - }, - Callback: []func(o providers.Observable){ - func(o providers.Observable) { - defer wg.Done() - switch x := o.(type) { - case *FileObservable: - res = x - } - }, - }, - }) - require.NoError(t, err) - wg.Wait() - assert.Equal(t, path, res.File.Name(), "get the expected file") - assert.Equal(t, Modify, res.FileOp, "get the expected file event") - TeardownTest(jm) -} - -func TestScheduleRepeating(t *testing.T) { - var wg sync.WaitGroup - jm := SetupTest() - - var res *CommandObservable - - wg.Add(2) - // one call is executed at the scheduled time - _, err := jm.Schedule(&Job{ - ID: "command-abc", - ScheduledFor: time.Now(), - Repeat: 1, - Interval: time.Duration(1), - Runnable: func(m os.OperatingSystemProvider) (providers.Observable, error) { - cmd, _ := m.RunCommand("hostname") - return &CommandObservable{Result: cmd}, nil - }, - Callback: []func(o providers.Observable){ - func(o providers.Observable) { - defer wg.Done() - - switch x := o.(type) { - case *CommandObservable: - res = x - } - }, - }, - }) - assert.Nil(t, err, "job was scheduled without any error") - wg.Wait() - - // check that the result expects the outcome - stdout, err := ioutil.ReadAll(res.Result.Stdout) - assert.Nil(t, err, "could extract stdout") - assert.Equal(t, "mockland.local", string(stdout), "get the expected command output") - TeardownTest(jm) -} diff --git a/_motor/providers/os/events/testdata/watcher_test.toml b/_motor/providers/os/events/testdata/watcher_test.toml deleted file mode 100644 index 49270dcb79..0000000000 --- a/_motor/providers/os/events/testdata/watcher_test.toml +++ /dev/null @@ -1,9 +0,0 @@ -[commands."hostname"] -stdout = "mockland.local" - -[commands."bla"] -stdout="" -stderr="command not found: bla" - -[files."/tmp/test"] -content = "test" \ No newline at end of file diff --git a/_motor/providers/os/events/watcher.go b/_motor/providers/os/events/watcher.go deleted file mode 100644 index d17935266b..0000000000 --- a/_motor/providers/os/events/watcher.go +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package events - -import ( - "errors" - "sync" - "time" - - "go.mondoo.com/cnquery/v9/motor/providers/os" - - "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/motor/providers" -) - -// Subscriptions is a map to store all watcher subscriptions -type Subscriptions struct{ sync.Map } - -// Store a new subscription -func (c *Subscriptions) Store(k string, v *WatcherSubscription) { - c.Map.Store(k, v) -} - -// Load a subscription -func (c *Subscriptions) Load(k string) (*WatcherSubscription, bool) { - res, ok := c.Map.Load(k) - if !ok { - return nil, ok - } - return res.(*WatcherSubscription), ok -} - -func (c *Subscriptions) Delete(k string) { - c.Map.Delete(k) -} - -func (c *Subscriptions) Range(f func(string, *WatcherSubscription) bool) { - c.Map.Range(func(key interface{}, value interface{}) bool { - return f(key.(string), value.(*WatcherSubscription)) - }) -} - -type Watcher struct { - provider os.OperatingSystemProvider - subscriptions *Subscriptions - jm *JobManager - SleepDuration time.Duration -} - -type WatcherSubscription struct { - typ string - observable func(providers.Observable) -} - -func NewWatcher(provider os.OperatingSystemProvider) *Watcher { - w := &Watcher{provider: provider, subscriptions: &Subscriptions{}} - w.provider = provider - w.jm = NewJobManager(provider) - w.SleepDuration = time.Duration(10 * time.Second) - return w -} - -// the internal unique id is a combination of the typ + id -func (w *Watcher) subscriberId(typ string, id string) string { - sid := typ + id - return sid -} - -func (w *Watcher) Subscribe(typ string, id string, observable func(providers.Observable)) error { - var job *Job - - log.Debug().Str("id", id).Str("typ", typ).Msg("motor.watcher> subscribe") - sid := w.subscriberId(typ, id) - - // throw an error if the id is already registered - _, ok := w.subscriptions.Load(sid) - if ok { - return errors.New("resource " + typ + " with " + id + " is already registered") - } - - // register the right job to gather the information - switch typ { - case "file": - job = &Job{ - ID: sid, - ScheduledFor: time.Now(), - Interval: w.SleepDuration, - Runnable: NewFileRunnable(id), - Repeat: -1, - Callback: []func(o providers.Observable){ - func(o providers.Observable) { - observable(o) - }, - }, - } - case "command": - job = &Job{ - ID: sid, - ScheduledFor: time.Now(), - Interval: w.SleepDuration, - Runnable: NewCommandRunnable(id), - Repeat: -1, - Callback: []func(o providers.Observable){ - func(o providers.Observable) { - observable(o) - }, - }, - } - default: - return errors.New("unknown typ " + typ) - } - - jobid, err := w.jm.Schedule(job) - if err != nil { - return err - } - - // verify that the job id is our given id - if jobid != sid { - w.jm.Delete(jobid) - return errors.New("something is wrong, the job ids are not identical") - } - - // store the subscription - w.subscriptions.Store(sid, &WatcherSubscription{ - typ: typ, - observable: observable, - }) - - return nil -} - -func (w *Watcher) Unsubscribe(typ string, id string) error { - log.Debug().Str("id", id).Str("typ", typ).Msg("motor.watcher> unsubscribe") - // gather internal id - sid := w.subscriberId(typ, id) - return w.unsubscribe(sid) -} - -func (w *Watcher) unsubscribe(sid string) error { - // stop jobs in flight - w.jm.Delete(sid) - - // remove the subscription and un-register the jobs - w.subscriptions.Delete(sid) - return nil -} - -func (w *Watcher) TearDown() error { - log.Debug().Msg("motor.watcher> teardown") - // remove all subscriptions - w.subscriptions.Range(func(k string, v *WatcherSubscription) bool { - if err := w.unsubscribe(k); err != nil { - log.Warn().Str("sub", k).Err(err).Msg("motor.watch> teardown unsubscribe failed") - } - return true - }) - - // tear down job manager, all subscriptions should be stopped already - w.jm.TearDown() - - return nil -} diff --git a/_motor/providers/os/events/watcher_test.go b/_motor/providers/os/events/watcher_test.go deleted file mode 100644 index f7e04e1ae3..0000000000 --- a/_motor/providers/os/events/watcher_test.go +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package events - -import ( - "io/ioutil" - "path/filepath" - "sync" - "testing" - "time" - - "go.mondoo.com/cnquery/v9/motor/providers" - "go.mondoo.com/cnquery/v9/motor/providers/mock" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -type WatcherTester struct { - mock providers.Instance - watcher *Watcher -} - -func SetupWatcherTest() *WatcherTester { - filepath, _ := filepath.Abs("testdata/watcher_test.toml") - trans, _ := mock.NewFromTomlFile(filepath) - return &WatcherTester{watcher: NewWatcher(trans), mock: trans} -} - -func TeardownWatcherTest(wt *WatcherTester) { - wt.watcher.TearDown() -} - -func TestCommandSubscribe(t *testing.T) { - var wg sync.WaitGroup - wt := SetupWatcherTest() - w := wt.watcher - - var res *CommandObservable - wg.Add(1) - w.Subscribe("command", "hostname", func(co providers.Observable) { - switch x := co.(type) { - case *CommandObservable: - defer wg.Done() - res = x - default: - } - }) - wg.Wait() - - stdout, err := ioutil.ReadAll(res.Result.Stdout) - assert.Nil(t, err, "could extract stdout") - assert.Equal(t, "mockland.local", string(stdout), "get the expected command output") - TeardownWatcherTest(wt) -} - -func TestFileSubscribe(t *testing.T) { - var wg sync.WaitGroup - wt := SetupWatcherTest() - w := wt.watcher - - var res *FileObservable - - wg.Add(1) - err := w.Subscribe("file", "/tmp/test", func(fo providers.Observable) { - switch x := fo.(type) { - case *FileObservable: - defer wg.Done() - res = x - default: - } - }) - require.NoError(t, err) - wg.Wait() - content, err := ioutil.ReadAll(res.File) - assert.Nil(t, err, "file content was returned without any error") - assert.Equal(t, "test", string(content), "get the expected command output") - - TeardownWatcherTest(wt) -} - -func TestFileChangeEvents(t *testing.T) { - var waitInitialRead sync.WaitGroup - var waitFileUpdate sync.WaitGroup - var waitSecondRead sync.WaitGroup - - wt := SetupWatcherTest() - w := wt.watcher - // wait 500ms - w.SleepDuration = time.Duration(2 * time.Millisecond) - - res := []string{} - readCount := 0 - waitInitialRead.Add(1) - waitFileUpdate.Add(1) - waitSecondRead.Add(1) - - err := w.Subscribe("file", "/tmp/test", func(fo providers.Observable) { - switch x := fo.(type) { - case *FileObservable: - if readCount == 0 { - defer waitInitialRead.Done() - } else if readCount == 1 { - waitFileUpdate.Wait() - defer waitSecondRead.Done() - } else { - return - } - content, err := ioutil.ReadAll(x.File) - if err == nil { - res = append(res, string(content)) - } - readCount++ - default: - } - }) - require.NoError(t, err) - - waitInitialRead.Wait() - - // change file content - mt := wt.mock.(*mock.Provider) - mt.Fs.Files["/tmp/test"].Content = "newtest" - waitFileUpdate.Done() - - waitSecondRead.Wait() - - assert.Equal(t, []string{"test", "newtest"}, res, "detect file change") - - TeardownWatcherTest(wt) -} diff --git a/_motor/providers/os/os.go b/_motor/providers/os/os.go deleted file mode 100644 index fbac6d5521..0000000000 --- a/_motor/providers/os/os.go +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package os - -import ( - "io" - "io/fs" - "os" - "regexp" - "time" - - "go.mondoo.com/cnquery/v9/motor/providers" - - "github.com/spf13/afero" -) - -type OperatingSystemProvider interface { - providers.Instance - // RunCommand executes a command on the target system - RunCommand(command string) (*Command, error) - // FileInfo returns file permissions and ownership - FileInfo(path string) (FileInfoDetails, error) - // FS provides access to the file system of the target system - FS() afero.Fs -} - -type CommandRunner interface { - RunCommand(command string) (*Command, error) -} - -type PerfStats struct { - Start time.Time `json:"start"` - Duration time.Duration `json:"duration"` -} - -type Command struct { - Command string - Stats PerfStats - Stdout io.ReadWriter - Stderr io.ReadWriter - ExitStatus int -} - -type FileInfo struct { - FName string - FSize int64 - FIsDir bool - FModTime time.Time - FMode os.FileMode - Uid int64 - Gid int64 -} - -func (f *FileInfo) Name() string { - return f.FName -} - -func (f *FileInfo) Size() int64 { - return f.FSize -} - -func (f *FileInfo) Mode() os.FileMode { - return f.FMode -} - -func (f *FileInfo) ModTime() time.Time { - return f.FModTime -} - -func (f *FileInfo) IsDir() bool { - return f.FIsDir -} - -func (f *FileInfo) Sys() interface{} { - return f -} - -type FileModeDetails struct { - os.FileMode -} - -func (mode FileModeDetails) UserReadable() bool { - return uint32(mode.FileMode)&0o0400 != 0 -} - -func (mode FileModeDetails) UserWriteable() bool { - return uint32(mode.FileMode)&0o0200 != 0 -} - -func (mode FileModeDetails) UserExecutable() bool { - return uint32(mode.FileMode)&0o0100 != 0 -} - -func (mode FileModeDetails) GroupReadable() bool { - return uint32(mode.FileMode)&0o0040 != 0 -} - -func (mode FileModeDetails) GroupWriteable() bool { - return uint32(mode.FileMode)&0o0020 != 0 -} - -func (mode FileModeDetails) GroupExecutable() bool { - return uint32(mode.FileMode)&0o0010 != 0 -} - -func (mode FileModeDetails) OtherReadable() bool { - return uint32(mode.FileMode)&0o0004 != 0 -} - -func (mode FileModeDetails) OtherWriteable() bool { - return uint32(mode.FileMode)&0o0002 != 0 -} - -func (mode FileModeDetails) OtherExecutable() bool { - return uint32(mode.FileMode)&0o0001 != 0 -} - -func (mode FileModeDetails) Suid() bool { - return mode.FileMode&fs.ModeSetuid != 0 -} - -func (mode FileModeDetails) Sgid() bool { - return mode.FileMode&fs.ModeSetgid != 0 -} - -func (mode FileModeDetails) Sticky() bool { - return mode.FileMode&fs.ModeSticky != 0 -} - -func (mode FileModeDetails) UnixMode() uint32 { - m := mode.FileMode & 0o777 - - if mode.IsDir() { - } - - if (mode.FileMode & fs.ModeSetuid) != 0 { - m |= 0o4000 - } - - if (mode.FileMode & fs.ModeSetgid) != 0 { - m |= 0o2000 - } - - if (mode.FileMode & fs.ModeSticky) != 0 { - m |= 0o1000 - } - - return uint32(m) -} - -type FileInfoDetails struct { - Size int64 - Mode FileModeDetails - Uid int64 - Gid int64 -} - -type FileSearch interface { - Find(from string, r *regexp.Regexp, typ string) ([]string, error) -} diff --git a/_motor/providers/provider.go b/_motor/providers/provider.go deleted file mode 100644 index 876794ccd0..0000000000 --- a/_motor/providers/provider.go +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package providers - -type PlatformIdDetector string - -const ( - HostnameDetector PlatformIdDetector = "hostname" - MachineIdDetector PlatformIdDetector = "machine-id" - CloudDetector PlatformIdDetector = "cloud-detect" - AWSEc2Detector PlatformIdDetector = "aws-ec2" - AWSEcsDetector PlatformIdDetector = "aws-ecs" - SshHostKey PlatformIdDetector = "ssh-host-key" - // TransportPlatformIdentifierDetector is a detector that gets the platform id - // from the transports Identifier() method. This requires the - // TransportIdentifier interface be implemented for the transport - TransportPlatformIdentifierDetector PlatformIdDetector = "transport-platform-id" -) - -func AvailablePlatformIdDetector() []string { - return []string{HostnameDetector.String(), MachineIdDetector.String(), AWSEc2Detector.String(), CloudDetector.String(), SshHostKey.String(), TransportPlatformIdentifierDetector.String()} -} - -var platformIdAliases = map[string]PlatformIdDetector{ - "awsec2": AWSEc2Detector, - "machineid": MachineIdDetector, -} - -func (id PlatformIdDetector) String() string { - return string(id) -} - -func ToPlatformIdDetectors(idDetectors []string) []PlatformIdDetector { - idDetectorsCopy := make([]PlatformIdDetector, len(idDetectors)) - for i, v := range idDetectors { - if detector, ok := platformIdAliases[v]; ok { - idDetectorsCopy[i] = detector - } else { - idDetectorsCopy[i] = PlatformIdDetector(v) - } - } - return idDetectorsCopy -} - -type Instance interface { - PlatformIdDetectors() []PlatformIdDetector - - // returns if this is a static asset that does not allow run command - Capabilities() Capabilities - - Runtime() string - - // Close closes the transport - Close() -} - -type PlatformIdentifier interface { - Identifier() (string, error) -} diff --git a/_motor/providers/provider_test.go b/_motor/providers/provider_test.go deleted file mode 100644 index b5d06e74d0..0000000000 --- a/_motor/providers/provider_test.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package providers - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestToPlatformIdDetectors(t *testing.T) { - t.Run("aliases", func(t *testing.T) { - assert.ElementsMatch( - t, - []PlatformIdDetector{AWSEc2Detector, HostnameDetector}, - ToPlatformIdDetectors([]string{"awsec2", "hostname"})) - - assert.ElementsMatch( - t, - []PlatformIdDetector{AWSEc2Detector, HostnameDetector}, - ToPlatformIdDetectors([]string{"aws-ec2", "hostname"})) - }) -} diff --git a/_motor/providers/resolver/connect.go b/_motor/providers/resolver/connect.go deleted file mode 100644 index 5d08a1c291..0000000000 --- a/_motor/providers/resolver/connect.go +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package resolver - -import ( - "context" - - "github.com/cockroachdb/errors" - "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/motor" - v1 "go.mondoo.com/cnquery/v9/motor/inventory/v1" - "go.mondoo.com/cnquery/v9/motor/vault" -) - -func EstablishConnection(ctx context.Context, tc *v1.Config, credsResolver vault.Resolver, insecure bool, record bool) (*motor.Motor, error) { - log.Debug().Str("connection", tc.ToUrl()).Bool("insecure", insecure).Msg("establish connection to asset") - // overwrite connection specific insecure with global insecure - if insecure { - tc.Insecure = insecure - } - - if record { - tc.Record = true - } - - return NewMotorConnection(ctx, tc, credsResolver) -} - -func OpenAssetConnection(ctx context.Context, assetInfo *v1.Asset, credsResolver vault.Resolver, record bool) (*motor.Motor, error) { - if assetInfo == nil { - return nil, errors.New("asset is not defined") - } - - // connect to the platform - if len(assetInfo.Connections) == 0 { - return nil, errors.New("no connection provided for asset " + assetInfo.Name) - } - - // TODO: we may want to allow multiple connection trials later - pCfg := assetInfo.Connections[0] - - // use connection host as default - if assetInfo.Name == "" { - assetInfo.Name = pCfg.Host - } - - // some transports have their own kind/runtime information already - // NOTE: going forward we may want to enforce that assets have at least kind and runtime information - if assetInfo.Platform != nil { - pCfg.Runtime = assetInfo.Platform.Runtime - if pCfg.Options == nil { - pCfg.Options = map[string]string{} - } - // set platform name override to ensure we get the correct platform at policy execution time - pCfg.Options["platform-override"] = assetInfo.Platform.Name - } - - // parse reference id and restore options - if len(assetInfo.PlatformIds) > 0 { - pCfg.PlatformId = assetInfo.PlatformIds[0] - } - - m, err := EstablishConnection(ctx, pCfg, credsResolver, pCfg.Insecure, record) - if err != nil { - return nil, err - } - - m.SetAsset(assetInfo) - - return m, nil -} - -func OpenAssetConnections(ctx context.Context, assetInfo *v1.Asset, credsResolver vault.Resolver, record bool) ([]*motor.Motor, error) { - if assetInfo == nil { - return nil, errors.New("asset is not defined") - } - - // connect to the platform - if len(assetInfo.Connections) == 0 { - return nil, errors.New("no connection provided for asset " + assetInfo.Name) - } - - // TODO: we may want to allow multiple connection trials later - connections := []*motor.Motor{} - for ci := range assetInfo.Connections { - pCfg := assetInfo.Connections[ci] - - // use connection host as default - if assetInfo.Name == "" { - assetInfo.Name = pCfg.Host - } - - // some transports have their own kind/runtime information already - // NOTE: going forward we may want to enforce that assets have at least kind and runtime information - if assetInfo.Platform != nil { - pCfg.Runtime = assetInfo.Platform.Runtime - if pCfg.Options == nil { - pCfg.Options = map[string]string{} - } - // set platform name override to ensure we get the correct platform at policy execution time - pCfg.Options["platform-override"] = assetInfo.Platform.Name - } - - // parse reference id and restore options - if len(assetInfo.PlatformIds) > 0 { - pCfg.PlatformId = assetInfo.PlatformIds[0] - } - - m, err := EstablishConnection(ctx, pCfg, credsResolver, pCfg.Insecure, record) - if err != nil { - return nil, err - } - - m.SetAsset(assetInfo) - connections = append(connections, m) - } - return connections, nil -} diff --git a/_motor/providers/resolver/resolver.go b/_motor/providers/resolver/resolver.go deleted file mode 100644 index 41347ad81d..0000000000 --- a/_motor/providers/resolver/resolver.go +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package resolver - -import ( - "context" - "fmt" - - "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/motor" - v1 "go.mondoo.com/cnquery/v9/motor/inventory/v1" - "go.mondoo.com/cnquery/v9/motor/vault" - "google.golang.org/protobuf/proto" -) - -var providerDevelopmentStatus = map[string]string{ - "aws-ec2-ebs": "experimental", -} - -func warnIncompleteFeature(backend string) { - if providerDevelopmentStatus[backend] != "" { - log.Warn().Str("feature", backend).Str("status", providerDevelopmentStatus[backend]).Msg("WARNING: you are using an early access feature") - } -} - -// NewMotorConnection establishes a motor connection by using the provided provider configuration -// By default, it uses the id detector mechanisms provided by the provider. User can overwrite that -// behaviour by optionally passing id detector identifier -func NewMotorConnection(ctx context.Context, tc *v1.Config, credsResolver vault.Resolver) (*motor.Motor, error) { - log.Debug().Msg("establish motor connection") - var m *motor.Motor - - warnIncompleteFeature(tc.Type) - - // we clone the config here, and replace all credential references with the real references - // the clone is important so that credentials are not leaked outside of the function - resolvedConfig := proto.Clone(tc).(*v1.Config) - // cloning a proto object with an empty map will result in the copied map being nil. make sure to initialize it - // to not break providers that check for nil. - if resolvedConfig.Options == nil { - resolvedConfig.Options = map[string]string{} - } - resolvedCredentials := []*vault.Credential{} - for i := range resolvedConfig.Credentials { - credential := resolvedConfig.Credentials[i] - if credential.SecretId != "" && credsResolver != nil { - resolvedCredential, err := credsResolver.GetCredential(credential) - if err != nil { - log.Debug().Str("secret-id", credential.SecretId).Err(err).Msg("could not fetch secret for motor connection") - return nil, err - } - credential = resolvedCredential - } - resolvedCredentials = append(resolvedCredentials, credential) - } - resolvedConfig.Credentials = resolvedCredentials - - // establish connection - switch resolvedConfig.Type { - default: - return nil, fmt.Errorf("connection> unsupported backend '%s'", resolvedConfig.Type) - } - - return m, nil -} diff --git a/_motor/providers/runtime.go b/_motor/providers/runtime.go deleted file mode 100644 index 2cec827153..0000000000 --- a/_motor/providers/runtime.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package providers - -const ( - RUNTIME_AWS = "aws" // api - RUNTIME_AWS_EC2 = "aws-ec2-instance" // ec2 instances - RUNTIME_AWS_SSM_MANAGED = "aws-ssm-managed" - RUNTIME_AWS_ECR = "aws-ecr" - RUNTIME_AWS_ECS = "aws-ecs" - RUNTIME_GCP = "gcp" // api - RUNTIME_GCP_COMPUTE = "gcp-vm" - RUNTIME_GCP_GCR = "gcp-gcr" - RUNTIME_GOOGLE_WORKSPACE = "google-workspace" - RUNTIME_DOCKER_CONTAINER = "docker-container" - RUNTIME_DOCKER_IMAGE = "docker-image" - RUNTIME_DOCKER_REGISTRY = "docker-registry" - RUNTIME_KUBERNETES_CLUSTER = "k8s-cluster" - RUNTIME_KUBERNETES_MANIFEST = "k8s-manifest" - RUNTIME_KUBERNETES_ADMISSION = "k8s-admission" - RUNTIME_AZ = "azure" // api - RUNTIME_AZ_COMPUTE = "azure-vm" - RUNTIME_VSPHERE = "vsphere" // api - RUNTIME_VSPHERE_HOSTS = "vsphere-host" // esxi instances - RUNTIME_VSPHERE_VM = "vsphere-vm" // vms running on esxi - RUNTIME_MICROSOFT_GRAPH = "ms-graph" // api - RUNTIME_EQUINIX_METAL = "equinix-metal" // api - RUNTIME_GITHUB = "github" // api - RUNTIME_AWS_EC2_EBS = "aws-ec2-ebs" - RUNTIME_GITLAB = "gitlab" // api - RUNTIME_TERRAFORM = "terraform" - RUNTIME_OKTA = "okta" - RUNTIME_SLACK = "slack" - RUNTIME_OCI = "oci" - RUNTIME_OPCUA = "opc-ua" -) diff --git a/_motor/providers/ssh/command.go b/_motor/providers/ssh/command.go deleted file mode 100644 index 42adb799ef..0000000000 --- a/_motor/providers/ssh/command.go +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package ssh - -import ( - "bytes" - "errors" - "time" - - "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/motor/providers/os" - "golang.org/x/crypto/ssh" -) - -type Command struct { - os.Command - SSHProvider *Provider -} - -func (c *Command) Exec(command string) (*os.Command, error) { - c.Command.Command = command - c.Command.Stats.Duration = time.Since(c.Command.Stats.Start) - - stdoutBuffer := &bytes.Buffer{} - stderrBuffer := &bytes.Buffer{} - - c.Command.Stdout = stdoutBuffer - c.Command.Stderr = stderrBuffer - - if c.SSHProvider.SSHClient == nil { - return nil, errors.New("ssh session not established") - } - - session, err := c.SSHProvider.SSHClient.NewSession() - if err != nil { - log.Debug().Msg("could not open new session, try to re-establish connection") - err = c.SSHProvider.Reconnect() - if err != nil { - return nil, err - } - - session, err = c.SSHProvider.SSHClient.NewSession() - if err != nil { - return nil, err - } - } - defer session.Close() - - // start ssh call - session.Stdout = stdoutBuffer - session.Stderr = stderrBuffer - err = session.Run(c.Command.Command) - c.Command.Stats.Duration = time.Since(c.Command.Stats.Start) - - // command completed successfully, great :-) - if err == nil { - return &c.Command, nil - } - - // if the program failed, we do not return err but its exit code - var e *ssh.ExitError - match := errors.As(err, &e) - if match { - c.Command.ExitStatus = e.ExitStatus() - return &c.Command, nil - } - - // all other errors are real errors and not expected - return &c.Command, err -} diff --git a/_motor/providers/ssh/config.go b/_motor/providers/ssh/config.go deleted file mode 100644 index 33a5dd4a88..0000000000 --- a/_motor/providers/ssh/config.go +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package ssh - -import ( - "os" - "path/filepath" - "strconv" - "strings" - - "github.com/kevinburke/ssh_config" - homedir "github.com/mitchellh/go-homedir" - "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/motor/providers" - "go.mondoo.com/cnquery/v9/motor/vault" -) - -func ReadSSHConfig(cc *providers.Config) *providers.Config { - host := cc.Host - - home, err := homedir.Dir() - if err != nil { - log.Debug().Err(err).Msg("ssh> failed to determine user home directory") - return cc - } - - sshUserConfigPath := filepath.Join(home, ".ssh", "config") - f, err := os.Open(sshUserConfigPath) - if err != nil { - log.Debug().Err(err).Str("file", sshUserConfigPath).Msg("ssh> could not read ssh config") - return cc - } - - cfg, err := ssh_config.Decode(f) - if err != nil { - log.Debug().Err(err).Str("file", sshUserConfigPath).Msg("could not parse ssh config") - return cc - } - - // optional step, tries to parse the ssh config to see if additional information - // is already available - hostname, err := cfg.Get(host, "HostName") - if err == nil && len(hostname) > 0 { - cc.Host = hostname - } - - if len(cc.Credentials) == 0 || (len(cc.Credentials) == 1 && cc.Credentials[0].Type == vault.CredentialType_password && len(cc.Credentials[0].Secret) == 0) { - user, _ := cfg.Get(host, "User") - port, err := cfg.Get(host, "Port") - if err == nil { - portNum, err := strconv.Atoi(port) - if err != nil { - log.Debug().Err(err).Str("file", sshUserConfigPath).Str("port", port).Msg("could not parse ssh port") - } else { - cc.Port = int32(portNum) - } - } - - entry, err := cfg.Get(host, "IdentityFile") - - // TODO: the ssh_config uses os/home but instead should be use go-homedir, could become a compile issue - // TODO: the problem is that the lib returns defaults and we cannot properly distingush - if err == nil && ssh_config.Default("IdentityFile") != entry { - // commonly ssh config included paths like ~ - expandedPath, err := homedir.Expand(entry) - if err == nil { - log.Debug().Str("key", expandedPath).Str("host", host).Msg("ssh> read ssh identity key from ssh config") - // NOTE: we ignore the error here for now but this should probably been caught earlier anyway - credential, _ := vault.NewPrivateKeyCredentialFromPath(user, expandedPath, "") - // apply the option manually - if credential != nil { - cc.AddCredential(credential) - } - } - } - } - - // handle disable of strict hostkey checking: - // Host * - // StrictHostKeyChecking no - entry, err := cfg.Get(host, "StrictHostKeyChecking") - if err == nil && strings.ToLower(entry) == "no" { - cc.Insecure = true - } - return cc -} - -func VerifyConfig(pCfg *providers.Config) error { - if pCfg.Backend != providers.ProviderType_SSH { - return providers.ErrProviderTypeDoesNotMatch - } - - return nil -} diff --git a/_motor/providers/ssh/defaults.go b/_motor/providers/ssh/defaults.go deleted file mode 100644 index bf92a49291..0000000000 --- a/_motor/providers/ssh/defaults.go +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package ssh - -import ( - "os" - "os/user" - "path/filepath" - - "github.com/mitchellh/go-homedir" - "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/motor/providers" - "go.mondoo.com/cnquery/v9/motor/vault" -) - -// ApplyDefaults applies all ssh defaults to the transport. It specifically set -// - default port -// - loads ssh keys from known locations -// - configures ssh agent authentication -func ApplyDefaults(cc *providers.Config, username string, identityFile string, password string) error { - // set default port for ssh - if cc.Port == 0 { - cc.Port = 22 - } - - // fallback to current user if no username was provided - if username == "" { - usr, err := user.Current() - if err != nil { - log.Warn().Err(err).Msg("could not fallback do current user") - } - username = usr.Username - } - - // handle credentials cases: - // if identity file is provided but no password -> private key - // if identity file is provided with password -> encrypted private key - // if no identity file is provided but a password -> password - if identityFile != "" { - credential, err := vault.NewPrivateKeyCredentialFromPath(username, identityFile, password) - if err != nil { - return err - } - cc.AddCredential(credential) - } else if password != "" { - credential := vault.NewPasswordCredential(username, password) - cc.AddCredential(credential) - } - - // add default identities - ApplyDefaultIdentities(cc, username, password) - - return nil -} - -// ApplyDefaultIdentities loads user's ssh identifies from ~/.ssh/ -func ApplyDefaultIdentities(cc *providers.Config, username string, password string) *providers.Config { - // ssh config overwrite like: IdentityFile ~/.foo/identity is done in ReadSSHConfig() - // fallback to default paths ~/.ssh/id_rsa and ~/.ssh/id_dsa if they exist - home, err := homedir.Dir() - if err == nil { - files := []string{ - filepath.Join(home, ".ssh", "id_rsa"), - filepath.Join(home, ".ssh", "id_dsa"), - filepath.Join(home, ".ssh", "id_ed25519"), - filepath.Join(home, ".ssh", "id_ecdsa"), - // specific handling for google compute engine, see https://cloud.google.com/compute/docs/instances/connecting-to-instance - filepath.Join(home, ".ssh", "google_compute_engine"), - } - - // filter keys by existence - for i := range files { - f := files[i] - _, err := os.Stat(f) - if err == nil { - log.Debug().Str("key", f).Msg("load ssh identity") - credential, err := vault.NewPrivateKeyCredentialFromPath(username, f, password) - if err != nil { - log.Warn().Err(err).Str("key", f).Msg("could not load ssh identity") - } else { - cc.AddCredential(credential) - } - } - } - } - - // enable ssh-agent authentication as default - cc.AddCredential(&vault.Credential{Type: vault.CredentialType_ssh_agent, User: username}) - - return cc -} diff --git a/_motor/providers/ssh/hostkey.go b/_motor/providers/ssh/hostkey.go deleted file mode 100644 index 1d12f0a17d..0000000000 --- a/_motor/providers/ssh/hostkey.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package ssh - -import ( - "os" - "path/filepath" - - "github.com/mitchellh/go-homedir" - "github.com/rs/zerolog/log" - "golang.org/x/crypto/ssh" - "golang.org/x/crypto/ssh/knownhosts" -) - -func KnownHostsCallback() (ssh.HostKeyCallback, error) { - home, err := homedir.Dir() - if err != nil { - log.Debug().Err(err).Msg("Failed to determine user home directory") - return nil, err - } - - // load default host keys - files := []string{ - filepath.Join(home, ".ssh", "known_hosts"), - // see https://cloud.google.com/compute/docs/instances/connecting-to-instance - // NOTE: content in that file is structured by compute.instanceid key - // TODO: we need to keep the instance information during the resolve step - filepath.Join(home, ".ssh", "google_compute_known_hosts"), - } - - // filter all files that do not exits - existentKnownHosts := []string{} - for i := range files { - _, err := os.Stat(files[i]) - if err == nil { - log.Debug().Str("file", files[i]).Msg("load ssh known_hosts file") - existentKnownHosts = append(existentKnownHosts, files[i]) - } - } - - return knownhosts.New(existentKnownHosts...) -} diff --git a/_motor/providers/ssh/provider.go b/_motor/providers/ssh/provider.go deleted file mode 100644 index db0e0cbd0e..0000000000 --- a/_motor/providers/ssh/provider.go +++ /dev/null @@ -1,344 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package ssh - -import ( - "fmt" - "io" - "net" - "os" - "strings" - - "github.com/cockroachdb/errors" - rawsftp "github.com/pkg/sftp" - "github.com/rs/zerolog/log" - "github.com/spf13/afero" - "go.mondoo.com/cnquery/v9/motor/providers" - os_provider "go.mondoo.com/cnquery/v9/motor/providers/os" - "go.mondoo.com/cnquery/v9/motor/providers/os/cmd" - "go.mondoo.com/cnquery/v9/motor/providers/ssh/cat" - "go.mondoo.com/cnquery/v9/motor/providers/ssh/scp" - "go.mondoo.com/cnquery/v9/motor/providers/ssh/sftp" - "golang.org/x/crypto/ssh" -) - -var ( - _ providers.Instance = (*Provider)(nil) - _ providers.PlatformIdentifier = (*Provider)(nil) - _ os_provider.OperatingSystemProvider = (*Provider)(nil) -) - -func New(pCfg *providers.Config) (*Provider, error) { - host := pCfg.GetHost() - // ipv6 addresses w/o the surrounding [] will eventually error - // so check whether we have an ipv6 address by parsing it (the - // parsing will fail if the string DOES have the []s) and adding - // the []s - ip := net.ParseIP(host) - if ip != nil && ip.To4() == nil { - pCfg.Host = fmt.Sprintf("[%s]", host) - } - - pCfg = ReadSSHConfig(pCfg) - - // ensure all required configs are set - err := VerifyConfig(pCfg) - if err != nil { - return nil, err - } - - activateScp := false - if os.Getenv("MONDOO_SSH_SCP") == "on" || pCfg.Options["ssh_scp"] == "on" { - activateScp = true - } - - if pCfg.Insecure { - log.Debug().Msg("user allowed insecure ssh connection") - } - - t := &Provider{ - ConnectionConfig: pCfg, - UseScpFilesystem: activateScp, - kind: pCfg.Kind, - runtime: pCfg.Runtime, - } - err = t.Connect() - if err != nil { - return nil, err - } - - var s cmd.Wrapper - // check uid of user and disable sudo if uid is 0 - if pCfg.Sudo != nil && pCfg.Sudo.Active { - // the id command may not be available, eg. if ssh is used with windows - out, _ := t.RunCommand("id -u") - stdout, _ := io.ReadAll(out.Stdout) - // just check for the explicit positive case, otherwise just activate sudo - // we check sudo in VerifyConnection - if string(stdout) != "0" { - // configure sudo - log.Debug().Msg("activated sudo for ssh connection") - s = cmd.NewSudo() - } - } - t.Sudo = s - - // verify connection - vErr := t.VerifyConnection() - // NOTE: for now we do not enforce connection verification to ensure we cover edge-cases - // TODO: in following minor version bumps, we want to enforce this behavior to ensure proper scans - if vErr != nil { - log.Warn().Err(vErr).Send() - } - - return t, nil -} - -type Provider struct { - ConnectionConfig *providers.Config - SSHClient *ssh.Client - fs afero.Fs - UseScpFilesystem bool - HostKey ssh.PublicKey - Sudo cmd.Wrapper - kind providers.Kind - runtime string - serverVersion string -} - -func (p *Provider) Connect() error { - cc := p.ConnectionConfig - - // we always want to ensure we use the default port if nothing was specified - if cc.Port == 0 { - cc.Port = 22 - } - - // load known hosts and track the fingerprint of the ssh server for later identification - knownHostsCallback, err := KnownHostsCallback() - if err != nil { - return errors.Wrap(err, "could not read hostkey file") - } - - var hostkey ssh.PublicKey - hostkeyCallback := func(hostname string, remote net.Addr, key ssh.PublicKey) error { - // store the hostkey for later identification - hostkey = key - - // ignore hostkey check if the user provided an insecure flag - if cc.Insecure { - return nil - } - - // knownhost.New returns a ssh.CertChecker which does not work with all ssh.HostKey types - // especially the newer edcsa keys (ssh.curve25519sha256) are not well supported. - // https://github.com/golang/crypto/blob/master/ssh/knownhosts/knownhosts.go#L417-L436 - // creates the CertChecker which requires an instance of Certificate - // https://github.com/golang/crypto/blob/master/ssh/certs.go#L326-L348 - // https://github.com/golang/crypto/blob/master/ssh/keys.go#L271-L283 - // therefore it is best to skip the checking for now since it forces users to set the insecure flag otherwise - // TODO: implement custom host-key checking for normal public keys as well - _, ok := key.(*ssh.Certificate) - if !ok { - log.Debug().Msg("skip hostkey check the hostkey since the algo is not supported yet") - return nil - } - - err := knownHostsCallback(hostname, remote, key) - if err != nil { - log.Debug().Err(err).Str("hostname", hostname).Str("ip", remote.String()).Msg("check known host") - } - return err - } - - // establish connection - conn, _, err := establishClientConnection(cc, hostkeyCallback) - if err != nil { - log.Debug().Err(err).Str("provider", "ssh").Str("host", cc.Host).Int32("port", cc.Port).Bool("insecure", cc.Insecure).Msg("could not establish ssh session") - if strings.ContainsAny(cc.Host, "[]") { - log.Info().Str("host", cc.Host).Int32("port", cc.Port).Msg("ensure proper []s when combining IPv6 with port numbers") - } - return err - } - p.SSHClient = conn - p.HostKey = hostkey - p.serverVersion = string(conn.ServerVersion()) - log.Debug().Str("provider", "ssh").Str("host", cc.Host).Int32("port", cc.Port).Str("server", p.serverVersion).Msg("ssh session established") - return nil -} - -func (p *Provider) VerifyConnection() error { - var out *os_provider.Command - var err error - - if p.Sudo != nil { - // Wrap sudo command, to see proper error messages. We set /dev/null to disable stdin - command := "sh -c '" + p.Sudo.Build("echo 'hi'") + " < /dev/null'" - out, err = p.runRawCommand(command) - } else { - out, err = p.runRawCommand("echo 'hi'") - if err != nil { - return err - } - } - - if out.ExitStatus == 0 { - return nil - } - - stderr, _ := io.ReadAll(out.Stderr) - errMsg := string(stderr) - - // sample messages are: - // sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper - // sudo: a password is required - switch { - case strings.Contains(errMsg, "not found"): - return errors.New("sudo command is missing on target") - case strings.Contains(errMsg, "a password is required"): - return errors.New("could not establish connection: sudo password is not supported yet, configure password-less sudo") - default: - return errors.New("could not establish connection: " + errMsg) - } -} - -// Reconnect closes a possible current connection and re-establishes a new connection -func (p *Provider) Reconnect() error { - p.Close() - return p.Connect() -} - -func (p *Provider) runRawCommand(command string) (*os_provider.Command, error) { - log.Debug().Str("command", command).Str("provider", "ssh").Msg("run command") - c := &Command{SSHProvider: p} - return c.Exec(command) -} - -func (p *Provider) RunCommand(command string) (*os_provider.Command, error) { - if p.Sudo != nil { - command = p.Sudo.Build(command) - } - return p.runRawCommand(command) -} - -func (p *Provider) FS() afero.Fs { - // if we cached an instance already, return it - if p.fs != nil { - return p.fs - } - - // log the used ssh filesystem backend - defer func() { - log.Debug().Str("file-transfer", p.fs.Name()).Msg("initialized ssh filesystem") - }() - - //// detect cisco network gear, they returns something like SSH-2.0-Cisco-1.25 - //// NOTE: we need to understand why this happens - //if strings.Contains(strings.ToLower(t.serverVersion), "cisco") { - // log.Debug().Msg("detected cisco device, deactivate file system support") - // t.fs = &fsutil.NoFs{} - // return t.fs - //} - - // if any privilege elevation is used, we have no other chance as to use command-based file transfer - if p.Sudo != nil { - p.fs = cat.New(p) - return p.fs - } - - // we always try to use sftp first (if scp is not user-enforced) - // and we also fallback to scp if sftp does not work - if !p.UseScpFilesystem { - fs, err := sftp.New(p, p.SSHClient) - if err != nil { - log.Info().Msg("use scp instead of sftp") - // enable fallback - p.UseScpFilesystem = true - } else { - p.fs = fs - return p.fs - } - } - - if p.UseScpFilesystem { - p.fs = scp.NewFs(p, p.SSHClient) - return p.fs - } - - // always fallback to catfs, slow but it works - p.fs = cat.New(p) - return p.fs -} - -func (p *Provider) FileInfo(path string) (os_provider.FileInfoDetails, error) { - fs := p.FS() - afs := &afero.Afero{Fs: fs} - stat, err := afs.Stat(path) - if err != nil { - return os_provider.FileInfoDetails{}, err - } - - uid := int64(-1) - gid := int64(-1) - - if p.Sudo != nil || p.UseScpFilesystem { - if stat, ok := stat.Sys().(*os_provider.FileInfo); ok { - uid = int64(stat.Uid) - gid = int64(stat.Gid) - } - } else { - if stat, ok := stat.Sys().(*rawsftp.FileStat); ok { - uid = int64(stat.UID) - gid = int64(stat.GID) - } - } - mode := stat.Mode() - - return os_provider.FileInfoDetails{ - Mode: os_provider.FileModeDetails{mode}, - Size: stat.Size(), - Uid: uid, - Gid: gid, - }, nil -} - -func (p *Provider) Close() { - if p.SSHClient != nil { - p.SSHClient.Close() - } -} - -func (p *Provider) Capabilities() providers.Capabilities { - return providers.Capabilities{ - providers.Capability_RunCommand, - providers.Capability_File, - } -} - -func (p *Provider) Kind() providers.Kind { - return p.kind -} - -func (p *Provider) Runtime() string { - return p.runtime -} - -func (p *Provider) PlatformIdDetectors() []providers.PlatformIdDetector { - return []providers.PlatformIdDetector{ - providers.TransportPlatformIdentifierDetector, - providers.HostnameDetector, - providers.CloudDetector, - } -} - -func (p *Provider) Identifier() (string, error) { - return PlatformIdentifier(p.HostKey), nil -} - -func PlatformIdentifier(publicKey ssh.PublicKey) string { - fingerprint := ssh.FingerprintSHA256(publicKey) - fingerprint = strings.Replace(fingerprint, ":", "-", 1) - identifier := "//platformid.api.mondoo.app/runtime/ssh/hostkey/" + fingerprint - return identifier -} diff --git a/_motor/providers/ssh/provider_test.go b/_motor/providers/ssh/provider_test.go deleted file mode 100644 index 0d383d574d..0000000000 --- a/_motor/providers/ssh/provider_test.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package ssh_test - -import ( - "testing" - - "github.com/stretchr/testify/assert" - "go.mondoo.com/cnquery/v9/motor/providers" - "go.mondoo.com/cnquery/v9/motor/providers/ssh" -) - -func TestSSHProviderError(t *testing.T) { - _, err := ssh.New(&providers.Config{Backend: providers.ProviderType_LOCAL_OS, Host: "example.local"}) - assert.Equal(t, "provider type does not match", err.Error()) -} - -func TestSSHAuthError(t *testing.T) { - _, err := ssh.New(&providers.Config{Backend: providers.ProviderType_SSH, Host: "example.local"}) - - assert.True(t, - // local testing if ssh agent is available - err.Error() == "dial tcp: lookup example.local: no such host" || - // local testing without ssh agent - err.Error() == "no authentication method defined") -} diff --git a/_motor/providers/ssh/session.go b/_motor/providers/ssh/session.go deleted file mode 100644 index b4b35e6408..0000000000 --- a/_motor/providers/ssh/session.go +++ /dev/null @@ -1,217 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package ssh - -import ( - "context" - "fmt" - "io" - "strconv" - - "github.com/aws/aws-sdk-go-v2/config" - "github.com/cockroachdb/errors" - "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/motor/providers" - "go.mondoo.com/cnquery/v9/motor/providers/ssh/awsinstanceconnect" - "go.mondoo.com/cnquery/v9/motor/providers/ssh/awsssmsession" - "go.mondoo.com/cnquery/v9/motor/providers/ssh/signers" - "go.mondoo.com/cnquery/v9/motor/vault" - "golang.org/x/crypto/ssh" - "golang.org/x/crypto/ssh/agent" -) - -func establishClientConnection(pCfg *providers.Config, hostKeyCallback ssh.HostKeyCallback) (*ssh.Client, []io.Closer, error) { - authMethods, closer, err := prepareConnection(pCfg) - if err != nil { - return nil, nil, err - } - - if len(authMethods) == 0 { - return nil, nil, errors.New("no authentication method defined") - } - - // TODO: hack: we want to establish a proper connection per configured connection so that we could use multiple users - user := "" - for i := range pCfg.Credentials { - if pCfg.Credentials[i].User != "" { - user = pCfg.Credentials[i].User - } - } - - log.Debug().Int("methods", len(authMethods)).Str("user", user).Msg("connect to remote ssh") - conn, err := ssh.Dial("tcp", fmt.Sprintf("%s:%d", pCfg.Host, pCfg.Port), &ssh.ClientConfig{ - User: user, - Auth: authMethods, - HostKeyCallback: hostKeyCallback, - }) - return conn, closer, err -} - -// hasAgentLoadedKey returns if the ssh agent has loaded the key file -// This may not be 100% accurate. The key can be stored in multiple locations with the -// same fingerprint. We cannot determine the fingerprint without decoding the encrypted -// key, `ssh-keygen -lf /Users/chartmann/.ssh/id_rsa` seems to use the ssh agent to -// determine the fingerprint without prompting for the password -func hasAgentLoadedKey(list []*agent.Key, filename string) bool { - for i := range list { - if list[i].Comment == filename { - return true - } - } - return false -} - -// prepareConnection determines the auth methods required for a ssh connection and also prepares any other -// pre-conditions for the connection like tunnelling the connection via AWS SSM session -func prepareConnection(pCfg *providers.Config) ([]ssh.AuthMethod, []io.Closer, error) { - auths := []ssh.AuthMethod{} - closer := []io.Closer{} - - // only one public auth method is allowed, therefore multiple keys need to be encapsulated into one auth method - sshSigners := []ssh.Signer{} - - // use key auth, only load if the key was not found in ssh agent - for i := range pCfg.Credentials { - credential := pCfg.Credentials[i] - - switch credential.Type { - case vault.CredentialType_private_key: - log.Debug().Msg("enabled ssh private key authentication") - priv, err := signers.GetSignerFromPrivateKeyWithPassphrase(credential.Secret, []byte(credential.Password)) - if err != nil { - log.Debug().Err(err).Msg("could not read private key") - } else { - sshSigners = append(sshSigners, priv) - } - case vault.CredentialType_password: - // use password auth if the password was set, this is also used when only the username is set - if len(credential.Secret) > 0 { - log.Debug().Msg("enabled ssh password authentication") - auths = append(auths, ssh.Password(string(credential.Secret))) - } - case vault.CredentialType_ssh_agent: - log.Debug().Msg("enabled ssh agent authentication") - sshSigners = append(sshSigners, signers.GetSignersFromSSHAgent()...) - case vault.CredentialType_aws_ec2_ssm_session: - // when the user establishes the ssm session we do the following - // 1. start websocket connection and start the session-manager-plugin to map the websocket to a local port - // 2. create new ssh key via instance connect so that we do not rely on any pre-existing ssh key - err := awsssmsession.CheckPlugin() - if err != nil { - return nil, nil, errors.New("Local AWS Session Manager plugin is missing. See https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-install-plugin.html for information on the AWS Session Manager plugin and installation instructions") - } - - loadOpts := []func(*config.LoadOptions) error{} - if pCfg.Options != nil && pCfg.Options["region"] != "" { - loadOpts = append(loadOpts, config.WithRegion(pCfg.Options["region"])) - } - profile := "" - if pCfg.Options != nil && pCfg.Options["profile"] != "" { - loadOpts = append(loadOpts, config.WithSharedConfigProfile(pCfg.Options["profile"])) - profile = pCfg.Options["profile"] - } - log.Debug().Str("profile", pCfg.Options["profile"]).Str("region", pCfg.Options["region"]).Msg("using aws creds") - - cfg, err := config.LoadDefaultConfig(context.Background(), loadOpts...) - if err != nil { - return nil, nil, err - } - - // we use ec2 instance connect api to create credentials for an aws instance - eic := awsinstanceconnect.New(cfg) - host := pCfg.Host - if id, ok := pCfg.Options["instance"]; ok { - host = id - } - creds, err := eic.GenerateCredentials(host, credential.User) - if err != nil { - return nil, nil, err - } - - // we use ssm session manager to connect to instance via websockets - sManager, err := awsssmsession.NewAwsSsmSessionManager(cfg, profile) - if err != nil { - return nil, nil, err - } - - // prepare websocket connection and bind it to a free local port - localIp := "localhost" - remotePort := "22" - // NOTE: for SSM we always target the instance id - pCfg.Host = creds.InstanceId - localPort, err := awsssmsession.GetAvailablePort() - if err != nil { - return nil, nil, errors.New("could not find an available port to start the ssm proxy") - } - ssmConn, err := sManager.Dial(pCfg, strconv.Itoa(localPort), remotePort) - if err != nil { - return nil, nil, err - } - - // update endpoint information for ssh to connect via local ssm proxy - // TODO: this has a side-effect, we may need extend the struct to include resolved connection data - pCfg.Host = localIp - pCfg.Port = int32(localPort) - - // NOTE: we need to set insecure so that ssh does not complain about the host key - // It is okay do that since the connection is established via aws api itself and it ensures that - // the instance id is okay - pCfg.Insecure = true - - // use the generated ssh credentials for authentication - priv, err := signers.GetSignerFromPrivateKeyWithPassphrase(creds.KeyPair.PrivateKey, creds.KeyPair.Passphrase) - if err != nil { - return nil, nil, errors.Wrap(err, "could not read generated private key") - } - sshSigners = append(sshSigners, priv) - closer = append(closer, ssmConn) - case vault.CredentialType_aws_ec2_instance_connect: - log.Debug().Str("profile", pCfg.Options["profile"]).Str("region", pCfg.Options["region"]).Msg("using aws creds") - - loadOpts := []func(*config.LoadOptions) error{} - if pCfg.Options != nil && pCfg.Options["region"] != "" { - loadOpts = append(loadOpts, config.WithRegion(pCfg.Options["region"])) - } - if pCfg.Options != nil && pCfg.Options["profile"] != "" { - loadOpts = append(loadOpts, config.WithSharedConfigProfile(pCfg.Options["profile"])) - } - cfg, err := config.LoadDefaultConfig(context.Background(), loadOpts...) - if err != nil { - return nil, nil, err - } - log.Debug().Msg("generating instance connect credentials") - eic := awsinstanceconnect.New(cfg) - host := pCfg.Host - if id, ok := pCfg.Options["instance"]; ok { - host = id - } - creds, err := eic.GenerateCredentials(host, credential.User) - if err != nil { - return nil, nil, err - } - - priv, err := signers.GetSignerFromPrivateKeyWithPassphrase(creds.KeyPair.PrivateKey, creds.KeyPair.Passphrase) - if err != nil { - return nil, nil, errors.Wrap(err, "could not read generated private key") - } - sshSigners = append(sshSigners, priv) - - // NOTE: this creates a side-effect where the host is overwritten - pCfg.Host = creds.PublicIpAddress - default: - return nil, nil, errors.New("unsupported authentication mechanism for ssh: " + credential.Type.String()) - } - } - - if len(sshSigners) > 0 { - auths = append(auths, ssh.PublicKeys(sshSigners...)) - } - - // if no credential was provided, fallback to ssh-agent and ssh-config - if len(pCfg.Credentials) == 0 { - sshSigners = append(sshSigners, signers.GetSignersFromSSHAgent()...) - } - - return auths, closer, nil -} diff --git a/_motor/providers/ssh/ssh_manual_test.go b/_motor/providers/ssh/ssh_manual_test.go deleted file mode 100644 index cebb5a79c4..0000000000 --- a/_motor/providers/ssh/ssh_manual_test.go +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -//go:build debugtest -// +build debugtest - -package ssh_test - -import ( - "io/ioutil" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/motor/providers" - "go.mondoo.com/cnquery/v9/motor/providers/ssh" - "go.mondoo.com/cnquery/v9/motor/vault" -) - -func TestEc2InstanceConnect(t *testing.T) { - instanceID := "i-0fed67234fd67e0f2" - user := "ec2-user" - - pCfg := &providers.Config{ - Backend: providers.ProviderType_SSH, - Host: instanceID, - Credentials: []*vault.Credential{{ - Type: vault.CredentialType_aws_ec2_instance_connect, - User: user, - }}, - Insecure: true, - } - - err := ssh.VerifyConfig(pCfg) - assert.Nil(t, err) - - _, err = ssh.New(pCfg) - require.NoError(t, err) -} - -func TestSudoConnect(t *testing.T) { - pCfg := &providers.Config{ - Backend: providers.ProviderType_SSH, - Host: "192.168.178.83", - Credentials: []*vault.Credential{{ - Type: vault.CredentialType_password, - User: "chris", - Secret: []byte("password1!"), - }}, - Sudo: &providers.Sudo{ - Active: true, - }, - Insecure: true, - } - - p, err := ssh.New(pCfg) - require.NoError(t, err) - defer p.Close() - - err = p.VerifyConnection() - require.NoError(t, err) - - fi, err := p.FS().Stat("/etc/os-release") - require.NoError(t, err) - assert.NotNil(t, fi) -} - -func TestEc2SSMSession(t *testing.T) { - instanceID := "i-0335499f012ff1a2b" - user := "ec2-user" - profile := "mondoo-dev" - region := "us-east-1" - - pCfg := &providers.Config{ - Backend: providers.ProviderType_SSH, - Host: instanceID, - Credentials: []*vault.Credential{{ - Type: vault.CredentialType_aws_ec2_ssm_session, - User: user, - }}, - Insecure: true, - Options: map[string]string{ - "region": region, - "profile": profile, - }, - } - - p, err := ssh.New(pCfg) - require.NoError(t, err) - - fi, err := p.FS().Stat("/etc/os-release") - require.NoError(t, err) - assert.NotNil(t, fi) - f, err := p.FS().Open("/etc/os-release") - require.NoError(t, err) - content, err := ioutil.ReadAll(f) - require.NoError(t, err) - assert.NotEqual(t, "", string(content)) - - // close ssh connection - p.Close() -} diff --git a/_motor/providers/vcd/platform.go b/_motor/providers/vcd/platform.go deleted file mode 100644 index 327e64b291..0000000000 --- a/_motor/providers/vcd/platform.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package vcd - -import ( - "fmt" - "strconv" - - "go.mondoo.com/cnquery/v9/motor/platform" -) - -func (p *Provider) PlatformInfo() (*platform.Platform, error) { - vcdVersion, err := p.client.Client.GetVcdFullVersion() - if err != nil { - return nil, err - } - - digits := vcdVersion.Version.Segments() - - return &platform.Platform{ - Name: "vcd", - Title: "VMware Cloud Director " + p.host, - Version: fmt.Sprintf("%d.%d.%d", digits[0], digits[1], digits[2]), - Build: strconv.Itoa(digits[3]), - Runtime: p.Runtime(), - Kind: p.Kind(), - Labels: map[string]string{ - "vcd.vmware.com/api-version": p.client.Client.APIVersion, - }, - }, nil -} - -func (p *Provider) Identifier() (string, error) { - return "//platformid.api.mondoo.app/runtime/vcd/host/" + p.host, nil -} diff --git a/_motor/providers/watcher.go b/_motor/providers/watcher.go deleted file mode 100644 index f08b0673d1..0000000000 --- a/_motor/providers/watcher.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package providers - -type ObservableType int - -const ( - FileType ObservableType = iota - CommandType -) - -type Observable interface { - Type() ObservableType - ID() string -} - -type Watcher interface { - Subscribe(typ string, id string, observable func(Observable)) error - Unsubscribe(typ string, id string) error - TearDown() error -} diff --git a/_motor/providers/winrm/cat/cat.go b/_motor/providers/winrm/cat/cat.go deleted file mode 100644 index 130b470de0..0000000000 --- a/_motor/providers/winrm/cat/cat.go +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package cat - -import ( - "bytes" - "fmt" - "io/ioutil" - "os" - "time" - - "github.com/cockroachdb/errors" - "github.com/spf13/afero" - os_provider "go.mondoo.com/cnquery/v9/motor/providers/os" - "go.mondoo.com/cnquery/v9/motor/providers/os/powershell" -) - -type CommandRunner interface { - RunCommand(command string) (*os_provider.Command, error) -} - -func New(cmdRunner CommandRunner) *CatFs { - return &CatFs{ - commandRunner: cmdRunner, - } -} - -type CatFs struct { - commandRunner CommandRunner -} - -func (cat *CatFs) Name() string { - return "Winrm Cat FS" -} - -func (cat *CatFs) Open(name string) (afero.File, error) { - // NOTE: do not use type here since it does not work well with file names like 'C:\Program Files\New Text Document.txt' - cmd, err := cat.commandRunner.RunCommand(fmt.Sprintf("powershell -c \"Get-Content '%s'\"", name)) - if err != nil { - return nil, err - } - - if cmd.ExitStatus != 0 { - return nil, os.ErrNotExist - } - - data, err := ioutil.ReadAll(cmd.Stdout) - if err != nil { - return nil, err - } - - return NewFile(name, bytes.NewBuffer(data)), nil -} - -func (cat *CatFs) Stat(name string) (os.FileInfo, error) { - cmd, err := cat.commandRunner.RunCommand(fmt.Sprintf("powershell -c \"Get-Item -LiteralPath '%s' | ConvertTo-JSON\"", name)) - if err != nil { - return nil, err - } - - if cmd.ExitStatus != 0 { - return nil, os.ErrNotExist - } - - item, err := ParseGetItem(cmd.Stdout) - if err != nil { - return nil, err - } - - return &fileStat{ - name: item.BaseName, - FileSize: item.Length, - FileAttributes: item.Attributes, - CreationTime: powershell.PSJsonTimestamp(item.CreationTime), - LastAccessTime: powershell.PSJsonTimestamp(item.LastAccessTime), - LastWriteTime: powershell.PSJsonTimestamp(item.LastWriteTime), - }, nil -} - -func (cat *CatFs) Create(name string) (afero.File, error) { - return nil, errors.New("not implemented") -} - -func (cat *CatFs) Mkdir(name string, perm os.FileMode) error { - return errors.New("not implemented") -} - -func (cat *CatFs) MkdirAll(path string, perm os.FileMode) error { - return errors.New("not implemented") -} - -func (cat *CatFs) OpenFile(name string, flag int, perm os.FileMode) (afero.File, error) { - return nil, errors.New("not implemented") -} - -func (cat *CatFs) Remove(name string) error { - return errors.New("not implemented") -} - -func (cat *CatFs) RemoveAll(path string) error { - return errors.New("not implemented") -} - -func (cat *CatFs) Rename(oldname, newname string) error { - return errors.New("not implemented") -} - -func (cat *CatFs) Chmod(name string, mode os.FileMode) error { - return errors.New("not implemented") -} - -func (cat *CatFs) Chtimes(name string, atime time.Time, mtime time.Time) error { - return errors.New("not implemented") -} - -func (cat *CatFs) Chown(name string, uid, gid int) error { - return errors.New("not implemented") -} diff --git a/_motor/providers/winrm/cat/cat_file.go b/_motor/providers/winrm/cat/cat_file.go deleted file mode 100644 index 5b8423640a..0000000000 --- a/_motor/providers/winrm/cat/cat_file.go +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package cat - -import ( - "bytes" - "errors" - "os" -) - -func NewFile(name string, buf *bytes.Buffer) *File { - return &File{path: name, buf: buf} -} - -type File struct { - buf *bytes.Buffer - path string -} - -func (f *File) Close() error { - return nil -} - -func (f *File) Name() string { - return f.path -} - -func (f *File) Stat() (os.FileInfo, error) { - return nil, errors.New("not implemented") -} - -func (f *File) Sync() error { - return nil -} - -func (f *File) Truncate(size int64) error { - return nil -} - -func (f *File) Read(b []byte) (n int, err error) { - return f.buf.Read(b) -} - -func (f *File) ReadAt(b []byte, off int64) (n int, err error) { - return 0, errors.New("not implemented") -} - -func (f *File) Readdir(count int) (res []os.FileInfo, err error) { - return nil, errors.New("not implemented") -} - -func (f *File) Readdirnames(n int) (names []string, err error) { - return nil, errors.New("not implemented") -} - -func (f *File) Seek(offset int64, whence int) (int64, error) { - return 0, errors.New("not implemented") -} - -func (f *File) Write(b []byte) (n int, err error) { - return 0, errors.New("not implemented") -} - -func (f *File) WriteAt(b []byte, off int64) (n int, err error) { - return 0, errors.New("not implemented") -} - -func (f *File) WriteString(s string) (ret int, err error) { - return 0, errors.New("not implemented") -} diff --git a/_motor/providers/winrm/cat/cat_test.go b/_motor/providers/winrm/cat/cat_test.go deleted file mode 100644 index aabe839dd1..0000000000 --- a/_motor/providers/winrm/cat/cat_test.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package cat_test - -import ( - "io/ioutil" - "path/filepath" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/motor/providers/mock" - "go.mondoo.com/cnquery/v9/motor/providers/winrm/cat" -) - -func TestCatFs(t *testing.T) { - filepath, _ := filepath.Abs("./testdata/winrm.toml") - p, err := mock.NewFromTomlFile(filepath) - require.NoError(t, err) - - catfs := cat.New(p) - - // fetch file content - f, err := catfs.Open("C:\\test.txt") - require.NoError(t, err) - - data, err := ioutil.ReadAll(f) - require.NoError(t, err) - - expected := "hi\n" - assert.Equal(t, expected, string(data)) - - // get file stats - fi, err := catfs.Stat("C:\\test.txt") - require.NoError(t, err) - - assert.Equal(t, int64(2), fi.Size()) - assert.Equal(t, false, fi.IsDir()) - assert.Equal(t, int64(1603529613), fi.ModTime().Unix()) -} diff --git a/_motor/providers/winrm/cat/getitem.go b/_motor/providers/winrm/cat/getitem.go deleted file mode 100644 index 7c94427b78..0000000000 --- a/_motor/providers/winrm/cat/getitem.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package cat - -import ( - "encoding/json" - "io" - "io/ioutil" -) - -type GetItem struct { - Name string `json:"Name"` - Length int64 `json:"Length"` - DirectoryName string `json:"DirectoryName"` - IsReadOnly bool `json:"IsReadOnly"` - Exists bool `json:"Exists"` - FullName string `json:"FullName"` - Extension string `json:"Extension"` - CreationTime string `json:"CreationTime"` - CreationTimeUtc string `json:"CreationTimeUtc"` - LastAccessTime string `json:"LastAccessTime"` - LastAccessTimeUtc string `json:"LastAccessTimeUtc"` - LastWriteTime string `json:"LastWriteTime"` - LastWriteTimeUtc string `json:"LastWriteTimeUtc"` - Attributes uint32 `json:"Attributes"` - Mode string `json:"Mode"` - BaseName string `json:"BaseName"` - VersionInfo VersionInfo `json:"VersionInfo"` -} - -type VersionInfo struct { - IsDebug bool `json:"IsDebug"` - IsPatched bool `json:"IsPatched"` - IsPreRelease bool `json:"IsPreRelease"` - IsPrivateBuild bool `json:"IsPrivateBuild"` - IsSpecialBuild bool `json:"IsSpecialBuild"` - FileVersionRaw VersionInfoRaw `json:"FileVersionRaw"` - ProductVersionRaw VersionInfoRaw `json:"ProductVersionRaw"` -} - -type VersionInfoRaw struct { - Major int `json:"Major"` - Minor int `json:"Minor"` - Build int `json:"Build"` - Revision int `json:"Revision"` - MajorRevision int `json:"MajorRevision"` - MinorRevision int `json:"MinorRevision"` -} - -func ParseGetItem(r io.Reader) (*GetItem, error) { - data, err := ioutil.ReadAll(r) - if err != nil { - return nil, err - } - - var item GetItem - err = json.Unmarshal(data, &item) - if err != nil { - return nil, err - } - - return &item, nil -} diff --git a/_motor/providers/winrm/cat/getitem_test.go b/_motor/providers/winrm/cat/getitem_test.go deleted file mode 100644 index aeeed32d8a..0000000000 --- a/_motor/providers/winrm/cat/getitem_test.go +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package cat - -import ( - "os" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func TestParseGetItemFile(t *testing.T) { - data, err := os.Open("./testdata/getitem_file.json") - require.NoError(t, err) - - m, err := ParseGetItem(data) - assert.Nil(t, err) - - assert.Equal(t, "test.txt", m.Name) - assert.Equal(t, uint32(32), m.Attributes) -} - -func TestParseGetItemDir(t *testing.T) { - data, err := os.Open("./testdata/getitem_dir.json") - require.NoError(t, err) - - m, err := ParseGetItem(data) - assert.Nil(t, err) - - assert.Equal(t, "Windows", m.Name) - assert.Equal(t, uint32(16), m.Attributes) -} diff --git a/_motor/providers/winrm/cat/testdata/getitem_dir.json b/_motor/providers/winrm/cat/testdata/getitem_dir.json deleted file mode 100644 index 381add9b9e..0000000000 --- a/_motor/providers/winrm/cat/testdata/getitem_dir.json +++ /dev/null @@ -1,205 +0,0 @@ -{ - "Name": "Windows", - "FullName": "C:\\Windows\\", - "Parent": { - "Name": "C:\\", - "FullName": "C:\\", - "Parent": null, - "Exists": true, - "Root": { - "Name": "C:\\", - "FullName": "C:\\", - "Parent": null, - "Exists": true, - "Root": "C:\\", - "Extension": "", - "CreationTime": "\/Date(1536991766317)\/", - "CreationTimeUtc": "\/Date(1536991766317)\/", - "LastAccessTime": "\/Date(1603463584712)\/", - "LastAccessTimeUtc": "\/Date(1603463584712)\/", - "LastWriteTime": "\/Date(1603463584696)\/", - "LastWriteTimeUtc": "\/Date(1603463584696)\/", - "Attributes": 22 - }, - "Extension": "", - "CreationTime": "\/Date(1536991766317)\/", - "CreationTimeUtc": "\/Date(1536991766317)\/", - "LastAccessTime": "\/Date(1603463584712)\/", - "LastAccessTimeUtc": "\/Date(1603463584712)\/", - "LastWriteTime": "\/Date(1603463584696)\/", - "LastWriteTimeUtc": "\/Date(1603463584696)\/", - "Attributes": 22 - }, - "Exists": true, - "Root": { - "Name": "C:\\", - "FullName": "C:\\", - "Parent": null, - "Exists": true, - "Root": { - "Name": "C:\\", - "FullName": "C:\\", - "Parent": null, - "Exists": true, - "Root": "C:\\", - "Extension": "", - "CreationTime": "\/Date(1536991766317)\/", - "CreationTimeUtc": "\/Date(1536991766317)\/", - "LastAccessTime": "\/Date(1603463584712)\/", - "LastAccessTimeUtc": "\/Date(1603463584712)\/", - "LastWriteTime": "\/Date(1603463584696)\/", - "LastWriteTimeUtc": "\/Date(1603463584696)\/", - "Attributes": 22 - }, - "Extension": "", - "CreationTime": "\/Date(1536991766317)\/", - "CreationTimeUtc": "\/Date(1536991766317)\/", - "LastAccessTime": "\/Date(1603463584712)\/", - "LastAccessTimeUtc": "\/Date(1603463584712)\/", - "LastWriteTime": "\/Date(1603463584696)\/", - "LastWriteTimeUtc": "\/Date(1603463584696)\/", - "Attributes": 22 - }, - "Extension": "", - "CreationTime": "\/Date(1536991766473)\/", - "CreationTimeUtc": "\/Date(1536991766473)\/", - "LastAccessTime": "\/Date(1603460845959)\/", - "LastAccessTimeUtc": "\/Date(1603460845959)\/", - "LastWriteTime": "\/Date(1603460845959)\/", - "LastWriteTimeUtc": "\/Date(1603460845959)\/", - "Attributes": 16, - "PSPath": "Microsoft.PowerShell.Core\\FileSystem::C:\\Windows\\", - "PSParentPath": "Microsoft.PowerShell.Core\\FileSystem::C:\\", - "PSChildName": "Windows", - "PSDrive": { - "CurrentLocation": "", - "Name": "C", - "Provider": { - "ImplementingType": "Microsoft.PowerShell.Commands.FileSystemProvider", - "HelpFile": "System.Management.Automation.dll-Help.xml", - "Name": "FileSystem", - "PSSnapIn": "Microsoft.PowerShell.Core", - "ModuleName": "Microsoft.PowerShell.Core", - "Module": null, - "Description": "", - "Capabilities": 52, - "Home": "C:\\Users\\Administrator", - "Drives": "C" - }, - "Root": "C:\\", - "Description": "", - "MaximumSize": null, - "Credential": { - "UserName": null, - "Password": null - }, - "DisplayRoot": null - }, - "PSProvider": { - "ImplementingType": { - "Module": "System.Management.Automation.dll", - "Assembly": "System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35", - "TypeHandle": "System.RuntimeTypeHandle", - "DeclaringMethod": null, - "BaseType": "System.Management.Automation.Provider.NavigationCmdletProvider", - "UnderlyingSystemType": "Microsoft.PowerShell.Commands.FileSystemProvider", - "FullName": "Microsoft.PowerShell.Commands.FileSystemProvider", - "AssemblyQualifiedName": "Microsoft.PowerShell.Commands.FileSystemProvider, System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35", - "Namespace": "Microsoft.PowerShell.Commands", - "GUID": "b4755d19-b6a7-38dc-ae06-4167f801062f", - "IsEnum": false, - "GenericParameterAttributes": null, - "IsSecurityCritical": true, - "IsSecuritySafeCritical": false, - "IsSecurityTransparent": false, - "IsGenericTypeDefinition": false, - "IsGenericParameter": false, - "GenericParameterPosition": null, - "IsGenericType": false, - "IsConstructedGenericType": false, - "ContainsGenericParameters": false, - "StructLayoutAttribute": "System.Runtime.InteropServices.StructLayoutAttribute", - "Name": "FileSystemProvider", - "MemberType": 32, - "DeclaringType": null, - "ReflectedType": null, - "MetadataToken": 33554727, - "GenericTypeParameters": "", - "DeclaredConstructors": "Void .ctor() Void .cctor()", - "DeclaredEvents": "", - "DeclaredFields": "System.Collections.ObjectModel.Collection`1[System.Management.Automation.WildcardPattern] excludeMatcher System.Management.Automation.PSTraceSource tracer Int32 FILETRANSFERSIZE System.String ProviderName", - "DeclaredMembers": "System.String NormalizePath(System.String) System.IO.FileSystemInfo GetFileSystemInfo(System.String, Boolean ByRef) Boolean IsFilterSet() System.Object GetChildNamesDynamicParameters(System.String) System.Object GetChildItemsDynamicParameters(System.String, Boolean) System.Object CopyItemDynamicParameters(System.String, System.String, Boolean) System.String GetHelpMaml(System.String, System.String) System.Management.Automation.ProviderInfo Start(System.Management.Automation.ProviderInfo) System.Management.Automation.PSDriveInfo NewDrive(System.Management.Automation.PSDriveInfo) Void MapNetworkDrive(System.Management.Automation.PSDriveInfo) Boolean IsNetworkMappedDrive(System.Management.Automation.PSDriveInfo) System.Management.Automation.PSDriveInfo RemoveDrive(System.Management.Automation.PSDriveInfo) Boolean IsSupportedDriveForPersistence(System.Management.Automation.PSDriveInfo) System.String GetUNCForNetworkDrive(System.String) System.String GetSubstitutedPathForNetworkDosDevice(System.String) System.String GetRootPathForNetworkDriveOrDosDevice(System.IO.DriveInfo) System.Collections.ObjectModel.Collection`1[System.Management.Automation.PSDriveInfo] InitializeDefaultDrives() System.Object GetItemDynamicParameters(System.String) Boolean IsValidPath(System.String) Void GetItem(System.String) System.IO.FileSystemInfo GetFileSystemItem(System.String, Boolean ByRef, Boolean) Void InvokeDefaultAction(System.String) Void GetChildItems(System.String, Boolean, UInt32) Void GetChildNames(System.String, System.Management.Automation.ReturnContainers) Boolean ConvertPath(System.String, System.String, System.String ByRef, System.String ByRef) Void GetPathItems(System.String, Boolean, UInt32, Boolean, System.Management.Automation.ReturnContainers) Void Dir(System.IO.DirectoryInfo, Boolean, UInt32, Boolean, System.Management.Automation.ReturnContainers) System.Management.Automation.FlagsExpression`1[System.IO.FileAttributes] FormatAttributeSwitchParamters() System.String Mode(System.Management.Automation.PSObject) Void RenameItem(System.String, System.String) Void NewItem(System.String, System.String, System.Object) Boolean CheckItemExists(System.String, Boolean ByRef) ItemType GetItemType(System.String) Void CreateDirectory(System.String, Boolean) Boolean CreateIntermediateDirectories(System.String) Void RemoveItem(System.String, Boolean) System.Object RemoveItemDynamicParameters(System.String, Boolean) Void RemoveDirectoryInfoItem(System.IO.DirectoryInfo, Boolean, Boolean, Boolean) Void RemoveFileInfoItem(System.IO.FileInfo, Boolean) Void RemoveFileSystemItem(System.IO.FileSystemInfo, Boolean) Boolean ItemExists(System.String) Boolean ItemExists(System.String, System.Management.Automation.ErrorRecord ByRef) System.Object ItemExistsDynamicParameters(System.String) Boolean HasChildItems(System.String) Boolean DirectoryInfoHasChildItems(System.IO.DirectoryInfo) Void CopyItem(System.String, System.String, Boolean) Void CopyItemFromRemoteSession(System.String, System.String, Boolean, Boolean, System.Management.Automation.Runspaces.PSSession) Void CopyItemLocalOrToSession(System.String, System.String, Boolean, Boolean, System.Management.Automation.PowerShell) Void CopyDirectoryInfoItem(System.IO.DirectoryInfo, System.String, Boolean, Boolean, System.Management.Automation.PowerShell) Void CopyFileInfoItem(System.IO.FileInfo, System.String, Boolean, System.Management.Automation.PowerShell) Void CopyDirectoryFromRemoteSession(System.String, System.String, System.String, Boolean, Boolean, System.Management.Automation.PowerShell) System.Collections.ArrayList GetRemoteSourceAlternateStreams(System.Management.Automation.PowerShell, System.String) Void InitilizeFunctionPSCopyFileFromRemoteSession(System.Management.Automation.PowerShell) Void RemoveFunctionsPSCopyFileFromRemoteSession(System.Management.Automation.PowerShell) Boolean ValidRemoteSessionForScripting(System.Management.Automation.Runspaces.Runspace) System.Collections.Hashtable GetRemoteFileMetadata(System.String, System.Management.Automation.PowerShell) Void SetFileMetadata(System.String, System.IO.FileInfo, System.Management.Automation.PowerShell) Void CopyFileFromRemoteSession(System.String, System.String, System.String, Boolean, System.Management.Automation.PowerShell, Int64) Boolean PerformCopyFileFromRemoteSession(System.String, System.IO.FileInfo, System.String, Boolean, System.Management.Automation.PowerShell, Int64, Boolean, System.String) Void InitilizeFunctionsPSCopyFileToRemoteSession(System.Management.Automation.PowerShell) Void RemoveFunctionPSCopyFileToRemoteSession(System.Management.Automation.PowerShell) Boolean RemoteTargetSupportsAlternateStreams(System.Management.Automation.PowerShell, System.String) System.String MakeRemotePath(System.Management.Automation.PowerShell, System.String, System.String) Boolean RemoteDirectoryExist(System.Management.Automation.PowerShell, System.String) Boolean CopyFileStreamToRemoteSession(System.IO.FileInfo, System.String, System.Management.Automation.PowerShell, Boolean, System.String) System.Collections.Hashtable GetFileMetadata(System.IO.FileInfo) Void SetRemoteFileMetadata(System.IO.FileInfo, System.String, System.Management.Automation.PowerShell) Boolean PerformCopyFileToRemoteSession(System.IO.FileInfo, System.String, System.Management.Automation.PowerShell) Boolean RemoteDestinationPathIsFile(System.String, System.Management.Automation.PowerShell) System.String CreateDirectoryOnRemoteSession(System.String, Boolean, System.Management.Automation.PowerShell) Boolean PathIsReservedDeviceName(System.String, System.String) System.String GetParentPath(System.String, System.String) Boolean IsAbsolutePath(System.String) Boolean IsUNCPath(System.String) Boolean IsUNCRoot(System.String) Boolean IsPathRoot(System.String) System.String NormalizeRelativePath(System.String, System.String) System.String NormalizeRelativePathHelper(System.String, System.String) System.String RemoveRelativeTokens(System.String) System.String GetCommonBase(System.String, System.String) System.Collections.Generic.Stack`1[System.String] TokenizePathToStack(System.String, System.String) System.Collections.Generic.Stack`1[System.String] NormalizeThePath(System.String, System.Collections.Generic.Stack`1[System.String]) System.String CreateNormalizedRelativePathFromStack(System.Collections.Generic.Stack`1[System.String]) System.String GetChildName(System.String) System.String EnsureDriveIsRooted(System.String) Boolean IsItemContainer(System.String) Void MoveItem(System.String, System.String) Void MoveFileInfoItem(System.IO.FileInfo, System.String, Boolean, Boolean) Void MoveDirectoryInfoItem(System.IO.DirectoryInfo, System.String, Boolean) Void CopyAndDelete(System.IO.DirectoryInfo, System.String, Boolean) Boolean IsSameVolume(System.String, System.String) Void GetProperty(System.String, System.Collections.ObjectModel.Collection`1[System.String]) System.Object GetPropertyDynamicParameters(System.String, System.Collections.ObjectModel.Collection`1[System.String]) Void SetProperty(System.String, System.Management.Automation.PSObject) System.Object SetPropertyDynamicParameters(System.String, System.Management.Automation.PSObject) Void ClearProperty(System.String, System.Collections.ObjectModel.Collection`1[System.String]) System.Object ClearPropertyDynamicParameters(System.String, System.Collections.ObjectModel.Collection`1[System.String]) System.Management.Automation.Provider.IContentReader GetContentReader(System.String) System.Object GetContentReaderDynamicParameters(System.String) System.Management.Automation.Provider.IContentWriter GetContentWriter(System.String) System.Object GetContentWriterDynamicParameters(System.String) Void ClearContent(System.String) System.Object ClearContentDynamicParameters(System.String) Int32 SafeGetFileAttributes(System.String) Void ValidateParameters(Boolean) Void GetSecurityDescriptor(System.String, System.Security.AccessControl.AccessControlSections) Void SetSecurityDescriptor(System.String, System.Security.AccessControl.ObjectSecurity) Void SetSecurityDescriptor(System.String, System.Security.AccessControl.ObjectSecurity, System.Security.AccessControl.AccessControlSections) System.Security.AccessControl.ObjectSecurity NewSecurityDescriptorFromPath(System.String, System.Security.AccessControl.AccessControlSections) System.Security.AccessControl.ObjectSecurity NewSecurityDescriptorOfType(System.String, System.Security.AccessControl.AccessControlSections) System.Security.AccessControl.ObjectSecurity NewSecurityDescriptor(ItemType) System.Management.Automation.ErrorRecord CreateErrorRecord(System.String, System.String) Void .ctor() Void .cctor() System.Collections.ObjectModel.Collection`1[System.Management.Automation.WildcardPattern] excludeMatcher System.Management.Automation.PSTraceSource tracer Int32 FILETRANSFERSIZE System.String ProviderName Microsoft.PowerShell.Commands.FileSystemProvider+ItemType Microsoft.PowerShell.Commands.FileSystemProvider+NativeMethods Microsoft.PowerShell.Commands.FileSystemProvider+NetResource", - "DeclaredMethods": "System.String Mode(System.Management.Automation.PSObject) System.Object GetChildItemsDynamicParameters(System.String, Boolean) System.String NormalizePath(System.String) System.IO.FileSystemInfo GetFileSystemInfo(System.String, Boolean ByRef) Boolean IsFilterSet() System.Object GetChildNamesDynamicParameters(System.String) System.Object CopyItemDynamicParameters(System.String, System.String, Boolean) System.String GetHelpMaml(System.String, System.String) System.Management.Automation.ProviderInfo Start(System.Management.Automation.ProviderInfo) System.Management.Automation.PSDriveInfo NewDrive(System.Management.Automation.PSDriveInfo) Void MapNetworkDrive(System.Management.Automation.PSDriveInfo) Boolean IsNetworkMappedDrive(System.Management.Automation.PSDriveInfo) System.Management.Automation.PSDriveInfo RemoveDrive(System.Management.Automation.PSDriveInfo) Boolean IsSupportedDriveForPersistence(System.Management.Automation.PSDriveInfo) System.String GetUNCForNetworkDrive(System.String) System.String GetSubstitutedPathForNetworkDosDevice(System.String) System.String GetRootPathForNetworkDriveOrDosDevice(System.IO.DriveInfo) System.Collections.ObjectModel.Collection`1[System.Management.Automation.PSDriveInfo] InitializeDefaultDrives() System.Object GetItemDynamicParameters(System.String) Boolean IsValidPath(System.String) Void GetItem(System.String) System.IO.FileSystemInfo GetFileSystemItem(System.String, Boolean ByRef, Boolean) Void InvokeDefaultAction(System.String) Void GetChildItems(System.String, Boolean, UInt32) Void GetChildNames(System.String, System.Management.Automation.ReturnContainers) Boolean ConvertPath(System.String, System.String, System.String ByRef, System.String ByRef) Void GetPathItems(System.String, Boolean, UInt32, Boolean, System.Management.Automation.ReturnContainers) Void Dir(System.IO.DirectoryInfo, Boolean, UInt32, Boolean, System.Management.Automation.ReturnContainers) System.Management.Automation.FlagsExpression`1[System.IO.FileAttributes] FormatAttributeSwitchParamters() Void RenameItem(System.String, System.String) Void NewItem(System.String, System.String, System.Object) Boolean CheckItemExists(System.String, Boolean ByRef) ItemType GetItemType(System.String) Void CreateDirectory(System.String, Boolean) Boolean CreateIntermediateDirectories(System.String) Void RemoveItem(System.String, Boolean) System.Object RemoveItemDynamicParameters(System.String, Boolean) Void RemoveDirectoryInfoItem(System.IO.DirectoryInfo, Boolean, Boolean, Boolean) Void RemoveFileInfoItem(System.IO.FileInfo, Boolean) Void RemoveFileSystemItem(System.IO.FileSystemInfo, Boolean) Boolean ItemExists(System.String) Boolean ItemExists(System.String, System.Management.Automation.ErrorRecord ByRef) System.Object ItemExistsDynamicParameters(System.String) Boolean HasChildItems(System.String) Boolean DirectoryInfoHasChildItems(System.IO.DirectoryInfo) Void CopyItem(System.String, System.String, Boolean) Void CopyItemFromRemoteSession(System.String, System.String, Boolean, Boolean, System.Management.Automation.Runspaces.PSSession) Void CopyItemLocalOrToSession(System.String, System.String, Boolean, Boolean, System.Management.Automation.PowerShell) Void CopyDirectoryInfoItem(System.IO.DirectoryInfo, System.String, Boolean, Boolean, System.Management.Automation.PowerShell) Void CopyFileInfoItem(System.IO.FileInfo, System.String, Boolean, System.Management.Automation.PowerShell) Void CopyDirectoryFromRemoteSession(System.String, System.String, System.String, Boolean, Boolean, System.Management.Automation.PowerShell) System.Collections.ArrayList GetRemoteSourceAlternateStreams(System.Management.Automation.PowerShell, System.String) Void InitilizeFunctionPSCopyFileFromRemoteSession(System.Management.Automation.PowerShell) Void RemoveFunctionsPSCopyFileFromRemoteSession(System.Management.Automation.PowerShell) Boolean ValidRemoteSessionForScripting(System.Management.Automation.Runspaces.Runspace) System.Collections.Hashtable GetRemoteFileMetadata(System.String, System.Management.Automation.PowerShell) Void SetFileMetadata(System.String, System.IO.FileInfo, System.Management.Automation.PowerShell) Void CopyFileFromRemoteSession(System.String, System.String, System.String, Boolean, System.Management.Automation.PowerShell, Int64) Boolean PerformCopyFileFromRemoteSession(System.String, System.IO.FileInfo, System.String, Boolean, System.Management.Automation.PowerShell, Int64, Boolean, System.String) Void InitilizeFunctionsPSCopyFileToRemoteSession(System.Management.Automation.PowerShell) Void RemoveFunctionPSCopyFileToRemoteSession(System.Management.Automation.PowerShell) Boolean RemoteTargetSupportsAlternateStreams(System.Management.Automation.PowerShell, System.String) System.String MakeRemotePath(System.Management.Automation.PowerShell, System.String, System.String) Boolean RemoteDirectoryExist(System.Management.Automation.PowerShell, System.String) Boolean CopyFileStreamToRemoteSession(System.IO.FileInfo, System.String, System.Management.Automation.PowerShell, Boolean, System.String) System.Collections.Hashtable GetFileMetadata(System.IO.FileInfo) Void SetRemoteFileMetadata(System.IO.FileInfo, System.String, System.Management.Automation.PowerShell) Boolean PerformCopyFileToRemoteSession(System.IO.FileInfo, System.String, System.Management.Automation.PowerShell) Boolean RemoteDestinationPathIsFile(System.String, System.Management.Automation.PowerShell) System.String CreateDirectoryOnRemoteSession(System.String, Boolean, System.Management.Automation.PowerShell) Boolean PathIsReservedDeviceName(System.String, System.String) System.String GetParentPath(System.String, System.String) Boolean IsAbsolutePath(System.String) Boolean IsUNCPath(System.String) Boolean IsUNCRoot(System.String) Boolean IsPathRoot(System.String) System.String NormalizeRelativePath(System.String, System.String) System.String NormalizeRelativePathHelper(System.String, System.String) System.String RemoveRelativeTokens(System.String) System.String GetCommonBase(System.String, System.String) System.Collections.Generic.Stack`1[System.String] TokenizePathToStack(System.String, System.String) System.Collections.Generic.Stack`1[System.String] NormalizeThePath(System.String, System.Collections.Generic.Stack`1[System.String]) System.String CreateNormalizedRelativePathFromStack(System.Collections.Generic.Stack`1[System.String]) System.String GetChildName(System.String) System.String EnsureDriveIsRooted(System.String) Boolean IsItemContainer(System.String) Void MoveItem(System.String, System.String) Void MoveFileInfoItem(System.IO.FileInfo, System.String, Boolean, Boolean) Void MoveDirectoryInfoItem(System.IO.DirectoryInfo, System.String, Boolean) Void CopyAndDelete(System.IO.DirectoryInfo, System.String, Boolean) Boolean IsSameVolume(System.String, System.String) Void GetProperty(System.String, System.Collections.ObjectModel.Collection`1[System.String]) System.Object GetPropertyDynamicParameters(System.String, System.Collections.ObjectModel.Collection`1[System.String]) Void SetProperty(System.String, System.Management.Automation.PSObject) System.Object SetPropertyDynamicParameters(System.String, System.Management.Automation.PSObject) Void ClearProperty(System.String, System.Collections.ObjectModel.Collection`1[System.String]) System.Object ClearPropertyDynamicParameters(System.String, System.Collections.ObjectModel.Collection`1[System.String]) System.Management.Automation.Provider.IContentReader GetContentReader(System.String) System.Object GetContentReaderDynamicParameters(System.String) System.Management.Automation.Provider.IContentWriter GetContentWriter(System.String) System.Object GetContentWriterDynamicParameters(System.String) Void ClearContent(System.String) System.Object ClearContentDynamicParameters(System.String) Int32 SafeGetFileAttributes(System.String) Void ValidateParameters(Boolean) Void GetSecurityDescriptor(System.String, System.Security.AccessControl.AccessControlSections) Void SetSecurityDescriptor(System.String, System.Security.AccessControl.ObjectSecurity) Void SetSecurityDescriptor(System.String, System.Security.AccessControl.ObjectSecurity, System.Security.AccessControl.AccessControlSections) System.Security.AccessControl.ObjectSecurity NewSecurityDescriptorFromPath(System.String, System.Security.AccessControl.AccessControlSections) System.Security.AccessControl.ObjectSecurity NewSecurityDescriptorOfType(System.String, System.Security.AccessControl.AccessControlSections) System.Security.AccessControl.ObjectSecurity NewSecurityDescriptor(ItemType) System.Management.Automation.ErrorRecord CreateErrorRecord(System.String, System.String)", - "DeclaredNestedTypes": "Microsoft.PowerShell.Commands.FileSystemProvider+ItemType Microsoft.PowerShell.Commands.FileSystemProvider+NativeMethods Microsoft.PowerShell.Commands.FileSystemProvider+NetResource", - "DeclaredProperties": "", - "ImplementedInterfaces": "System.Management.Automation.IResourceSupplier System.Management.Automation.Provider.IContentCmdletProvider System.Management.Automation.Provider.IPropertyCmdletProvider System.Management.Automation.Provider.ISecurityDescriptorCmdletProvider System.Management.Automation.Provider.ICmdletProviderSupportsHelp", - "TypeInitializer": "Void .cctor()", - "IsNested": false, - "Attributes": 1048833, - "IsVisible": true, - "IsNotPublic": false, - "IsPublic": true, - "IsNestedPublic": false, - "IsNestedPrivate": false, - "IsNestedFamily": false, - "IsNestedAssembly": false, - "IsNestedFamANDAssem": false, - "IsNestedFamORAssem": false, - "IsAutoLayout": true, - "IsLayoutSequential": false, - "IsExplicitLayout": false, - "IsClass": true, - "IsInterface": false, - "IsValueType": false, - "IsAbstract": false, - "IsSealed": true, - "IsSpecialName": false, - "IsImport": false, - "IsSerializable": false, - "IsAnsiClass": true, - "IsUnicodeClass": false, - "IsAutoClass": false, - "IsArray": false, - "IsByRef": false, - "IsPointer": false, - "IsPrimitive": false, - "IsCOMObject": false, - "HasElementType": false, - "IsContextful": false, - "IsMarshalByRef": false, - "GenericTypeArguments": "", - "CustomAttributes": "[System.Management.Automation.Provider.CmdletProviderAttribute(\"FileSystem\", (System.Management.Automation.Provider.ProviderCapabilities)52)] [System.Management.Automation.OutputTypeAttribute(typeof(System.Security.AccessControl.FileSecurity), ProviderCmdlet = \"Set-Acl\")] [System.Management.Automation.OutputTypeAttribute(new Type[2] { typeof(System.String), typeof(System.Management.Automation.PathInfo) }, ProviderCmdlet = \"Resolve-Path\")] [System.Management.Automation.OutputTypeAttribute(typeof(System.Management.Automation.PathInfo), ProviderCmdlet = \"Push-Location\")] [System.Management.Automation.OutputTypeAttribute(new Type[2] { typeof(System.Byte), typeof(System.String) }, ProviderCmdlet = \"Get-Content\")] [System.Management.Automation.OutputTypeAttribute(typeof(System.IO.FileInfo), ProviderCmdlet = \"Get-Item\")] [System.Management.Automation.OutputTypeAttribute(new Type[2] { typeof(System.IO.FileInfo), typeof(System.IO.DirectoryInfo) }, ProviderCmdlet = \"Get-ChildItem\")] [System.Management.Automation.OutputTypeAttribute(new Type[2] { typeof(System.Security.AccessControl.FileSecurity), typeof(System.Security.AccessControl.DirectorySecurity) }, ProviderCmdlet = \"Get-Acl\")] [System.Management.Automation.OutputTypeAttribute(new Type[4] { typeof(System.Boolean), typeof(System.String), typeof(System.IO.FileInfo), typeof(System.IO.DirectoryInfo) }, ProviderCmdlet = \"Get-Item\")] [System.Management.Automation.OutputTypeAttribute(new Type[5] { typeof(System.Boolean), typeof(System.String), typeof(System.DateTime), typeof(System.IO.FileInfo), typeof(System.IO.DirectoryInfo) }, ProviderCmdlet = \"Get-ItemProperty\")] [System.Management.Automation.OutputTypeAttribute(new Type[2] { typeof(System.String), typeof(System.IO.FileInfo) }, ProviderCmdlet = \"New-Item\")]" - }, - "HelpFile": "System.Management.Automation.dll-Help.xml", - "Name": "FileSystem", - "PSSnapIn": { - "Name": "Microsoft.PowerShell.Core", - "IsDefault": true, - "ApplicationBase": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0", - "AssemblyName": "System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, ProcessorArchitecture=MSIL", - "ModuleName": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\System.Management.Automation.dll", - "PSVersion": "5.1.17763.1490", - "Version": "3.0.0.0", - "Types": "types.ps1xml typesv3.ps1xml", - "Formats": "Certificate.format.ps1xml DotNetTypes.format.ps1xml FileSystem.format.ps1xml Help.format.ps1xml HelpV3.format.ps1xml PowerShellCore.format.ps1xml PowerShellTrace.format.ps1xml Registry.format.ps1xml", - "Description": "This Windows PowerShell snap-in contains cmdlets used to manage components of Windows PowerShell.", - "Vendor": "Microsoft Corporation", - "LogPipelineExecutionDetails": false - }, - "ModuleName": "Microsoft.PowerShell.Core", - "Module": null, - "Description": "", - "Capabilities": 52, - "Home": "C:\\Users\\Administrator", - "Drives": [ - "C" - ] - }, - "PSIsContainer": true, - "Mode": "d-----", - "BaseName": "Windows", - "Target": [ - "C:\\Windows" - ], - "LinkType": null -} \ No newline at end of file diff --git a/_motor/providers/winrm/cat/testdata/getitem_file.json b/_motor/providers/winrm/cat/testdata/getitem_file.json deleted file mode 100644 index 8159500dd9..0000000000 --- a/_motor/providers/winrm/cat/testdata/getitem_file.json +++ /dev/null @@ -1,224 +0,0 @@ -{ - "Name": "test.txt", - "Length": 2, - "DirectoryName": "C:\\", - "Directory": { - "Name": "C:\\", - "FullName": "C:\\", - "Parent": null, - "Exists": true, - "Root": { - "Name": "C:\\", - "FullName": "C:\\", - "Parent": null, - "Exists": true, - "Root": "C:\\", - "Extension": "", - "CreationTime": "\/Date(1536991766317)\/", - "CreationTimeUtc": "\/Date(1536991766317)\/", - "LastAccessTime": "\/Date(1603463584712)\/", - "LastAccessTimeUtc": "\/Date(1603463584712)\/", - "LastWriteTime": "\/Date(1603463584696)\/", - "LastWriteTimeUtc": "\/Date(1603463584696)\/", - "Attributes": 22 - }, - "Extension": "", - "CreationTime": "\/Date(1536991766317)\/", - "CreationTimeUtc": "\/Date(1536991766317)\/", - "LastAccessTime": "\/Date(1603463584712)\/", - "LastAccessTimeUtc": "\/Date(1603463584712)\/", - "LastWriteTime": "\/Date(1603463584696)\/", - "LastWriteTimeUtc": "\/Date(1603463584696)\/", - "Attributes": 22 - }, - "IsReadOnly": false, - "Exists": true, - "FullName": "C:\\test.txt", - "Extension": ".txt", - "CreationTime": "\/Date(1603463584696)\/", - "CreationTimeUtc": "\/Date(1603463584696)\/", - "LastAccessTime": "\/Date(1603463590935)\/", - "LastAccessTimeUtc": "\/Date(1603463590935)\/", - "LastWriteTime": "\/Date(1603463590935)\/", - "LastWriteTimeUtc": "\/Date(1603463590935)\/", - "Attributes": 32, - "PSPath": "Microsoft.PowerShell.Core\\FileSystem::C:\\test.txt", - "PSParentPath": "Microsoft.PowerShell.Core\\FileSystem::C:\\", - "PSChildName": "test.txt", - "PSDrive": { - "CurrentLocation": "", - "Name": "C", - "Provider": { - "ImplementingType": "Microsoft.PowerShell.Commands.FileSystemProvider", - "HelpFile": "System.Management.Automation.dll-Help.xml", - "Name": "FileSystem", - "PSSnapIn": "Microsoft.PowerShell.Core", - "ModuleName": "Microsoft.PowerShell.Core", - "Module": null, - "Description": "", - "Capabilities": 52, - "Home": "C:\\Users\\Administrator", - "Drives": "C" - }, - "Root": "C:\\", - "Description": "", - "MaximumSize": null, - "Credential": { - "UserName": null, - "Password": null - }, - "DisplayRoot": null - }, - "PSProvider": { - "ImplementingType": { - "Module": "System.Management.Automation.dll", - "Assembly": "System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35", - "TypeHandle": "System.RuntimeTypeHandle", - "DeclaringMethod": null, - "BaseType": "System.Management.Automation.Provider.NavigationCmdletProvider", - "UnderlyingSystemType": "Microsoft.PowerShell.Commands.FileSystemProvider", - "FullName": "Microsoft.PowerShell.Commands.FileSystemProvider", - "AssemblyQualifiedName": "Microsoft.PowerShell.Commands.FileSystemProvider, System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35", - "Namespace": "Microsoft.PowerShell.Commands", - "GUID": "b4755d19-b6a7-38dc-ae06-4167f801062f", - "IsEnum": false, - "GenericParameterAttributes": null, - "IsSecurityCritical": true, - "IsSecuritySafeCritical": false, - "IsSecurityTransparent": false, - "IsGenericTypeDefinition": false, - "IsGenericParameter": false, - "GenericParameterPosition": null, - "IsGenericType": false, - "IsConstructedGenericType": false, - "ContainsGenericParameters": false, - "StructLayoutAttribute": "System.Runtime.InteropServices.StructLayoutAttribute", - "Name": "FileSystemProvider", - "MemberType": 32, - "DeclaringType": null, - "ReflectedType": null, - "MetadataToken": 33554727, - "GenericTypeParameters": "", - "DeclaredConstructors": "Void .ctor() Void .cctor()", - "DeclaredEvents": "", - "DeclaredFields": "System.Collections.ObjectModel.Collection`1[System.Management.Automation.WildcardPattern] excludeMatcher System.Management.Automation.PSTraceSource tracer Int32 FILETRANSFERSIZE System.String ProviderName", - "DeclaredMembers": "System.String NormalizePath(System.String) System.IO.FileSystemInfo GetFileSystemInfo(System.String, Boolean ByRef) Boolean IsFilterSet() System.Object GetChildNamesDynamicParameters(System.String) System.Object GetChildItemsDynamicParameters(System.String, Boolean) System.Object CopyItemDynamicParameters(System.String, System.String, Boolean) System.String GetHelpMaml(System.String, System.String) System.Management.Automation.ProviderInfo Start(System.Management.Automation.ProviderInfo) System.Management.Automation.PSDriveInfo NewDrive(System.Management.Automation.PSDriveInfo) Void MapNetworkDrive(System.Management.Automation.PSDriveInfo) Boolean IsNetworkMappedDrive(System.Management.Automation.PSDriveInfo) System.Management.Automation.PSDriveInfo RemoveDrive(System.Management.Automation.PSDriveInfo) Boolean IsSupportedDriveForPersistence(System.Management.Automation.PSDriveInfo) System.String GetUNCForNetworkDrive(System.String) System.String GetSubstitutedPathForNetworkDosDevice(System.String) System.String GetRootPathForNetworkDriveOrDosDevice(System.IO.DriveInfo) System.Collections.ObjectModel.Collection`1[System.Management.Automation.PSDriveInfo] InitializeDefaultDrives() System.Object GetItemDynamicParameters(System.String) Boolean IsValidPath(System.String) Void GetItem(System.String) System.IO.FileSystemInfo GetFileSystemItem(System.String, Boolean ByRef, Boolean) Void InvokeDefaultAction(System.String) Void GetChildItems(System.String, Boolean, UInt32) Void GetChildNames(System.String, System.Management.Automation.ReturnContainers) Boolean ConvertPath(System.String, System.String, System.String ByRef, System.String ByRef) Void GetPathItems(System.String, Boolean, UInt32, Boolean, System.Management.Automation.ReturnContainers) Void Dir(System.IO.DirectoryInfo, Boolean, UInt32, Boolean, System.Management.Automation.ReturnContainers) System.Management.Automation.FlagsExpression`1[System.IO.FileAttributes] FormatAttributeSwitchParamters() System.String Mode(System.Management.Automation.PSObject) Void RenameItem(System.String, System.String) Void NewItem(System.String, System.String, System.Object) Boolean CheckItemExists(System.String, Boolean ByRef) ItemType GetItemType(System.String) Void CreateDirectory(System.String, Boolean) Boolean CreateIntermediateDirectories(System.String) Void RemoveItem(System.String, Boolean) System.Object RemoveItemDynamicParameters(System.String, Boolean) Void RemoveDirectoryInfoItem(System.IO.DirectoryInfo, Boolean, Boolean, Boolean) Void RemoveFileInfoItem(System.IO.FileInfo, Boolean) Void RemoveFileSystemItem(System.IO.FileSystemInfo, Boolean) Boolean ItemExists(System.String) Boolean ItemExists(System.String, System.Management.Automation.ErrorRecord ByRef) System.Object ItemExistsDynamicParameters(System.String) Boolean HasChildItems(System.String) Boolean DirectoryInfoHasChildItems(System.IO.DirectoryInfo) Void CopyItem(System.String, System.String, Boolean) Void CopyItemFromRemoteSession(System.String, System.String, Boolean, Boolean, System.Management.Automation.Runspaces.PSSession) Void CopyItemLocalOrToSession(System.String, System.String, Boolean, Boolean, System.Management.Automation.PowerShell) Void CopyDirectoryInfoItem(System.IO.DirectoryInfo, System.String, Boolean, Boolean, System.Management.Automation.PowerShell) Void CopyFileInfoItem(System.IO.FileInfo, System.String, Boolean, System.Management.Automation.PowerShell) Void CopyDirectoryFromRemoteSession(System.String, System.String, System.String, Boolean, Boolean, System.Management.Automation.PowerShell) System.Collections.ArrayList GetRemoteSourceAlternateStreams(System.Management.Automation.PowerShell, System.String) Void InitilizeFunctionPSCopyFileFromRemoteSession(System.Management.Automation.PowerShell) Void RemoveFunctionsPSCopyFileFromRemoteSession(System.Management.Automation.PowerShell) Boolean ValidRemoteSessionForScripting(System.Management.Automation.Runspaces.Runspace) System.Collections.Hashtable GetRemoteFileMetadata(System.String, System.Management.Automation.PowerShell) Void SetFileMetadata(System.String, System.IO.FileInfo, System.Management.Automation.PowerShell) Void CopyFileFromRemoteSession(System.String, System.String, System.String, Boolean, System.Management.Automation.PowerShell, Int64) Boolean PerformCopyFileFromRemoteSession(System.String, System.IO.FileInfo, System.String, Boolean, System.Management.Automation.PowerShell, Int64, Boolean, System.String) Void InitilizeFunctionsPSCopyFileToRemoteSession(System.Management.Automation.PowerShell) Void RemoveFunctionPSCopyFileToRemoteSession(System.Management.Automation.PowerShell) Boolean RemoteTargetSupportsAlternateStreams(System.Management.Automation.PowerShell, System.String) System.String MakeRemotePath(System.Management.Automation.PowerShell, System.String, System.String) Boolean RemoteDirectoryExist(System.Management.Automation.PowerShell, System.String) Boolean CopyFileStreamToRemoteSession(System.IO.FileInfo, System.String, System.Management.Automation.PowerShell, Boolean, System.String) System.Collections.Hashtable GetFileMetadata(System.IO.FileInfo) Void SetRemoteFileMetadata(System.IO.FileInfo, System.String, System.Management.Automation.PowerShell) Boolean PerformCopyFileToRemoteSession(System.IO.FileInfo, System.String, System.Management.Automation.PowerShell) Boolean RemoteDestinationPathIsFile(System.String, System.Management.Automation.PowerShell) System.String CreateDirectoryOnRemoteSession(System.String, Boolean, System.Management.Automation.PowerShell) Boolean PathIsReservedDeviceName(System.String, System.String) System.String GetParentPath(System.String, System.String) Boolean IsAbsolutePath(System.String) Boolean IsUNCPath(System.String) Boolean IsUNCRoot(System.String) Boolean IsPathRoot(System.String) System.String NormalizeRelativePath(System.String, System.String) System.String NormalizeRelativePathHelper(System.String, System.String) System.String RemoveRelativeTokens(System.String) System.String GetCommonBase(System.String, System.String) System.Collections.Generic.Stack`1[System.String] TokenizePathToStack(System.String, System.String) System.Collections.Generic.Stack`1[System.String] NormalizeThePath(System.String, System.Collections.Generic.Stack`1[System.String]) System.String CreateNormalizedRelativePathFromStack(System.Collections.Generic.Stack`1[System.String]) System.String GetChildName(System.String) System.String EnsureDriveIsRooted(System.String) Boolean IsItemContainer(System.String) Void MoveItem(System.String, System.String) Void MoveFileInfoItem(System.IO.FileInfo, System.String, Boolean, Boolean) Void MoveDirectoryInfoItem(System.IO.DirectoryInfo, System.String, Boolean) Void CopyAndDelete(System.IO.DirectoryInfo, System.String, Boolean) Boolean IsSameVolume(System.String, System.String) Void GetProperty(System.String, System.Collections.ObjectModel.Collection`1[System.String]) System.Object GetPropertyDynamicParameters(System.String, System.Collections.ObjectModel.Collection`1[System.String]) Void SetProperty(System.String, System.Management.Automation.PSObject) System.Object SetPropertyDynamicParameters(System.String, System.Management.Automation.PSObject) Void ClearProperty(System.String, System.Collections.ObjectModel.Collection`1[System.String]) System.Object ClearPropertyDynamicParameters(System.String, System.Collections.ObjectModel.Collection`1[System.String]) System.Management.Automation.Provider.IContentReader GetContentReader(System.String) System.Object GetContentReaderDynamicParameters(System.String) System.Management.Automation.Provider.IContentWriter GetContentWriter(System.String) System.Object GetContentWriterDynamicParameters(System.String) Void ClearContent(System.String) System.Object ClearContentDynamicParameters(System.String) Int32 SafeGetFileAttributes(System.String) Void ValidateParameters(Boolean) Void GetSecurityDescriptor(System.String, System.Security.AccessControl.AccessControlSections) Void SetSecurityDescriptor(System.String, System.Security.AccessControl.ObjectSecurity) Void SetSecurityDescriptor(System.String, System.Security.AccessControl.ObjectSecurity, System.Security.AccessControl.AccessControlSections) System.Security.AccessControl.ObjectSecurity NewSecurityDescriptorFromPath(System.String, System.Security.AccessControl.AccessControlSections) System.Security.AccessControl.ObjectSecurity NewSecurityDescriptorOfType(System.String, System.Security.AccessControl.AccessControlSections) System.Security.AccessControl.ObjectSecurity NewSecurityDescriptor(ItemType) System.Management.Automation.ErrorRecord CreateErrorRecord(System.String, System.String) Void .ctor() Void .cctor() System.Collections.ObjectModel.Collection`1[System.Management.Automation.WildcardPattern] excludeMatcher System.Management.Automation.PSTraceSource tracer Int32 FILETRANSFERSIZE System.String ProviderName Microsoft.PowerShell.Commands.FileSystemProvider+ItemType Microsoft.PowerShell.Commands.FileSystemProvider+NativeMethods Microsoft.PowerShell.Commands.FileSystemProvider+NetResource", - "DeclaredMethods": "System.String Mode(System.Management.Automation.PSObject) System.Object GetChildItemsDynamicParameters(System.String, Boolean) System.String NormalizePath(System.String) System.IO.FileSystemInfo GetFileSystemInfo(System.String, Boolean ByRef) Boolean IsFilterSet() System.Object GetChildNamesDynamicParameters(System.String) System.Object CopyItemDynamicParameters(System.String, System.String, Boolean) System.String GetHelpMaml(System.String, System.String) System.Management.Automation.ProviderInfo Start(System.Management.Automation.ProviderInfo) System.Management.Automation.PSDriveInfo NewDrive(System.Management.Automation.PSDriveInfo) Void MapNetworkDrive(System.Management.Automation.PSDriveInfo) Boolean IsNetworkMappedDrive(System.Management.Automation.PSDriveInfo) System.Management.Automation.PSDriveInfo RemoveDrive(System.Management.Automation.PSDriveInfo) Boolean IsSupportedDriveForPersistence(System.Management.Automation.PSDriveInfo) System.String GetUNCForNetworkDrive(System.String) System.String GetSubstitutedPathForNetworkDosDevice(System.String) System.String GetRootPathForNetworkDriveOrDosDevice(System.IO.DriveInfo) System.Collections.ObjectModel.Collection`1[System.Management.Automation.PSDriveInfo] InitializeDefaultDrives() System.Object GetItemDynamicParameters(System.String) Boolean IsValidPath(System.String) Void GetItem(System.String) System.IO.FileSystemInfo GetFileSystemItem(System.String, Boolean ByRef, Boolean) Void InvokeDefaultAction(System.String) Void GetChildItems(System.String, Boolean, UInt32) Void GetChildNames(System.String, System.Management.Automation.ReturnContainers) Boolean ConvertPath(System.String, System.String, System.String ByRef, System.String ByRef) Void GetPathItems(System.String, Boolean, UInt32, Boolean, System.Management.Automation.ReturnContainers) Void Dir(System.IO.DirectoryInfo, Boolean, UInt32, Boolean, System.Management.Automation.ReturnContainers) System.Management.Automation.FlagsExpression`1[System.IO.FileAttributes] FormatAttributeSwitchParamters() Void RenameItem(System.String, System.String) Void NewItem(System.String, System.String, System.Object) Boolean CheckItemExists(System.String, Boolean ByRef) ItemType GetItemType(System.String) Void CreateDirectory(System.String, Boolean) Boolean CreateIntermediateDirectories(System.String) Void RemoveItem(System.String, Boolean) System.Object RemoveItemDynamicParameters(System.String, Boolean) Void RemoveDirectoryInfoItem(System.IO.DirectoryInfo, Boolean, Boolean, Boolean) Void RemoveFileInfoItem(System.IO.FileInfo, Boolean) Void RemoveFileSystemItem(System.IO.FileSystemInfo, Boolean) Boolean ItemExists(System.String) Boolean ItemExists(System.String, System.Management.Automation.ErrorRecord ByRef) System.Object ItemExistsDynamicParameters(System.String) Boolean HasChildItems(System.String) Boolean DirectoryInfoHasChildItems(System.IO.DirectoryInfo) Void CopyItem(System.String, System.String, Boolean) Void CopyItemFromRemoteSession(System.String, System.String, Boolean, Boolean, System.Management.Automation.Runspaces.PSSession) Void CopyItemLocalOrToSession(System.String, System.String, Boolean, Boolean, System.Management.Automation.PowerShell) Void CopyDirectoryInfoItem(System.IO.DirectoryInfo, System.String, Boolean, Boolean, System.Management.Automation.PowerShell) Void CopyFileInfoItem(System.IO.FileInfo, System.String, Boolean, System.Management.Automation.PowerShell) Void CopyDirectoryFromRemoteSession(System.String, System.String, System.String, Boolean, Boolean, System.Management.Automation.PowerShell) System.Collections.ArrayList GetRemoteSourceAlternateStreams(System.Management.Automation.PowerShell, System.String) Void InitilizeFunctionPSCopyFileFromRemoteSession(System.Management.Automation.PowerShell) Void RemoveFunctionsPSCopyFileFromRemoteSession(System.Management.Automation.PowerShell) Boolean ValidRemoteSessionForScripting(System.Management.Automation.Runspaces.Runspace) System.Collections.Hashtable GetRemoteFileMetadata(System.String, System.Management.Automation.PowerShell) Void SetFileMetadata(System.String, System.IO.FileInfo, System.Management.Automation.PowerShell) Void CopyFileFromRemoteSession(System.String, System.String, System.String, Boolean, System.Management.Automation.PowerShell, Int64) Boolean PerformCopyFileFromRemoteSession(System.String, System.IO.FileInfo, System.String, Boolean, System.Management.Automation.PowerShell, Int64, Boolean, System.String) Void InitilizeFunctionsPSCopyFileToRemoteSession(System.Management.Automation.PowerShell) Void RemoveFunctionPSCopyFileToRemoteSession(System.Management.Automation.PowerShell) Boolean RemoteTargetSupportsAlternateStreams(System.Management.Automation.PowerShell, System.String) System.String MakeRemotePath(System.Management.Automation.PowerShell, System.String, System.String) Boolean RemoteDirectoryExist(System.Management.Automation.PowerShell, System.String) Boolean CopyFileStreamToRemoteSession(System.IO.FileInfo, System.String, System.Management.Automation.PowerShell, Boolean, System.String) System.Collections.Hashtable GetFileMetadata(System.IO.FileInfo) Void SetRemoteFileMetadata(System.IO.FileInfo, System.String, System.Management.Automation.PowerShell) Boolean PerformCopyFileToRemoteSession(System.IO.FileInfo, System.String, System.Management.Automation.PowerShell) Boolean RemoteDestinationPathIsFile(System.String, System.Management.Automation.PowerShell) System.String CreateDirectoryOnRemoteSession(System.String, Boolean, System.Management.Automation.PowerShell) Boolean PathIsReservedDeviceName(System.String, System.String) System.String GetParentPath(System.String, System.String) Boolean IsAbsolutePath(System.String) Boolean IsUNCPath(System.String) Boolean IsUNCRoot(System.String) Boolean IsPathRoot(System.String) System.String NormalizeRelativePath(System.String, System.String) System.String NormalizeRelativePathHelper(System.String, System.String) System.String RemoveRelativeTokens(System.String) System.String GetCommonBase(System.String, System.String) System.Collections.Generic.Stack`1[System.String] TokenizePathToStack(System.String, System.String) System.Collections.Generic.Stack`1[System.String] NormalizeThePath(System.String, System.Collections.Generic.Stack`1[System.String]) System.String CreateNormalizedRelativePathFromStack(System.Collections.Generic.Stack`1[System.String]) System.String GetChildName(System.String) System.String EnsureDriveIsRooted(System.String) Boolean IsItemContainer(System.String) Void MoveItem(System.String, System.String) Void MoveFileInfoItem(System.IO.FileInfo, System.String, Boolean, Boolean) Void MoveDirectoryInfoItem(System.IO.DirectoryInfo, System.String, Boolean) Void CopyAndDelete(System.IO.DirectoryInfo, System.String, Boolean) Boolean IsSameVolume(System.String, System.String) Void GetProperty(System.String, System.Collections.ObjectModel.Collection`1[System.String]) System.Object GetPropertyDynamicParameters(System.String, System.Collections.ObjectModel.Collection`1[System.String]) Void SetProperty(System.String, System.Management.Automation.PSObject) System.Object SetPropertyDynamicParameters(System.String, System.Management.Automation.PSObject) Void ClearProperty(System.String, System.Collections.ObjectModel.Collection`1[System.String]) System.Object ClearPropertyDynamicParameters(System.String, System.Collections.ObjectModel.Collection`1[System.String]) System.Management.Automation.Provider.IContentReader GetContentReader(System.String) System.Object GetContentReaderDynamicParameters(System.String) System.Management.Automation.Provider.IContentWriter GetContentWriter(System.String) System.Object GetContentWriterDynamicParameters(System.String) Void ClearContent(System.String) System.Object ClearContentDynamicParameters(System.String) Int32 SafeGetFileAttributes(System.String) Void ValidateParameters(Boolean) Void GetSecurityDescriptor(System.String, System.Security.AccessControl.AccessControlSections) Void SetSecurityDescriptor(System.String, System.Security.AccessControl.ObjectSecurity) Void SetSecurityDescriptor(System.String, System.Security.AccessControl.ObjectSecurity, System.Security.AccessControl.AccessControlSections) System.Security.AccessControl.ObjectSecurity NewSecurityDescriptorFromPath(System.String, System.Security.AccessControl.AccessControlSections) System.Security.AccessControl.ObjectSecurity NewSecurityDescriptorOfType(System.String, System.Security.AccessControl.AccessControlSections) System.Security.AccessControl.ObjectSecurity NewSecurityDescriptor(ItemType) System.Management.Automation.ErrorRecord CreateErrorRecord(System.String, System.String)", - "DeclaredNestedTypes": "Microsoft.PowerShell.Commands.FileSystemProvider+ItemType Microsoft.PowerShell.Commands.FileSystemProvider+NativeMethods Microsoft.PowerShell.Commands.FileSystemProvider+NetResource", - "DeclaredProperties": "", - "ImplementedInterfaces": "System.Management.Automation.IResourceSupplier System.Management.Automation.Provider.IContentCmdletProvider System.Management.Automation.Provider.IPropertyCmdletProvider System.Management.Automation.Provider.ISecurityDescriptorCmdletProvider System.Management.Automation.Provider.ICmdletProviderSupportsHelp", - "TypeInitializer": "Void .cctor()", - "IsNested": false, - "Attributes": 1048833, - "IsVisible": true, - "IsNotPublic": false, - "IsPublic": true, - "IsNestedPublic": false, - "IsNestedPrivate": false, - "IsNestedFamily": false, - "IsNestedAssembly": false, - "IsNestedFamANDAssem": false, - "IsNestedFamORAssem": false, - "IsAutoLayout": true, - "IsLayoutSequential": false, - "IsExplicitLayout": false, - "IsClass": true, - "IsInterface": false, - "IsValueType": false, - "IsAbstract": false, - "IsSealed": true, - "IsSpecialName": false, - "IsImport": false, - "IsSerializable": false, - "IsAnsiClass": true, - "IsUnicodeClass": false, - "IsAutoClass": false, - "IsArray": false, - "IsByRef": false, - "IsPointer": false, - "IsPrimitive": false, - "IsCOMObject": false, - "HasElementType": false, - "IsContextful": false, - "IsMarshalByRef": false, - "GenericTypeArguments": "", - "CustomAttributes": "[System.Management.Automation.Provider.CmdletProviderAttribute(\"FileSystem\", (System.Management.Automation.Provider.ProviderCapabilities)52)] [System.Management.Automation.OutputTypeAttribute(typeof(System.Security.AccessControl.FileSecurity), ProviderCmdlet = \"Set-Acl\")] [System.Management.Automation.OutputTypeAttribute(new Type[2] { typeof(System.String), typeof(System.Management.Automation.PathInfo) }, ProviderCmdlet = \"Resolve-Path\")] [System.Management.Automation.OutputTypeAttribute(typeof(System.Management.Automation.PathInfo), ProviderCmdlet = \"Push-Location\")] [System.Management.Automation.OutputTypeAttribute(new Type[2] { typeof(System.Byte), typeof(System.String) }, ProviderCmdlet = \"Get-Content\")] [System.Management.Automation.OutputTypeAttribute(typeof(System.IO.FileInfo), ProviderCmdlet = \"Get-Item\")] [System.Management.Automation.OutputTypeAttribute(new Type[2] { typeof(System.IO.FileInfo), typeof(System.IO.DirectoryInfo) }, ProviderCmdlet = \"Get-ChildItem\")] [System.Management.Automation.OutputTypeAttribute(new Type[2] { typeof(System.Security.AccessControl.FileSecurity), typeof(System.Security.AccessControl.DirectorySecurity) }, ProviderCmdlet = \"Get-Acl\")] [System.Management.Automation.OutputTypeAttribute(new Type[4] { typeof(System.Boolean), typeof(System.String), typeof(System.IO.FileInfo), typeof(System.IO.DirectoryInfo) }, ProviderCmdlet = \"Get-Item\")] [System.Management.Automation.OutputTypeAttribute(new Type[5] { typeof(System.Boolean), typeof(System.String), typeof(System.DateTime), typeof(System.IO.FileInfo), typeof(System.IO.DirectoryInfo) }, ProviderCmdlet = \"Get-ItemProperty\")] [System.Management.Automation.OutputTypeAttribute(new Type[2] { typeof(System.String), typeof(System.IO.FileInfo) }, ProviderCmdlet = \"New-Item\")]" - }, - "HelpFile": "System.Management.Automation.dll-Help.xml", - "Name": "FileSystem", - "PSSnapIn": { - "Name": "Microsoft.PowerShell.Core", - "IsDefault": true, - "ApplicationBase": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0", - "AssemblyName": "System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, ProcessorArchitecture=MSIL", - "ModuleName": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\System.Management.Automation.dll", - "PSVersion": "5.1.17763.1490", - "Version": "3.0.0.0", - "Types": "types.ps1xml typesv3.ps1xml", - "Formats": "Certificate.format.ps1xml DotNetTypes.format.ps1xml FileSystem.format.ps1xml Help.format.ps1xml HelpV3.format.ps1xml PowerShellCore.format.ps1xml PowerShellTrace.format.ps1xml Registry.format.ps1xml", - "Description": "This Windows PowerShell snap-in contains cmdlets used to manage components of Windows PowerShell.", - "Vendor": "Microsoft Corporation", - "LogPipelineExecutionDetails": false - }, - "ModuleName": "Microsoft.PowerShell.Core", - "Module": null, - "Description": "", - "Capabilities": 52, - "Home": "C:\\Users\\Administrator", - "Drives": [ - "C" - ] - }, - "PSIsContainer": false, - "Mode": "-a----", - "VersionInfo": { - "Comments": null, - "CompanyName": null, - "FileBuildPart": 0, - "FileDescription": null, - "FileMajorPart": 0, - "FileMinorPart": 0, - "FileName": "C:\\test.txt", - "FilePrivatePart": 0, - "FileVersion": null, - "InternalName": null, - "IsDebug": false, - "IsPatched": false, - "IsPrivateBuild": false, - "IsPreRelease": false, - "IsSpecialBuild": false, - "Language": null, - "LegalCopyright": null, - "LegalTrademarks": null, - "OriginalFilename": null, - "PrivateBuild": null, - "ProductBuildPart": 0, - "ProductMajorPart": 0, - "ProductMinorPart": 0, - "ProductName": null, - "ProductPrivatePart": 0, - "ProductVersion": null, - "SpecialBuild": null, - "FileVersionRaw": { - "Major": 0, - "Minor": 0, - "Build": 0, - "Revision": 0, - "MajorRevision": 0, - "MinorRevision": 0 - }, - "ProductVersionRaw": { - "Major": 0, - "Minor": 0, - "Build": 0, - "Revision": 0, - "MajorRevision": 0, - "MinorRevision": 0 - } - }, - "BaseName": "test", - "Target": [ - - ], - "LinkType": null -} \ No newline at end of file diff --git a/_motor/providers/winrm/cat/testdata/winrm.toml b/_motor/providers/winrm/cat/testdata/winrm.toml deleted file mode 100644 index 2b5b2a4a04..0000000000 --- a/_motor/providers/winrm/cat/testdata/winrm.toml +++ /dev/null @@ -1,200 +0,0 @@ -[commands."wmic os get * /format:csv"] -stdout = """Node,BootDevice,BuildNumber,BuildType,Caption,CodeSet,CountryCode,CreationClassName,CSCreationClassName,CSDVersion,CSName,CurrentTimeZone,DataExecutionPrevention_32BitApplications,DataExecutionPrevention_Available,DataExecutionPrevention_Drivers,DataExecutionPrevention_SupportPolicy,Debug,Description,Distributed,EncryptionLevel,ForegroundApplicationBoost,FreePhysicalMemory,FreeSpaceInPagingFiles,FreeVirtualMemory,InstallDate,LargeSystemCache,LastBootUpTime,LocalDateTime,Locale,Manufacturer,MaxNumberOfProcesses,MaxProcessMemorySize,MUILanguages,Name,NumberOfLicensedUsers,NumberOfProcesses,NumberOfUsers,OperatingSystemSKU,Organization,OSArchitecture,OSLanguage,OSProductSuite,OSType,OtherTypeDescription,PAEEnabled,PlusProductID,PlusVersionNumber,PortableOperatingSystem,Primary,ProductType,RegisteredUser,SerialNumber,ServicePackMajorVersion,ServicePackMinorVersion,SizeStoredInPagingFiles,Status,SuiteMask,SystemDevice,SystemDirectory,SystemDrive,TotalSwapSpaceSize,TotalVirtualMemorySize,TotalVisibleMemorySize,Version,WindowsDirectory -EC2AMAZ-N68EMTI,\\Device\\HarddiskVolume1,17763,Multiprocessor Free,Microsoft Windows Server 2019 Datacenter,1252,1,Win32_OperatingSystem,Win32_ComputerSystem,,EC2AMAZ-N68EMTI,0,TRUE,TRUE,TRUE,3,FALSE,,FALSE,256,2,252024,583528,950224,20201024075949.000000+000,,20201024083542.500000+000,20201025092404.635000+000,0409,Microsoft Corporation,4294967295,137438953344,{en-US},Microsoft Windows Server 2019 Datacenter|C:\\Windows|\\Device\\Harddisk0\\Partition1,0,66,2,8,Amazon.com,64-bit,1033,400,18,,,,,FALSE,TRUE,3,EC2,00430-00000-00000-AA875,0,0,1048576,OK,400,\\Device\\HarddiskVolume1,C:\\Windows\\system32,C:,,2096752,1048176,10.0.17763,C:\\Windows -""" - -[commands."powershell -c \"Get-ItemProperty -Path 'HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion' -Name CurrentBuild, UBR, EditionID | ConvertTo-Json\""] -stdout=""" -{ - "CurrentBuild": "17763", - "EditionID": "ServerDatacenter", - "UBR": 1518 -} -""" - -[commands."powershell -c \"Get-WmiObject Win32_ComputerSystemProduct | Select-Object -ExpandProperty UUID\""] -stdout="EC2670D2-3D6E-2F4A-5C32-42C5931E1E1E" - -[commands."powershell -c \"Get-Content 'C:\\test.txt'\""] -stdout=""" -hi -""" - -[commands."powershell -c \"Get-Item -LiteralPath 'C:\\test.txt' | ConvertTo-JSON\""] -stdout=""" -{ - "Name": "test.txt", - "Length": 2, - "DirectoryName": "C:\\\\", - "Directory": { - "Name": "C:\\\\", - "FullName": "C:\\\\", - "Parent": null, - "Exists": true, - "Root": { - "Name": "C:\\\\", - "FullName": "C:\\\\", - "Parent": null, - "Exists": true, - "Root": "C:\\\\", - "Extension": "", - "CreationTime": "\\/Date(1536991766317)\\/", - "CreationTimeUtc": "\\/Date(1536991766317)\\/", - "LastAccessTime": "\\/Date(1603529613315)\\/", - "LastAccessTimeUtc": "\\/Date(1603529613315)\\/", - "LastWriteTime": "\\/Date(1603529613315)\\/", - "LastWriteTimeUtc": "\\/Date(1603529613315)\\/", - "Attributes": 22 - }, - "Extension": "", - "CreationTime": "\\/Date(1536991766317)\\/", - "CreationTimeUtc": "\\/Date(1536991766317)\\/", - "LastAccessTime": "\\/Date(1603529613315)\\/", - "LastAccessTimeUtc": "\\/Date(1603529613315)\\/", - "LastWriteTime": "\\/Date(1603529613315)\\/", - "LastWriteTimeUtc": "\\/Date(1603529613315)\\/", - "Attributes": 22 - }, - "IsReadOnly": false, - "Exists": true, - "FullName": "C:\\\\test.txt", - "Extension": ".txt", - "CreationTime": "\\/Date(1603529613252)\\/", - "CreationTimeUtc": "\\/Date(1603529613252)\\/", - "LastAccessTime": "\\/Date(1603529613315)\\/", - "LastAccessTimeUtc": "\\/Date(1603529613315)\\/", - "LastWriteTime": "\\/Date(1603529613315)\\/", - "LastWriteTimeUtc": "\\/Date(1603529613315)\\/", - "Attributes": 32, - "Mode": "-a----", - "VersionInfo": { - "Comments": null, - "CompanyName": null, - "FileBuildPart": 0, - "FileDescription": null, - "FileMajorPart": 0, - "FileMinorPart": 0, - "FileName": "C:\\\\test.txt", - "FilePrivatePart": 0, - "FileVersion": null, - "InternalName": null, - "IsDebug": false, - "IsPatched": false, - "IsPrivateBuild": false, - "IsPreRelease": false, - "IsSpecialBuild": false, - "Language": null, - "LegalCopyright": null, - "LegalTrademarks": null, - "OriginalFilename": null, - "PrivateBuild": null, - "ProductBuildPart": 0, - "ProductMajorPart": 0, - "ProductMinorPart": 0, - "ProductName": null, - "ProductPrivatePart": 0, - "ProductVersion": null, - "SpecialBuild": null, - "FileVersionRaw": { - "Major": 0, - "Minor": 0, - "Build": 0, - "Revision": 0, - "MajorRevision": 0, - "MinorRevision": 0 - }, - "ProductVersionRaw": { - "Major": 0, - "Minor": 0, - "Build": 0, - "Revision": 0, - "MajorRevision": 0, - "MinorRevision": 0 - } - }, - "BaseName": "test", - "Target": [], - "LinkType": null -} -""" - -[commands."powershell -c \"Get-Item -LiteralPath 'C:\\Windows' | ConvertTo-JSON\""] -stdout=""" -{ - "Name": "Windows", - "FullName": "C:\\\\Windows", - "Parent": { - "Name": "C:\\\\", - "FullName": "C:\\\\", - "Parent": null, - "Exists": true, - "Root": { - "Name": "C:\\\\", - "FullName": "C:\\\\", - "Parent": null, - "Exists": true, - "Root": "C:\\\\", - "Extension": "", - "CreationTime": "\\/Date(1536991766317)\\/", - "CreationTimeUtc": "\\/Date(1536991766317)\\/", - "LastAccessTime": "\\/Date(1603529613315)\\/", - "LastAccessTimeUtc": "\\/Date(1603529613315)\\/", - "LastWriteTime": "\\/Date(1603529613315)\\/", - "LastWriteTimeUtc": "\\/Date(1603529613315)\\/", - "Attributes": 22 - }, - "Extension": "", - "CreationTime": "\\/Date(1536991766317)\\/", - "CreationTimeUtc": "\\/Date(1536991766317)\\/", - "LastAccessTime": "\\/Date(1603529613315)\\/", - "LastAccessTimeUtc": "\\/Date(1603529613315)\\/", - "LastWriteTime": "\\/Date(1603529613315)\\/", - "LastWriteTimeUtc": "\\/Date(1603529613315)\\/", - "Attributes": 22 - }, - "Exists": true, - "Root": { - "Name": "C:\\\\", - "FullName": "C:\\\\", - "Parent": null, - "Exists": true, - "Root": { - "Name": "C:\\\\", - "FullName": "C:\\\\", - "Parent": null, - "Exists": true, - "Root": "C:\\\\", - "Extension": "", - "CreationTime": "\\/Date(1536991766317)\\/", - "CreationTimeUtc": "\\/Date(1536991766317)\\/", - "LastAccessTime": "\\/Date(1603529613315)\\/", - "LastAccessTimeUtc": "\\/Date(1603529613315)\\/", - "LastWriteTime": "\\/Date(1603529613315)\\/", - "LastWriteTimeUtc": "\\/Date(1603529613315)\\/", - "Attributes": 22 - }, - "Extension": "", - "CreationTime": "\\/Date(1536991766317)\\/", - "CreationTimeUtc": "\\/Date(1536991766317)\\/", - "LastAccessTime": "\\/Date(1603529613315)\\/", - "LastAccessTimeUtc": "\\/Date(1603529613315)\\/", - "LastWriteTime": "\\/Date(1603529613315)\\/", - "LastWriteTimeUtc": "\\/Date(1603529613315)\\/", - "Attributes": 22 - }, - "Extension": "", - "CreationTime": "\\/Date(1536991766473)\\/", - "CreationTimeUtc": "\\/Date(1536991766473)\\/", - "LastAccessTime": "\\/Date(1603526263397)\\/", - "LastAccessTimeUtc": "\\/Date(1603526263397)\\/", - "LastWriteTime": "\\/Date(1603526263319)\\/", - "LastWriteTimeUtc": "\\/Date(1603526263319)\\/", - "Attributes": 16, - "Mode": "d-----", - "BaseName": "Windows", - "Target": [ - - ], - "LinkType": null -} -""" diff --git a/_motor/providers/winrm/cat/winstat.go b/_motor/providers/winrm/cat/winstat.go deleted file mode 100644 index ec125c4656..0000000000 --- a/_motor/providers/winrm/cat/winstat.go +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package cat - -// this implementation is derived from golang's internal stat implementation -// Golang licensed BSD-style license https://github.com/golang/go/blob/master/LICENSE -// see https://github.com/golang/go/blob/5d1a95175e693f5be0bc31ae9e6a7873318925eb/src/syscall/types_windows.go - -import ( - "os" - "time" - - "github.com/rs/zerolog/log" -) - -const ( - FILE_SHARE_READ = 0x00000001 - FILE_SHARE_WRITE = 0x00000002 - FILE_SHARE_DELETE = 0x00000004 - FILE_ATTRIBUTE_READONLY = 0x00000001 - FILE_ATTRIBUTE_HIDDEN = 0x00000002 - FILE_ATTRIBUTE_SYSTEM = 0x00000004 - FILE_ATTRIBUTE_DIRECTORY = 0x00000010 - FILE_ATTRIBUTE_ARCHIVE = 0x00000020 - FILE_ATTRIBUTE_NORMAL = 0x00000080 - FILE_ATTRIBUTE_REPARSE_POINT = 0x00000400 - - INVALID_FILE_ATTRIBUTES = 0xffffffff - - CREATE_NEW = 1 - CREATE_ALWAYS = 2 - OPEN_EXISTING = 3 - OPEN_ALWAYS = 4 - TRUNCATE_EXISTING = 5 - - FILE_FLAG_OPEN_REPARSE_POINT = 0x00200000 - FILE_FLAG_BACKUP_SEMANTICS = 0x02000000 - FILE_FLAG_OVERLAPPED = 0x40000000 -) - -const ( - FSCTL_GET_REPARSE_POINT = 0x900A8 - MAXIMUM_REPARSE_DATA_BUFFER_SIZE = 16 * 1024 - _IO_REPARSE_TAG_MOUNT_POINT = 0xA0000003 - IO_REPARSE_TAG_SYMLINK = 0xA000000C - SYMBOLIC_LINK_FLAG_DIRECTORY = 0x1 - _SYMLINK_FLAG_RELATIVE = 1 -) - -const ( - FILE_TYPE_CHAR = 0x0002 - FILE_TYPE_DISK = 0x0001 - FILE_TYPE_PIPE = 0x0003 - FILE_TYPE_REMOTE = 0x8000 - FILE_TYPE_UNKNOWN = 0x0000 -) - -const ( - FSCTL_SET_REPARSE_POINT = 0x000900A4 - IO_REPARSE_TAG_MOUNT_POINT = 0xA0000003 - SYMLINK_FLAG_RELATIVE = 1 -) - -type Win32FileAttributeData struct { - FileAttributes uint32 - CreationTime *time.Time - LastAccessTime *time.Time - LastWriteTime *time.Time - FileSize int64 -} - -// A fileStat is the implementation of FileInfo returned by Stat and Lstat. -type fileStat struct { - name string - - // from ByHandleFileInformation, Win32FileAttributeData and Win32finddata - FileAttributes uint32 - CreationTime *time.Time - LastAccessTime *time.Time - LastWriteTime *time.Time - FileSize int64 - - // from Win32finddata - Reserved0 uint32 - - // what syscall.GetFileType returns - filetype uint32 -} - -// devNullStat is fileStat structure describing DevNull file ("NUL"). -var devNullStat = fileStat{ - name: os.DevNull, -} - -func (fs *fileStat) Name() string { return fs.name } -func (fs *fileStat) IsDir() bool { return fs.Mode().IsDir() } - -func (fs *fileStat) isSymlink() bool { - // Use instructions described at - // https://blogs.msdn.microsoft.com/oldnewthing/20100212-00/?p=14963/ - // to recognize whether it's a symlink. - if fs.FileAttributes&FILE_ATTRIBUTE_REPARSE_POINT == 0 { - return false - } - return fs.Reserved0 == IO_REPARSE_TAG_SYMLINK || - fs.Reserved0 == IO_REPARSE_TAG_MOUNT_POINT -} - -func (fs *fileStat) Size() int64 { - return fs.FileSize -} - -func (fs *fileStat) Mode() (m os.FileMode) { - if fs == &devNullStat { - return os.ModeDevice | os.ModeCharDevice | 0666 - } - if fs.FileAttributes&FILE_ATTRIBUTE_READONLY != 0 { - m |= 0444 - } else { - m |= 0666 - } - if fs.isSymlink() { - return m | os.ModeSymlink - } - if fs.FileAttributes&FILE_ATTRIBUTE_DIRECTORY != 0 { - m |= os.ModeDir | 0111 - } - switch fs.filetype { - case FILE_TYPE_PIPE: - m |= os.ModeNamedPipe - case FILE_TYPE_CHAR: - m |= os.ModeDevice | os.ModeCharDevice - } - return m -} - -func (fs *fileStat) ModTime() time.Time { - if fs.LastWriteTime != nil { - return *fs.LastWriteTime - } - log.Error().Str("file", fs.name).Msg("could not determine mod time") - return time.Time{} -} - -// Sys returns Win32FileAttributeData for file fs. -func (fs *fileStat) Sys() interface{} { - return &Win32FileAttributeData{ - FileAttributes: fs.FileAttributes, - CreationTime: fs.CreationTime, - LastAccessTime: fs.LastAccessTime, - LastWriteTime: fs.LastWriteTime, - FileSize: fs.FileSize, - } -} diff --git a/_motor/providers/winrm/provider.go b/_motor/providers/winrm/provider.go deleted file mode 100644 index d9f14b30c2..0000000000 --- a/_motor/providers/winrm/provider.go +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright (c) Mondoo, Inc. -// SPDX-License-Identifier: BUSL-1.1 - -package winrm - -import ( - "bytes" - "errors" - "os" - "time" - - "github.com/masterzen/winrm" - "github.com/rs/zerolog/log" - "github.com/spf13/afero" - "go.mondoo.com/cnquery/v9/motor/providers" - os_provider "go.mondoo.com/cnquery/v9/motor/providers/os" - "go.mondoo.com/cnquery/v9/motor/providers/winrm/cat" - "go.mondoo.com/cnquery/v9/motor/vault" -) - -var _ providers.Instance = (*Provider)(nil) - -func VerifyConfig(pCfg *providers.Config) (*winrm.Endpoint, error) { - if pCfg.Backend != providers.ProviderType_WINRM { - return nil, errors.New("only winrm backend for winrm transport supported") - } - - winrmEndpoint := &winrm.Endpoint{ - Host: pCfg.Host, - Port: int(pCfg.Port), - Insecure: pCfg.Insecure, - HTTPS: true, - Timeout: time.Duration(0), - } - - return winrmEndpoint, nil -} - -func DefaultConfig(endpoint *winrm.Endpoint) *winrm.Endpoint { - // use default port if port is 0 - if endpoint.Port <= 0 { - endpoint.Port = 5986 - } - - if endpoint.Port == 5985 { - log.Warn().Msg("winrm port 5985 is using http communication instead of https, passwords are not encrypted") - endpoint.HTTPS = false - } - - if os.Getenv("WINRM_DISABLE_HTTPS") == "true" { - log.Warn().Msg("WINRM_DISABLE_HTTPS is set, winrm is using http communication instead of https, passwords are not encrypted") - endpoint.HTTPS = false - } - - return endpoint -} - -// New creates a winrm client and establishes a connection to verify the connection -func New(pCfg *providers.Config) (*Provider, error) { - // ensure all required configs are set - winrmEndpoint, err := VerifyConfig(pCfg) - if err != nil { - return nil, err - } - - // set default config if required - winrmEndpoint = DefaultConfig(winrmEndpoint) - - params := winrm.DefaultParameters - params.TransportDecorator = func() winrm.Transporter { return &winrm.ClientNTLM{} } - - // search for password secret - c, err := vault.GetPassword(pCfg.Credentials) - if err != nil { - return nil, errors.New("missing password for winrm transport") - } - - client, err := winrm.NewClientWithParameters(winrmEndpoint, c.User, string(c.Secret), params) - if err != nil { - return nil, err - } - - // test connection - log.Debug().Str("user", c.User).Str("host", pCfg.Host).Msg("winrm> connecting to remote shell via WinRM") - shell, err := client.CreateShell() - if err != nil { - return nil, err - } - - err = shell.Close() - if err != nil { - return nil, err - } - - log.Debug().Msg("winrm> connection established") - return &Provider{ - Endpoint: winrmEndpoint, - Client: client, - kind: pCfg.Kind, - runtime: pCfg.Runtime, - }, nil -} - -type Provider struct { - Endpoint *winrm.Endpoint - Client *winrm.Client - kind providers.Kind - runtime string - fs afero.Fs -} - -func (p *Provider) RunCommand(command string) (*os_provider.Command, error) { - log.Debug().Str("command", command).Str("provider", "winrm").Msg("winrm> run command") - - stdoutBuffer := &bytes.Buffer{} - stderrBuffer := &bytes.Buffer{} - - mcmd := &os_provider.Command{ - Command: command, - Stdout: stdoutBuffer, - Stderr: stderrBuffer, - } - - // Note: winrm does not return err of the command was executed with a non-zero exit code - exitCode, err := p.Client.Run(command, stdoutBuffer, stderrBuffer) - if err != nil { - log.Error().Err(err).Str("command", command).Msg("could not execute winrm command") - return mcmd, err - } - - mcmd.ExitStatus = exitCode - return mcmd, nil -} - -func (p *Provider) FileInfo(path string) (os_provider.FileInfoDetails, error) { - fs := p.FS() - afs := &afero.Afero{Fs: fs} - stat, err := afs.Stat(path) - if err != nil { - return os_provider.FileInfoDetails{}, err - } - - uid := int64(-1) - gid := int64(-1) - mode := stat.Mode() - - return os_provider.FileInfoDetails{ - Mode: os_provider.FileModeDetails{mode}, - Size: stat.Size(), - Uid: uid, - Gid: gid, - }, nil -} - -func (p *Provider) FS() afero.Fs { - if p.fs == nil { - p.fs = cat.New(p) - } - return p.fs -} - -func (p *Provider) Close() { - // nothing to do yet -} - -func (p *Provider) Capabilities() providers.Capabilities { - return providers.Capabilities{ - providers.Capability_RunCommand, - providers.Capability_File, - } -} - -func (p *Provider) Kind() providers.Kind { - return p.kind -} - -func (p *Provider) Runtime() string { - return p.runtime -} - -func (p *Provider) PlatformIdDetectors() []providers.PlatformIdDetector { - return []providers.PlatformIdDetector{ - providers.HostnameDetector, - providers.CloudDetector, - } -} From dd11c7494bc590b3921687b043503cc859971964 Mon Sep 17 00:00:00 2001 From: Dominik Richter Date: Fri, 12 Jan 2024 09:47:49 -0800 Subject: [PATCH 03/11] =?UTF-8?q?=F0=9F=8C=9F=20v10=20bump?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Dominik Richter --- .goreleaser.yml | 6 ++-- Makefile | 4 +-- apps/cnquery/cmd/bundle.go | 12 +++---- apps/cnquery/cmd/login.go | 12 +++---- apps/cnquery/cmd/logout.go | 10 +++--- apps/cnquery/cmd/plugin.go | 26 +++++++-------- apps/cnquery/cmd/providers.go | 6 ++-- apps/cnquery/cmd/root.go | 14 ++++---- apps/cnquery/cmd/run.go | 10 +++--- apps/cnquery/cmd/sbom.go | 22 ++++++------- apps/cnquery/cmd/scan.go | 26 +++++++-------- apps/cnquery/cmd/shell.go | 20 ++++++------ apps/cnquery/cmd/status.go | 18 +++++------ apps/cnquery/cmd/vault.go | 4 +-- apps/cnquery/cmd/version.go | 2 +- apps/cnquery/cnquery.go | 6 ++-- apps/gen-docs/main.go | 2 +- .../provider-scaffold_test.go | 2 +- .../template/config/config.go.template | 2 +- .../connection/connection.go.template | 2 +- .../template/gen/main.go.template | 2 +- .../template/main.go.template | 4 +-- .../template/provider/provider.go.template | 8 ++--- checksums/bench/checksum_test.go | 2 +- cli/components/assetlist.go | 4 +-- cli/components/assetselect.go | 2 +- cli/config/config.go | 6 ++-- cli/inventoryloader/inventory.go | 6 ++-- cli/printer/mql.go | 8 ++--- cli/printer/printer.go | 4 +-- cli/printer/printer_test.go | 8 ++--- cli/progress/multiprogress.go | 6 ++-- cli/progress/progress.go | 4 +-- cli/progress/renderer.go | 2 +- cli/providers/providers.go | 12 +++---- cli/reporter/cli.go | 8 ++--- cli/reporter/csv.go | 8 ++--- cli/reporter/csv_test.go | 4 +-- cli/reporter/json.go | 6 ++-- cli/reporter/json_test.go | 6 ++-- cli/reporter/reporter.go | 10 +++--- cli/shell/completer.go | 6 ++-- cli/shell/shell.go | 24 +++++++------- cli/shell/shell_test.go | 4 +-- cli/theme/os_colors.go | 4 +-- cli/theme/os_colors_windows.go | 4 +-- cli/theme/theme.go | 4 +-- explorer/bundle.go | 12 +++---- explorer/bundle_test.go | 6 ++-- explorer/cnquery_explorer.pb.go | 4 +-- explorer/cnquery_explorer.proto | 2 +- explorer/datalake.go | 4 +-- explorer/executor/executor.go | 12 +++---- explorer/executor/mustcompile.go | 8 ++--- explorer/filters.go | 6 ++-- explorer/filters_test.go | 4 +-- explorer/impact.go | 2 +- explorer/mquery.go | 14 ++++---- explorer/mquery_test.go | 6 ++-- explorer/property.go | 12 +++---- explorer/query_conductor.go | 10 +++--- explorer/query_conductor_test.go | 6 ++-- explorer/query_hub.go | 6 ++-- explorer/querypack.go | 6 ++-- explorer/report.go | 2 +- explorer/scan/cnquery_explorer_scan.pb.go | 4 +-- explorer/scan/cnquery_explorer_scan.proto | 2 +- explorer/scan/fetcher.go | 8 ++--- explorer/scan/local_scanner.go | 32 +++++++++---------- explorer/scan/reporter.go | 6 ++-- explorer/scan/scan.go | 10 +++--- explorer/services.go | 2 +- go.mod | 2 +- internal/datalakes/inmemory/assets.go | 2 +- internal/datalakes/inmemory/inmemory.go | 4 +-- .../datalakes/inmemory/query_conductor.go | 8 ++--- internal/datalakes/inmemory/query_hub.go | 4 +-- llx/builtin.go | 4 +-- llx/builtin_array.go | 4 +-- llx/builtin_global.go | 2 +- llx/builtin_map.go | 2 +- llx/builtin_resource.go | 2 +- llx/builtin_semver.go | 2 +- llx/builtin_simple.go | 2 +- llx/chunk.go | 4 +-- llx/code.go | 4 +-- llx/data_conversions.go | 2 +- llx/llx.go | 6 ++-- llx/llx.proto | 2 +- llx/primitives.go | 2 +- llx/primitives_test.go | 4 +-- llx/rawdata.go | 2 +- llx/rawdata_deref.go | 2 +- llx/rawdata_json.go | 4 +-- llx/rawdata_json_test.go | 2 +- llx/rawdata_test.go | 2 +- llx/runtime.go | 2 +- llx/types.go | 2 +- logger/cliwriter.go | 2 +- mql/internal/builder.go | 4 +-- mql/internal/builder_test.go | 4 +-- mql/internal/collector.go | 2 +- mql/internal/execution_manager.go | 2 +- mql/internal/graph.go | 2 +- mql/internal/nodes.go | 4 +-- mql/internal/nodes_test.go | 4 +-- mql/mql.go | 8 ++--- mql/mql_test.go | 10 +++--- mqlc/assertion.go | 6 ++-- mqlc/builtin.go | 8 ++--- mqlc/builtin_array.go | 6 ++-- mqlc/builtin_map.go | 6 ++-- mqlc/builtin_resource.go | 10 +++--- mqlc/builtin_simple.go | 6 ++-- mqlc/checksum_test.go | 2 +- mqlc/invariants.go | 4 +-- mqlc/labels.go | 4 +-- mqlc/labels_test.go | 4 +-- mqlc/mqlc.go | 12 +++---- mqlc/mqlc_stats.go | 4 +-- mqlc/mqlc_test.go | 12 +++---- mqlc/operators.go | 6 ++-- mqlc/parser/parser_test.go | 2 +- .../inventory/ansibleinventory/inventory.go | 4 +-- .../ansibleinventory/inventory_test.go | 6 ++-- .../v1/inventory/domainlist/domainlist.go | 2 +- providers-sdk/v1/inventory/inventory.go | 4 +-- providers-sdk/v1/inventory/inventory.pb.go | 4 +-- providers-sdk/v1/inventory/inventory.proto | 2 +- providers-sdk/v1/inventory/inventory_test.go | 2 +- .../v1/inventory/manager/credentials_query.go | 12 +++---- .../manager/credentials_query_test.go | 10 +++--- providers-sdk/v1/inventory/manager/manager.go | 14 ++++---- providers-sdk/v1/lr/cli/cmd/docs.go | 4 +-- providers-sdk/v1/lr/cli/cmd/docs_test.go | 2 +- providers-sdk/v1/lr/cli/cmd/go.go | 4 +-- providers-sdk/v1/lr/cli/cmd/markdown.go | 6 ++-- providers-sdk/v1/lr/cli/cmd/parse.go | 2 +- providers-sdk/v1/lr/cli/main.go | 4 +-- providers-sdk/v1/lr/collector.go | 2 +- providers-sdk/v1/lr/docs/docs.go | 2 +- providers-sdk/v1/lr/go.go | 10 +++--- providers-sdk/v1/lr/schema.go | 4 +-- providers-sdk/v1/lr/schema_test.go | 4 +-- providers-sdk/v1/plugin/gen/gen.go | 2 +- providers-sdk/v1/plugin/plugin.go | 2 +- providers-sdk/v1/plugin/plugin.pb.go | 6 ++-- providers-sdk/v1/plugin/plugin.proto | 2 +- providers-sdk/v1/plugin/runtime.go | 8 ++--- providers-sdk/v1/plugin/start.go | 2 +- providers-sdk/v1/resources/resources.proto | 2 +- providers-sdk/v1/sysinfo/sysinfo.go | 16 +++++----- .../v1/testutils/mockprovider/mockprovider.go | 8 ++--- .../testutils/mockprovider/resources/all.go | 4 +-- .../mockprovider/resources/mockprovider.lr | 4 +-- .../mockprovider/resources/mockprovider.lr.go | 6 ++-- providers-sdk/v1/testutils/testdata/arch.json | 2 +- .../v1/testutils/testdata/kubelet-aks.json | 2 +- .../v1/testutils/testdata/kubelet-eks.json | 2 +- .../v1/testutils/testdata/kubelet.json | 2 +- providers-sdk/v1/testutils/testutils.go | 30 ++++++++--------- providers-sdk/v1/upstream/gql/client.go | 2 +- providers-sdk/v1/upstream/gql/conversion.go | 2 +- providers-sdk/v1/upstream/health/errors.go | 4 +-- providers-sdk/v1/upstream/health/health.proto | 2 +- providers-sdk/v1/upstream/mvd/cvss/cvss.proto | 2 +- providers-sdk/v1/upstream/mvd/mvd.go | 2 +- providers-sdk/v1/upstream/mvd/mvd.pb.go | 2 +- providers-sdk/v1/upstream/mvd/mvd.proto | 2 +- providers-sdk/v1/upstream/sts.go | 2 +- providers-sdk/v1/upstream/upstream.go | 2 +- providers-sdk/v1/upstream/upstream.proto | 2 +- providers-sdk/v1/util/configure/configure.go | 20 ++++++------ providers-sdk/v1/util/defaults/defaults.go | 6 ++-- providers-sdk/v1/util/version/version.go | 8 ++--- .../vault/awsparameterstore/parameterstore.go | 2 +- .../awsparameterstore/parameterstore_test.go | 2 +- .../vault/awssecretsmanager/secretsmanager.go | 2 +- .../awssecretsmanager/secretsmanager_test.go | 2 +- providers-sdk/v1/vault/cache/cached_vault.go | 2 +- .../v1/vault/config/vaultconfigstore.go | 16 +++++----- .../v1/vault/config/vaultconfigstore_test.go | 2 +- .../credentials_resolver.go | 4 +-- providers-sdk/v1/vault/gcpberglas/berglas.go | 4 +-- .../v1/vault/gcpberglas/berglas_test.go | 2 +- .../vault/gcpsecretmanager/secretmanager.go | 4 +-- .../gcpsecretmanager/secretmanager_test.go | 2 +- .../v1/vault/hashivault/hashivault.go | 2 +- .../v1/vault/hashivault/hashivault_test.go | 2 +- providers-sdk/v1/vault/inmemory/inmemory.go | 2 +- .../v1/vault/inmemory/inmemory_test.go | 2 +- providers-sdk/v1/vault/keyring/keyring.go | 2 +- .../v1/vault/keyring/keyring_test.go | 2 +- providers-sdk/v1/vault/mock/mock_vault.go | 2 +- .../v1/vault/multivault/multivault.go | 2 +- .../v1/vault/multivault/multivault_test.go | 4 +-- providers-sdk/v1/vault/vault.proto | 2 +- providers/arista/config/config.go | 4 +-- providers/arista/connection/connection.go | 4 +-- providers/arista/gen/main.go | 4 +-- providers/arista/go.mod | 6 ++-- providers/arista/main.go | 4 +-- providers/arista/provider/provider.go | 16 +++++----- providers/arista/resources/arista.lr | 2 +- providers/arista/resources/arista.lr.go | 6 ++-- providers/arista/resources/arista_eos.go | 12 +++---- providers/assets.go | 10 +++--- providers/atlassian/config/config.go | 4 +-- .../atlassian/connection/admin/connection.go | 4 +-- .../atlassian/connection/admin/platform.go | 2 +- .../connection/confluence/connection.go | 4 +-- .../connection/confluence/platform.go | 2 +- providers/atlassian/connection/connection.go | 12 +++---- .../atlassian/connection/jira/connection.go | 4 +-- .../atlassian/connection/jira/platform.go | 2 +- .../atlassian/connection/scim/connection.go | 4 +-- .../atlassian/connection/scim/platform.go | 2 +- .../atlassian/connection/shared/shared.go | 2 +- providers/atlassian/gen/main.go | 4 +-- providers/atlassian/go.mod | 6 ++-- providers/atlassian/main.go | 4 +-- providers/atlassian/provider/provider.go | 14 ++++---- providers/atlassian/resources/atlassian.lr.go | 6 ++-- .../atlassian/resources/atlassian_admin.go | 10 +++--- .../resources/atlassian_confluence.go | 4 +-- .../atlassian/resources/atlassian_jira.go | 4 +-- .../atlassian/resources/atlassian_scim.go | 4 +-- providers/aws/config/config.go | 8 ++--- .../aws/connection/awsec2ebsconn/destroy.go | 2 +- .../aws/connection/awsec2ebsconn/provider.go | 18 +++++------ .../aws/connection/awsec2ebsconn/setup.go | 2 +- providers/aws/connection/connection.go | 4 +-- providers/aws/connection/platform.go | 2 +- providers/aws/gen/main.go | 4 +-- providers/aws/go.mod | 6 ++-- providers/aws/main.go | 4 +-- providers/aws/provider/provider.go | 16 +++++----- providers/aws/resources/aws.lr | 2 +- providers/aws/resources/aws.lr.go | 6 ++-- providers/aws/resources/aws_accessanalyzer.go | 8 ++--- providers/aws/resources/aws_account.go | 4 +-- providers/aws/resources/aws_acm.go | 10 +++--- providers/aws/resources/aws_apigateway.go | 12 +++---- .../resources/aws_applicationautoscaling.go | 10 +++--- providers/aws/resources/aws_autoscaling.go | 10 +++--- providers/aws/resources/aws_backups.go | 10 +++--- providers/aws/resources/aws_cloudfront.go | 8 ++--- providers/aws/resources/aws_cloudtrail.go | 10 +++--- providers/aws/resources/aws_cloudwatch.go | 12 +++---- providers/aws/resources/aws_codebuild.go | 12 +++---- providers/aws/resources/aws_config.go | 10 +++--- providers/aws/resources/aws_dms.go | 6 ++-- providers/aws/resources/aws_dynamodb.go | 12 +++---- providers/aws/resources/aws_ec2.go | 12 +++---- providers/aws/resources/aws_ecr.go | 12 +++---- providers/aws/resources/aws_ecs.go | 16 +++++----- providers/aws/resources/aws_efs.go | 10 +++--- providers/aws/resources/aws_eks.go | 10 +++--- providers/aws/resources/aws_elasticache.go | 10 +++--- providers/aws/resources/aws_elb.go | 10 +++--- providers/aws/resources/aws_emr.go | 10 +++--- providers/aws/resources/aws_es.go | 12 +++---- providers/aws/resources/aws_guardduty.go | 10 +++--- providers/aws/resources/aws_iam.go | 14 ++++---- providers/aws/resources/aws_kms.go | 10 +++--- providers/aws/resources/aws_lambda.go | 16 +++++----- providers/aws/resources/aws_rds.go | 12 +++---- providers/aws/resources/aws_redshift.go | 12 +++---- providers/aws/resources/aws_s3.go | 12 +++---- providers/aws/resources/aws_sagemaker.go | 12 +++---- providers/aws/resources/aws_secretsmanager.go | 10 +++--- providers/aws/resources/aws_securityhub.go | 6 ++-- providers/aws/resources/aws_sns.go | 10 +++--- providers/aws/resources/aws_ssm.go | 10 +++--- providers/aws/resources/aws_vpc.go | 12 +++---- providers/aws/resources/aws_waf.go | 10 +++--- providers/aws/resources/discovery.go | 10 +++--- .../aws/resources/discovery_conversion.go | 16 +++++----- providers/aws/resources/discovery_test.go | 6 ++-- providers/aws/resources/shared.go | 12 +++---- providers/azure/config/config.go | 8 ++--- providers/azure/connection/auth/auth.go | 2 +- .../connection/azureinstancesnapshot/lun.go | 2 +- .../azureinstancesnapshot/provider.go | 22 ++++++------- .../azureinstancesnapshot/provider_test.go | 2 +- providers/azure/connection/connection.go | 8 ++--- providers/azure/connection/shared/shared.go | 2 +- providers/azure/gen/main.go | 4 +-- providers/azure/go.mod | 6 ++-- providers/azure/main.go | 4 +-- providers/azure/provider/provider.go | 18 +++++------ providers/azure/resources/advisor.go | 10 +++--- providers/azure/resources/aks.go | 10 +++--- providers/azure/resources/authorization.go | 10 +++--- providers/azure/resources/azure.lr | 2 +- providers/azure/resources/azure.lr.go | 6 ++-- providers/azure/resources/cloud_defender.go | 10 +++--- providers/azure/resources/compute.go | 10 +++--- providers/azure/resources/cosmosdb.go | 10 +++--- providers/azure/resources/discovery.go | 10 +++--- providers/azure/resources/keyvault.go | 10 +++--- providers/azure/resources/mariadb.go | 10 +++--- providers/azure/resources/monitor.go | 10 +++--- providers/azure/resources/mysql.go | 10 +++--- providers/azure/resources/network.go | 12 +++---- providers/azure/resources/postgresql.go | 10 +++--- providers/azure/resources/resource_groups.go | 8 ++--- providers/azure/resources/resources.go | 8 ++--- providers/azure/resources/shared.go | 4 +-- providers/azure/resources/sql.go | 10 +++--- providers/azure/resources/storage.go | 10 +++--- providers/azure/resources/subscription.go | 10 +++--- providers/azure/resources/web.go | 10 +++--- providers/builtin.go | 4 +-- providers/builtin_dev.go | 4 +-- providers/coordinator.go | 10 +++--- providers/core/config/config.go | 2 +- providers/core/gen/main.go | 4 +-- providers/core/main.go | 4 +-- providers/core/provider/provider.go | 10 +++--- providers/core/resources/asset_eol.go | 10 +++--- providers/core/resources/core.lr | 2 +- providers/core/resources/core.lr.go | 6 ++-- providers/core/resources/core.resources.json | 2 +- providers/core/resources/core_test.go | 2 +- providers/core/resources/cpe.go | 4 +-- providers/core/resources/mondoo.go | 4 +-- providers/core/resources/mql_test.go | 4 +-- providers/core/resources/parse_test.go | 4 +-- providers/core/resources/regex.go | 2 +- providers/core/resources/regex_test.go | 2 +- providers/core/resources/time.go | 2 +- providers/core/resources/time_test.go | 4 +-- providers/core/resources/time_unit_test.go | 2 +- providers/core/resources/uuid.go | 4 +-- providers/core/resources/uuid_test.go | 2 +- .../resources/versions/apk/version_test.go | 4 +-- .../resources/versions/generic/compare.go | 8 ++--- providers/defaults.go | 2 +- providers/defaults_shared.go | 2 +- providers/equinix/config/config.go | 4 +-- providers/equinix/connection/connection.go | 6 ++-- providers/equinix/gen/main.go | 4 +-- providers/equinix/go.mod | 6 ++-- providers/equinix/main.go | 4 +-- providers/equinix/provider/provider.go | 14 ++++---- providers/equinix/resources/equinix.lr | 2 +- providers/equinix/resources/equinix.lr.go | 6 ++-- providers/equinix/resources/organization.go | 8 ++--- providers/equinix/resources/project.go | 8 ++--- providers/equinix/resources/user.go | 4 +-- providers/extensible_schema.go | 2 +- providers/extensible_schema_test.go | 2 +- providers/gcp/config/config.go | 8 ++--- providers/gcp/connection/clients.go | 2 +- providers/gcp/connection/connection.go | 8 ++--- providers/gcp/connection/connection_test.go | 2 +- .../gcp/connection/gcloud_config_test.go | 2 +- .../gcpinstancesnapshot/provider.go | 16 +++++----- .../gcpinstancesnapshot/snapshot.go | 2 +- providers/gcp/connection/platform.go | 2 +- providers/gcp/connection/shared/shared.go | 2 +- providers/gcp/gen/main.go | 4 +-- providers/gcp/go.mod | 6 ++-- providers/gcp/main.go | 4 +-- providers/gcp/provider/provider.go | 20 ++++++------ providers/gcp/resources/access_approval.go | 10 +++--- providers/gcp/resources/apikeys.go | 10 +++--- providers/gcp/resources/bigquery.go | 10 +++--- providers/gcp/resources/cloud_functions.go | 8 ++--- providers/gcp/resources/cloudrun.go | 10 +++--- providers/gcp/resources/common.go | 6 ++-- providers/gcp/resources/compute.go | 10 +++--- providers/gcp/resources/dataproc.go | 10 +++--- providers/gcp/resources/discovery.go | 8 ++--- providers/gcp/resources/dns.go | 10 +++--- providers/gcp/resources/essential_contacts.go | 8 ++--- providers/gcp/resources/folder.go | 6 ++-- providers/gcp/resources/gcp.lr | 2 +- providers/gcp/resources/gcp.lr.go | 6 ++-- providers/gcp/resources/gke.go | 10 +++--- providers/gcp/resources/iam.go | 6 ++-- providers/gcp/resources/kms.go | 10 +++--- providers/gcp/resources/logging.go | 10 +++--- providers/gcp/resources/monitoring.go | 10 +++--- providers/gcp/resources/organization.go | 10 +++--- providers/gcp/resources/project.go | 10 +++--- providers/gcp/resources/pubsub.go | 10 +++--- providers/gcp/resources/recommendations.go | 8 ++--- providers/gcp/resources/services.go | 6 ++-- providers/gcp/resources/sql.go | 10 +++--- providers/gcp/resources/storage.go | 10 +++--- providers/github/config/config.go | 4 +-- providers/github/connection/connection.go | 4 +-- .../github/connection/connection_test.go | 2 +- providers/github/connection/platform.go | 2 +- providers/github/gen/main.go | 4 +-- providers/github/go.mod | 6 ++-- providers/github/main.go | 4 +-- providers/github/provider/provider.go | 14 ++++---- providers/github/resources/discovery.go | 10 +++--- providers/github/resources/git.go | 4 +-- providers/github/resources/github.lr | 2 +- providers/github/resources/github.lr.go | 6 ++-- providers/github/resources/github_org.go | 10 +++--- providers/github/resources/github_repo.go | 10 +++--- providers/github/resources/github_team.go | 4 +-- providers/github/resources/github_test.go | 6 ++-- providers/github/resources/github_user.go | 10 +++--- providers/github/resources/github_workflow.go | 4 +-- providers/gitlab/config/config.go | 4 +-- providers/gitlab/connection/connection.go | 4 +-- .../gitlab/connection/connection_test.go | 2 +- providers/gitlab/gen/main.go | 4 +-- providers/gitlab/go.mod | 6 ++-- providers/gitlab/main.go | 4 +-- providers/gitlab/provider/discovery.go | 6 ++-- providers/gitlab/provider/provider.go | 14 ++++---- providers/gitlab/resources/gitlab.go | 6 ++-- providers/gitlab/resources/gitlab.lr | 2 +- providers/gitlab/resources/gitlab.lr.go | 6 ++-- providers/google-workspace/config/config.go | 4 +-- .../google-workspace/connection/connection.go | 4 +-- .../google-workspace/connection/workspace.go | 2 +- providers/google-workspace/gen/main.go | 4 +-- providers/google-workspace/go.mod | 6 ++-- providers/google-workspace/main.go | 4 +-- .../google-workspace/provider/provider.go | 14 ++++---- .../resources/connected_apps.go | 8 ++--- .../google-workspace/resources/domain.go | 6 ++-- .../resources/google-workspace.go | 2 +- .../resources/google-workspace.lr | 2 +- .../resources/google-workspace.lr.go | 6 ++-- .../resources/googleworkspace_test.go | 4 +-- providers/google-workspace/resources/group.go | 10 +++--- .../google-workspace/resources/orgunit.go | 6 ++-- .../google-workspace/resources/reports.go | 10 +++--- providers/google-workspace/resources/role.go | 10 +++--- providers/google-workspace/resources/users.go | 10 +++--- providers/ipmi/config/config.go | 4 +-- providers/ipmi/connection/connection.go | 6 ++-- providers/ipmi/gen/main.go | 4 +-- providers/ipmi/go.mod | 6 ++-- providers/ipmi/main.go | 4 +-- providers/ipmi/provider/provider.go | 16 +++++----- providers/ipmi/resources/ipmi.go | 4 +-- providers/ipmi/resources/ipmi.lr | 2 +- providers/ipmi/resources/ipmi.lr.go | 6 ++-- providers/k8s/config/config.go | 6 ++-- .../k8s/connection/admission/connection.go | 6 ++-- .../connection/admission/connection_test.go | 2 +- providers/k8s/connection/api/connection.go | 6 ++-- .../k8s/connection/manifest/connection.go | 6 ++-- .../connection/manifest/connection_test.go | 20 ++++++------ providers/k8s/connection/shared/connection.go | 4 +-- .../k8s/connection/shared/manifest_parser.go | 2 +- .../shared/resources/manifest_file_test.go | 2 +- providers/k8s/gen/main.go | 4 +-- providers/k8s/go.mod | 6 ++-- providers/k8s/main.go | 4 +-- providers/k8s/provider/detector.go | 4 +-- providers/k8s/provider/provider.go | 22 ++++++------- providers/k8s/provider/provider_test.go | 8 ++--- providers/k8s/resources/admission.go | 6 ++-- providers/k8s/resources/apiresource.go | 6 ++-- providers/k8s/resources/clusterrole.go | 8 ++--- providers/k8s/resources/clusterrolebinding.go | 8 ++--- providers/k8s/resources/common.go | 6 ++-- providers/k8s/resources/configmap.go | 8 ++--- providers/k8s/resources/container.go | 10 +++--- providers/k8s/resources/container_utils.go | 6 ++-- providers/k8s/resources/cronjob.go | 8 ++--- providers/k8s/resources/customresource.go | 4 +-- providers/k8s/resources/daemonset.go | 8 ++--- providers/k8s/resources/deployment.go | 8 ++--- providers/k8s/resources/discovery.go | 16 +++++----- providers/k8s/resources/discovery_test.go | 2 +- providers/k8s/resources/ingress.go | 8 ++--- providers/k8s/resources/job.go | 8 ++--- providers/k8s/resources/k8s.go | 2 +- providers/k8s/resources/k8s.lr | 2 +- providers/k8s/resources/k8s.lr.go | 6 ++-- providers/k8s/resources/namespace.go | 6 ++-- providers/k8s/resources/networkpolicy.go | 6 ++-- providers/k8s/resources/node.go | 8 ++--- providers/k8s/resources/platform_ownership.go | 2 +- providers/k8s/resources/pod.go | 8 ++--- providers/k8s/resources/podsecuritypolicy.go | 4 +-- providers/k8s/resources/replicaset.go | 8 ++--- providers/k8s/resources/resources_test.go | 12 +++---- providers/k8s/resources/role.go | 8 ++--- providers/k8s/resources/rolebinding.go | 8 ++--- providers/k8s/resources/secret.go | 6 ++-- providers/k8s/resources/service.go | 6 ++-- providers/k8s/resources/serviceaccount.go | 6 ++-- providers/k8s/resources/statefulset.go | 8 ++--- providers/k8s/resources/unsupported_test.go | 8 ++--- providers/mock.go | 6 ++-- providers/ms365/config/config.go | 4 +-- providers/ms365/connection/auth.go | 2 +- providers/ms365/connection/connection.go | 10 +++--- providers/ms365/connection/exchange_report.go | 2 +- .../ms365/connection/sharepoint_report.go | 2 +- providers/ms365/connection/teams_report.go | 2 +- providers/ms365/gen/main.go | 4 +-- providers/ms365/go.mod | 6 ++-- providers/ms365/main.go | 4 +-- providers/ms365/provider/provider.go | 14 ++++---- providers/ms365/resources/adapter.go | 2 +- providers/ms365/resources/applications.go | 8 ++--- providers/ms365/resources/devicemanagement.go | 8 ++--- providers/ms365/resources/domains.go | 8 ++--- providers/ms365/resources/groups.go | 6 ++-- providers/ms365/resources/microsoft.go | 2 +- providers/ms365/resources/ms365.go | 10 +++--- providers/ms365/resources/ms365.lr | 2 +- providers/ms365/resources/ms365.lr.go | 6 ++-- providers/ms365/resources/organizations.go | 8 ++--- providers/ms365/resources/policies.go | 4 +-- providers/ms365/resources/rolemanagement.go | 8 ++--- providers/ms365/resources/securescores.go | 10 +++--- .../ms365/resources/serviceprincipals.go | 12 +++---- providers/ms365/resources/settings.go | 4 +-- providers/ms365/resources/structs.go | 2 +- providers/ms365/resources/users.go | 8 ++--- providers/network/config/config.go | 4 +-- providers/network/connection/connection.go | 2 +- providers/network/gen/main.go | 4 +-- providers/network/main.go | 4 +-- providers/network/provider/provider.go | 14 ++++---- providers/network/resources/certificates.go | 12 +++---- providers/network/resources/dns.go | 16 +++++----- providers/network/resources/dns_test.go | 10 +++--- .../network/resources/dnsshake/dnsshake.go | 2 +- providers/network/resources/http.go | 12 +++---- providers/network/resources/network.lr | 2 +- providers/network/resources/network.lr.go | 6 ++-- providers/network/resources/network_test.go | 2 +- providers/network/resources/openpgp.go | 4 +-- providers/network/resources/tls.go | 14 ++++---- providers/network/resources/tls_test.go | 10 +++--- .../network/resources/tlsshake/tlsshake.go | 2 +- providers/network/resources/url.go | 4 +-- providers/oci/config/config.go | 4 +-- providers/oci/connection/connection.go | 4 +-- providers/oci/gen/main.go | 4 +-- providers/oci/go.mod | 6 ++-- providers/oci/main.go | 4 +-- providers/oci/provider/provider.go | 16 +++++----- providers/oci/provider/provider_test.go | 4 +-- providers/oci/resources/buckets.go | 6 ++-- providers/oci/resources/compute.go | 6 ++-- providers/oci/resources/conversion.go | 2 +- providers/oci/resources/identity.go | 10 +++--- providers/oci/resources/network.go | 10 +++--- providers/oci/resources/oci.go | 6 ++-- providers/oci/resources/oci.lr | 2 +- providers/oci/resources/oci.lr.go | 6 ++-- providers/okta/config/config.go | 4 +-- providers/okta/connection/connection.go | 4 +-- providers/okta/gen/main.go | 4 +-- providers/okta/go.mod | 6 ++-- providers/okta/main.go | 4 +-- providers/okta/provider/provider.go | 14 ++++---- providers/okta/resources/applications.go | 10 +++--- providers/okta/resources/customRoles.go | 12 +++---- providers/okta/resources/domains.go | 8 ++--- providers/okta/resources/groups.go | 8 ++--- providers/okta/resources/network.go | 10 +++--- providers/okta/resources/okta.lr | 2 +- providers/okta/resources/okta.lr.go | 6 ++-- providers/okta/resources/organization.go | 12 +++---- providers/okta/resources/policies.go | 10 +++--- providers/okta/resources/trustedorigin.go | 10 +++--- providers/okta/resources/users.go | 8 ++--- providers/opcua/config/config.go | 4 +-- providers/opcua/connection/connection.go | 4 +-- providers/opcua/gen/main.go | 4 +-- providers/opcua/go.mod | 6 ++-- providers/opcua/main.go | 4 +-- providers/opcua/provider/provider.go | 12 +++---- providers/opcua/resources/namespace.go | 6 ++-- providers/opcua/resources/node.go | 4 +-- providers/opcua/resources/opcua.go | 2 +- providers/opcua/resources/opcua.lr | 2 +- providers/opcua/resources/opcua.lr.go | 6 ++-- providers/opcua/resources/server.go | 8 ++--- providers/os/config/config.go | 6 ++-- .../os/connection/container/auth/auth.go | 6 ++-- .../container/docker_engine/command.go | 2 +- .../os/connection/container/image/docker.go | 2 +- providers/os/connection/docker_container.go | 16 +++++----- .../os/connection/docker_container_test.go | 2 +- providers/os/connection/docker_file.go | 4 +-- providers/os/connection/docker_fs.go | 2 +- providers/os/connection/docker_snapshot.go | 6 ++-- providers/os/connection/fs/filesystem.go | 8 ++--- providers/os/connection/fs/filesystem_test.go | 8 ++--- .../os/connection/fs/fsutil/hash_test.go | 4 +-- providers/os/connection/local/local.go | 6 ++-- providers/os/connection/local/local_unix.go | 2 +- .../os/connection/local/statutil/stat.go | 2 +- .../os/connection/local/statutil/stat_test.go | 4 +-- providers/os/connection/mock/mock.go | 4 +-- providers/os/connection/shared/shared.go | 4 +-- providers/os/connection/snapshot/localcmd.go | 4 +-- .../os/connection/snapshot/volumemounter.go | 2 +- providers/os/connection/ssh.go | 20 ++++++------ .../awsinstanceconnect/ec2instanceconnect.go | 2 +- .../ssh/awsssmsession/session_manager.go | 2 +- providers/os/connection/ssh/cat/cat.go | 4 +-- providers/os/connection/ssh/cat/cat_test.go | 10 +++--- providers/os/connection/ssh/scp/fs.go | 4 +-- providers/os/connection/ssh/sftp/sftp.go | 2 +- providers/os/connection/ssh_test.go | 2 +- providers/os/connection/tar.go | 12 +++---- providers/os/connection/tar/fs.go | 2 +- providers/os/connection/tar_test.go | 6 ++-- providers/os/connection/vagrant.go | 12 +++---- providers/os/connection/vagrant/cli_test.go | 4 +-- providers/os/detector/detector.go | 4 +-- providers/os/detector/detector_all.go | 6 ++-- .../os/detector/detector_platform_test.go | 4 +-- providers/os/detector/detector_test.go | 2 +- providers/os/detector/os_release.go | 2 +- .../os/detector/parser_esxi_version_test.go | 2 +- .../os/detector/parser_linux_version_test.go | 2 +- .../os/detector/parser_macos_version_test.go | 2 +- providers/os/detector/parser_sol_test.go | 2 +- providers/os/detector/platform_resolver.go | 6 ++-- .../os/detector/windows/build_version.go | 4 +-- .../os/detector/windows/build_version_unix.go | 2 +- .../detector/windows/build_version_windows.go | 2 +- providers/os/detector/windows/wmi.go | 4 +-- providers/os/detector/windows/wmi_unix.go | 2 +- providers/os/detector/windows/wmi_windows.go | 2 +- providers/os/fsutil/hash_test.go | 6 ++-- providers/os/gen/main.go | 4 +-- providers/os/id/aws/aws.go | 10 +++--- providers/os/id/aws/aws_test.go | 4 +-- providers/os/id/awsec2/awsec2.go | 6 ++-- providers/os/id/awsec2/metadata_cmd.go | 6 ++-- providers/os/id/awsec2/metadata_cmd_test.go | 4 +-- providers/os/id/awsecs/awsecs.go | 6 ++-- providers/os/id/awsecs/awsecs_test.go | 4 +-- providers/os/id/azcompute/azcompute.go | 8 ++--- providers/os/id/azcompute/azcompute_test.go | 4 +-- providers/os/id/azure/azure.go | 8 ++--- providers/os/id/clouddetect/clouddetect.go | 10 +++--- providers/os/id/gce/gce.go | 6 ++-- providers/os/id/gce/gce_test.go | 6 ++-- providers/os/id/gcp/gcp.go | 8 ++--- providers/os/id/gcp/gcp_test.go | 4 +-- providers/os/id/hostname/hostname.go | 4 +-- providers/os/id/hostname/hostname_test.go | 6 ++-- providers/os/id/machineid/guid.go | 6 ++-- providers/os/id/platform.go | 20 ++++++------ providers/os/id/platformid/linux.go | 2 +- providers/os/id/platformid/linux_test.go | 2 +- providers/os/id/platformid/manager.go | 4 +-- providers/os/id/platformid/osx.go | 2 +- providers/os/id/platformid/osx_test.go | 2 +- providers/os/id/platformid/win.go | 2 +- providers/os/id/platformid/win_guid_unix.go | 2 +- .../os/id/platformid/win_guid_windows.go | 2 +- providers/os/id/platformid/win_test.go | 2 +- providers/os/id/sshhostkey/sshhostkey.go | 6 ++-- providers/os/main.go | 4 +-- providers/os/provider/detector.go | 20 ++++++------ providers/os/provider/provider.go | 30 ++++++++--------- providers/os/provider/provider_test.go | 10 +++--- providers/os/resources/asset_cpe.go | 6 ++-- providers/os/resources/asset_eol.go | 10 +++--- providers/os/resources/asset_vuln.go | 18 +++++------ providers/os/resources/auditpol.go | 4 +-- providers/os/resources/authorizedkeys.go | 6 ++-- providers/os/resources/command.go | 6 ++-- providers/os/resources/container.go | 6 ++-- providers/os/resources/cpe/platforms.go | 2 +- .../discovery/container_registry/registry.go | 10 +++--- .../discovery/container_registry/resolver.go | 6 ++-- .../discovery/docker_engine/client_test.go | 2 +- .../discovery/docker_engine/container.go | 4 +-- .../discovery/docker_engine/images.go | 2 +- .../discovery/docker_engine/platform.go | 4 +-- .../discovery/docker_engine/resolver.go | 8 ++--- providers/os/resources/docker.go | 4 +-- providers/os/resources/file.go | 8 ++--- providers/os/resources/file_test.go | 8 ++--- providers/os/resources/files.go | 6 ++-- providers/os/resources/files_test.go | 2 +- providers/os/resources/group.go | 8 ++--- providers/os/resources/groups/dscache.go | 2 +- providers/os/resources/groups/dscache_test.go | 4 +-- providers/os/resources/groups/etcgroups.go | 2 +- .../os/resources/groups/etcgroups_test.go | 4 +-- providers/os/resources/groups/manager.go | 2 +- providers/os/resources/groups/manager_test.go | 6 ++-- .../os/resources/groups/ps1getlocalgroup.go | 4 +-- .../resources/groups/ps1getlocalgroup_test.go | 4 +-- providers/os/resources/iptables.go | 4 +-- providers/os/resources/kernel.go | 12 +++---- providers/os/resources/kernel/manager.go | 2 +- providers/os/resources/kernel/manager_test.go | 4 +-- providers/os/resources/kernel/modules_test.go | 2 +- providers/os/resources/kernel/sysctl_test.go | 2 +- providers/os/resources/kubelet.go | 6 ++-- providers/os/resources/kubelet_flags.go | 2 +- providers/os/resources/kubelet_test.go | 2 +- providers/os/resources/logindefs.go | 6 ++-- .../os/resources/logindefs/logindefs_test.go | 4 +-- providers/os/resources/lsblk.go | 4 +-- providers/os/resources/machine.go | 8 ++--- providers/os/resources/macos.go | 6 ++-- providers/os/resources/macos/preferences.go | 2 +- .../os/resources/macos/preferences_test.go | 4 +-- .../os/resources/macos/systemsetup_test.go | 6 ++-- providers/os/resources/macos_alf.go | 8 ++--- providers/os/resources/mount.go | 10 +++--- providers/os/resources/mount/manager.go | 2 +- providers/os/resources/mount/manager_test.go | 6 ++-- providers/os/resources/mount/mount_test.go | 6 ++-- providers/os/resources/mql_test.go | 4 +-- .../resources/networkinterface/interface.go | 6 ++-- .../networkinterface/interface_test.go | 6 ++-- providers/os/resources/npm/packagejson.go | 2 +- .../os/resources/npm/packagejson_test.go | 4 +-- providers/os/resources/npm/yarn.go | 2 +- providers/os/resources/npm/yarn_test.go | 4 +-- providers/os/resources/ntp.go | 4 +-- providers/os/resources/os.go | 22 ++++++------- providers/os/resources/os.lr | 2 +- providers/os/resources/os.lr.go | 6 ++-- providers/os/resources/os_rootcertificates.go | 8 ++--- providers/os/resources/os_test.go | 4 +-- providers/os/resources/packages.go | 12 +++---- .../os/resources/packages/aix_packages.go | 8 ++--- .../resources/packages/aix_packages_test.go | 2 +- .../os/resources/packages/apk_packages.go | 8 ++--- .../resources/packages/apk_packages_test.go | 6 ++-- .../os/resources/packages/cos_packages.go | 2 +- providers/os/resources/packages/detect.go | 4 +-- .../os/resources/packages/dpkg_packages.go | 8 ++--- .../resources/packages/dpkg_packages_test.go | 6 ++-- .../os/resources/packages/freebsd_packages.go | 2 +- .../os/resources/packages/macos_packages.go | 2 +- .../resources/packages/macos_packages_test.go | 4 +-- .../os/resources/packages/opkg_packages.go | 2 +- .../resources/packages/opkg_packages_test.go | 6 ++-- providers/os/resources/packages/packages.go | 2 +- .../os/resources/packages/pacman_packages.go | 6 ++-- .../packages/pacman_packages_test.go | 4 +-- .../os/resources/packages/rpm_packages.go | 8 ++--- .../resources/packages/rpm_packages_test.go | 6 ++-- .../os/resources/packages/rpm_updates_test.go | 2 +- providers/os/resources/packages/scratch.go | 2 +- .../os/resources/packages/solaris_packages.go | 2 +- .../packages/solaris_packages_test.go | 6 ++-- .../os/resources/packages/windows_packages.go | 8 ++--- .../packages/windows_packages_test.go | 6 ++-- providers/os/resources/pam.go | 12 +++---- providers/os/resources/parse.go | 10 +++--- providers/os/resources/parse_test.go | 2 +- providers/os/resources/port.go | 12 +++---- providers/os/resources/powershell.go | 6 ++-- .../os/resources/powershell/encode_test.go | 2 +- providers/os/resources/privatekey.go | 4 +-- providers/os/resources/processes.go | 8 ++--- .../os/resources/processes/docker_test.go | 2 +- providers/os/resources/processes/dockertop.go | 6 ++-- providers/os/resources/processes/linuxproc.go | 6 ++-- providers/os/resources/processes/manager.go | 8 ++--- .../os/resources/processes/manager_test.go | 6 ++-- .../os/resources/processes/ps1getprocess.go | 6 ++-- .../resources/processes/ps1getprocess_test.go | 2 +- providers/os/resources/processes/unixps.go | 6 ++-- .../os/resources/processes/unixps_test.go | 6 ++-- providers/os/resources/processes_test.go | 4 +-- .../os/resources/procfs/cpu_info_test.go | 2 +- .../os/resources/procfs/processes_test.go | 2 +- providers/os/resources/purl/purl.go | 4 +-- providers/os/resources/python.go | 8 ++--- providers/os/resources/python/mime.go | 2 +- .../os/resources/python/testdata/rhel.json | 2 +- providers/os/resources/python_package.go | 10 +++--- providers/os/resources/python_test.go | 2 +- providers/os/resources/reboot/debian.go | 2 +- providers/os/resources/reboot/debian_test.go | 4 +-- providers/os/resources/reboot/reboot.go | 4 +-- providers/os/resources/reboot/reboot_test.go | 4 +-- providers/os/resources/reboot/rhel.go | 8 ++--- providers/os/resources/reboot/rhel_test.go | 4 +-- providers/os/resources/reboot/windows.go | 4 +-- providers/os/resources/registrykey.go | 12 +++---- providers/os/resources/registrykey_test.go | 4 +-- providers/os/resources/rsyslog.go | 6 ++-- providers/os/resources/secpol.go | 6 ++-- providers/os/resources/services.go | 8 ++--- providers/os/resources/services/aixlssrc.go | 2 +- .../os/resources/services/alpine_openrc.go | 2 +- .../resources/services/alpine_openrc_test.go | 4 +-- providers/os/resources/services/bsdinit.go | 2 +- .../os/resources/services/bsdinit_test.go | 6 ++-- providers/os/resources/services/launchd.go | 2 +- .../os/resources/services/launchd_test.go | 6 ++-- providers/os/resources/services/manager.go | 4 +-- .../os/resources/services/manager_test.go | 6 ++-- .../os/resources/services/openbsdrcctl.go | 2 +- .../resources/services/openbsdrcctl_test.go | 4 +-- .../os/resources/services/ps1getservice.go | 4 +-- .../resources/services/ps1getservice_test.go | 2 +- providers/os/resources/services/systemd.go | 2 +- .../os/resources/services/systemd_test.go | 6 ++-- providers/os/resources/services/sysv.go | 4 +-- providers/os/resources/services/sysv_test.go | 4 +-- .../os/resources/services/upstart_test.go | 4 +-- providers/os/resources/shadow.go | 4 +-- providers/os/resources/shadow/shadow_test.go | 4 +-- providers/os/resources/smbios/linux.go | 2 +- providers/os/resources/smbios/osx.go | 4 +-- providers/os/resources/smbios/smbios.go | 4 +-- providers/os/resources/smbios/smbios_test.go | 4 +-- providers/os/resources/smbios/win.go | 4 +-- providers/os/resources/sshd.go | 8 ++--- providers/os/resources/sshd/include.go | 2 +- providers/os/resources/sshd_test.go | 2 +- providers/os/resources/updates/mac_updates.go | 2 +- .../os/resources/updates/suse_updates.go | 4 +-- .../os/resources/updates/suse_updates_test.go | 4 +-- providers/os/resources/updates/updates.go | 2 +- providers/os/resources/updates/win_updates.go | 4 +-- .../os/resources/updates/win_updates_test.go | 6 ++-- providers/os/resources/uptime/unix.go | 2 +- providers/os/resources/uptime/unix_test.go | 2 +- providers/os/resources/uptime/uptime.go | 4 +-- providers/os/resources/uptime/uptime_test.go | 6 ++-- providers/os/resources/uptime/windows.go | 4 +-- providers/os/resources/uptime/windows_test.go | 2 +- providers/os/resources/user.go | 8 ++--- providers/os/resources/users/dscl.go | 2 +- providers/os/resources/users/dscl_test.go | 4 +-- providers/os/resources/users/etcpasswd.go | 2 +- .../os/resources/users/etcpasswd_test.go | 4 +-- providers/os/resources/users/manager.go | 2 +- providers/os/resources/users/manager_test.go | 6 ++-- .../os/resources/users/ps1getlocalusers.go | 4 +-- .../resources/users/ps1getlocalusers_test.go | 2 +- providers/os/resources/vulnmgmt.go | 10 +++--- providers/os/resources/windows.go | 12 +++---- .../os/resources/windows/auditpol_test.go | 4 +-- providers/os/resources/windows/bitlocker.go | 4 +-- providers/os/resources/windows/registrykey.go | 2 +- providers/os/resources/windows/secpol_test.go | 4 +-- .../os/resources/windows/security_health.go | 4 +-- .../os/resources/windows/security_products.go | 4 +-- providers/os/resources/windows_bitlocker.go | 8 ++--- providers/os/resources/windows_firewall.go | 10 +++--- providers/os/resources/windows_security.go | 10 +++--- providers/os/resources/yum.go | 12 +++---- providers/os/resources/yum/yum_test.go | 2 +- providers/providers.go | 8 ++--- providers/providers_test.go | 2 +- providers/recording.go | 8 ++--- providers/runtime.go | 14 ++++---- providers/slack/config/config.go | 4 +-- providers/slack/connection/connection.go | 4 +-- providers/slack/gen/main.go | 4 +-- providers/slack/go.mod | 6 ++-- providers/slack/main.go | 4 +-- providers/slack/provider/provider.go | 14 ++++---- providers/slack/resources/accesslogs.go | 6 ++-- providers/slack/resources/conversations.go | 8 ++--- providers/slack/resources/slack.lr | 2 +- providers/slack/resources/slack.lr.go | 6 ++-- providers/slack/resources/team.go | 6 ++-- providers/slack/resources/usergroups.go | 6 ++-- providers/slack/resources/users.go | 8 ++--- providers/terraform/config/config.go | 4 +-- providers/terraform/connection/connection.go | 2 +- .../terraform/connection/hcl_manifest.go | 4 +-- .../terraform/connection/hcl_manifest_test.go | 2 +- .../terraform/connection/hcl_parser_test.go | 2 +- providers/terraform/connection/tfplan.go | 2 +- providers/terraform/connection/tfstate.go | 2 +- providers/terraform/gen/main.go | 4 +-- providers/terraform/go.mod | 6 ++-- providers/terraform/main.go | 4 +-- providers/terraform/provider/detector.go | 4 +-- providers/terraform/provider/hcl_test.go | 4 +-- providers/terraform/provider/provider.go | 12 +++---- .../terraform/provider/terraform_test.go | 4 +-- providers/terraform/provider/tfplan_test.go | 6 ++-- providers/terraform/provider/tfstate_test.go | 2 +- providers/terraform/resources/hcl.go | 8 ++--- providers/terraform/resources/terraform.lr | 2 +- providers/terraform/resources/terraform.lr.go | 6 ++-- providers/terraform/resources/tfplan.go | 10 +++--- providers/terraform/resources/tfstate.go | 10 +++--- providers/vcd/config/config.go | 4 +-- providers/vcd/connection/connection.go | 4 +-- providers/vcd/connection/connection_test.go | 4 +-- providers/vcd/gen/main.go | 4 +-- providers/vcd/go.mod | 6 ++-- providers/vcd/main.go | 4 +-- providers/vcd/provider/provider.go | 14 ++++---- providers/vcd/resources/externalnetworks.go | 8 ++--- providers/vcd/resources/networkpools.go | 6 ++-- providers/vcd/resources/organization.go | 8 ++--- providers/vcd/resources/provider.go | 6 ++-- providers/vcd/resources/serverinstance.go | 6 ++-- providers/vcd/resources/vcd.lr | 2 +- providers/vcd/resources/vcd.lr.go | 6 ++-- providers/vsphere/config/config.go | 6 ++-- providers/vsphere/connection/connection.go | 4 +-- .../vsphere/connection/connection_test.go | 6 ++-- providers/vsphere/connection/platform.go | 2 +- providers/vsphere/gen/main.go | 4 +-- providers/vsphere/go.mod | 6 ++-- providers/vsphere/main.go | 4 +-- providers/vsphere/provider/provider.go | 14 ++++---- providers/vsphere/provider/provider_test.go | 8 ++--- .../vsphere/resources/asset_advisories.go | 8 ++--- providers/vsphere/resources/asset_cpe.go | 4 +-- providers/vsphere/resources/datacenter.go | 8 ++--- providers/vsphere/resources/discovery.go | 10 +++--- providers/vsphere/resources/host.go | 12 +++---- providers/vsphere/resources/network.go | 4 +-- .../vsphere/resources/resourceclient/esxi.go | 2 +- .../resources/resourceclient/vsphere_test.go | 2 +- providers/vsphere/resources/vm.go | 8 ++--- providers/vsphere/resources/vsphere.go | 8 ++--- providers/vsphere/resources/vsphere.lr | 2 +- providers/vsphere/resources/vsphere.lr.go | 6 ++-- providers/vsphere/resources/vulnmgmt.go | 10 +++--- sbom/list.go | 2 +- sbom/sbom.go | 6 ++-- shared/grpc.go | 4 +-- shared/interface.go | 4 +-- shared/proto/cnquery.pb.go | 2 +- shared/proto/cnquery.proto | 2 +- test/cli/cli_test.go | 2 +- utils/multierr/errors_test.go | 2 +- utils/stringx/contains_test.go | 2 +- utils/stringx/dedup_test.go | 2 +- utils/stringx/intersection_test.go | 2 +- utils/stringx/merge_test.go | 2 +- 946 files changed, 2811 insertions(+), 2811 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 69dc4904f7..d3997258b3 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -29,7 +29,7 @@ builds: - -tags="production netgo" ldflags: - "-extldflags=-static" - - -s -w -X go.mondoo.com/cnquery/v9.Version={{.Version}} -X go.mondoo.com/cnquery/v9.Build={{.ShortCommit}} -X go.mondoo.com/cnquery/v9.Date={{.Date}} + - -s -w -X go.mondoo.com/cnquery/v10.Version={{.Version}} -X go.mondoo.com/cnquery/v10.Build={{.ShortCommit}} -X go.mondoo.com/cnquery/v10.Date={{.Date}} - id: macos main: ./apps/cnquery/cnquery.go binary: cnquery @@ -41,7 +41,7 @@ builds: flags: -tags production ldflags: # clang + macos does not support static: - -extldflags "-static" - - -s -w -X go.mondoo.com/cnquery/v9.Version={{.Version}} -X go.mondoo.com/cnquery/v9.Build={{.ShortCommit}} -X go.mondoo.com/cnquery/v9.Date={{.Date}} + - -s -w -X go.mondoo.com/cnquery/v10.Version={{.Version}} -X go.mondoo.com/cnquery/v10.Build={{.ShortCommit}} -X go.mondoo.com/cnquery/v10.Date={{.Date}} hooks: post: - cmd: /tmp/quill sign-and-notarize "{{ .Path }}" -vv || true @@ -59,7 +59,7 @@ builds: flags: -tags production -buildmode exe ldflags: - "-extldflags -static" - - -s -w -X go.mondoo.com/cnquery/v9.Version={{.Version}} -X go.mondoo.com/cnquery/v9.Build={{.ShortCommit}} -X go.mondoo.com/cnquery/v9.Date={{.Date}} + - -s -w -X go.mondoo.com/cnquery/v10.Version={{.Version}} -X go.mondoo.com/cnquery/v10.Build={{.ShortCommit}} -X go.mondoo.com/cnquery/v10.Date={{.Date}} hooks: post: - cmd: jsign --storetype DIGICERTONE --alias "{{ .Env.SM_CERT_ALIAS }}" --storepass "{{ .Env.SM_API_KEY }}|{{ .Env.SM_CLIENT_CERT_FILE}}|{{ .Env.SM_CLIENT_CERT_PASSWORD }}" --tsaurl "http://timestamp.digicert.com" '{{ .Path }}' diff --git a/Makefile b/Makefile index 117c9662e8..76d35e697b 100644 --- a/Makefile +++ b/Makefile @@ -29,8 +29,8 @@ ifeq ($(TARGETOS),windows) BIN_SUFFIX=".exe" endif -LDFLAGS=-ldflags "-s -w -X go.mondoo.com/cnquery/v9.Version=${VERSION} -X go.mondoo.com/cnquery/v9.Build=${TAG}" # -linkmode external -extldflags=-static -LDFLAGSDIST=-tags production -ldflags "-s -w -X go.mondoo.com/cnquery/v9.Version=${LATEST_VERSION_TAG} -X go.mondoo.com/cnquery/v9.Build=${TAG} -s -w" +LDFLAGS=-ldflags "-s -w -X go.mondoo.com/cnquery/v10.Version=${VERSION} -X go.mondoo.com/cnquery/v10.Build=${TAG}" # -linkmode external -extldflags=-static +LDFLAGSDIST=-tags production -ldflags "-s -w -X go.mondoo.com/cnquery/v10.Version=${LATEST_VERSION_TAG} -X go.mondoo.com/cnquery/v10.Build=${TAG} -s -w" .PHONY: info/ldflags info/ldflags: diff --git a/apps/cnquery/cmd/bundle.go b/apps/cnquery/cmd/bundle.go index 4d202113c1..b9b148dc93 100644 --- a/apps/cnquery/cmd/bundle.go +++ b/apps/cnquery/cmd/bundle.go @@ -14,12 +14,12 @@ import ( "github.com/rs/zerolog/log" "github.com/spf13/cobra" "github.com/spf13/viper" - "go.mondoo.com/cnquery/v9/cli/config" - cli_errors "go.mondoo.com/cnquery/v9/cli/errors" - "go.mondoo.com/cnquery/v9/explorer" - "go.mondoo.com/cnquery/v9/providers" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream" - "go.mondoo.com/cnquery/v9/utils/stringx" + "go.mondoo.com/cnquery/v10/cli/config" + cli_errors "go.mondoo.com/cnquery/v10/cli/errors" + "go.mondoo.com/cnquery/v10/explorer" + "go.mondoo.com/cnquery/v10/providers" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream" + "go.mondoo.com/cnquery/v10/utils/stringx" ) func init() { diff --git a/apps/cnquery/cmd/login.go b/apps/cnquery/cmd/login.go index 7346c00260..c4fc08a0db 100644 --- a/apps/cnquery/cmd/login.go +++ b/apps/cnquery/cmd/login.go @@ -12,12 +12,12 @@ import ( "github.com/rs/zerolog/log" "github.com/spf13/cobra" "github.com/spf13/viper" - "go.mondoo.com/cnquery/v9" - "go.mondoo.com/cnquery/v9/cli/config" - cli_errors "go.mondoo.com/cnquery/v9/cli/errors" - cnquery_providers "go.mondoo.com/cnquery/v9/providers" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/sysinfo" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream" + "go.mondoo.com/cnquery/v10" + "go.mondoo.com/cnquery/v10/cli/config" + cli_errors "go.mondoo.com/cnquery/v10/cli/errors" + cnquery_providers "go.mondoo.com/cnquery/v10/providers" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/sysinfo" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream" "go.mondoo.com/ranger-rpc" "go.mondoo.com/ranger-rpc/plugins/authentication/statictoken" ) diff --git a/apps/cnquery/cmd/logout.go b/apps/cnquery/cmd/logout.go index 968e9ed160..fe1e13d25a 100644 --- a/apps/cnquery/cmd/logout.go +++ b/apps/cnquery/cmd/logout.go @@ -11,11 +11,11 @@ import ( "github.com/rs/zerolog/log" "github.com/spf13/cobra" "github.com/spf13/viper" - "go.mondoo.com/cnquery/v9/cli/config" - cli_errors "go.mondoo.com/cnquery/v9/cli/errors" - cnquery_providers "go.mondoo.com/cnquery/v9/providers" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/sysinfo" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream" + "go.mondoo.com/cnquery/v10/cli/config" + cli_errors "go.mondoo.com/cnquery/v10/cli/errors" + cnquery_providers "go.mondoo.com/cnquery/v10/providers" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/sysinfo" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream" "sigs.k8s.io/yaml" ) diff --git a/apps/cnquery/cmd/plugin.go b/apps/cnquery/cmd/plugin.go index 9ecc9020f7..e82042dcc9 100644 --- a/apps/cnquery/cmd/plugin.go +++ b/apps/cnquery/cmd/plugin.go @@ -10,19 +10,19 @@ import ( "github.com/hashicorp/go-plugin" "github.com/rs/zerolog/log" "github.com/spf13/cobra" - "go.mondoo.com/cnquery/v9/cli/config" - "go.mondoo.com/cnquery/v9/cli/printer" - "go.mondoo.com/cnquery/v9/cli/reporter" - "go.mondoo.com/cnquery/v9/cli/shell" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/logger" - "go.mondoo.com/cnquery/v9/mqlc" - "go.mondoo.com/cnquery/v9/mqlc/parser" - "go.mondoo.com/cnquery/v9/providers" - pp "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream" - "go.mondoo.com/cnquery/v9/shared" - run "go.mondoo.com/cnquery/v9/shared/proto" + "go.mondoo.com/cnquery/v10/cli/config" + "go.mondoo.com/cnquery/v10/cli/printer" + "go.mondoo.com/cnquery/v10/cli/reporter" + "go.mondoo.com/cnquery/v10/cli/shell" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/logger" + "go.mondoo.com/cnquery/v10/mqlc" + "go.mondoo.com/cnquery/v10/mqlc/parser" + "go.mondoo.com/cnquery/v10/providers" + pp "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream" + "go.mondoo.com/cnquery/v10/shared" + run "go.mondoo.com/cnquery/v10/shared/proto" "google.golang.org/protobuf/proto" ) diff --git a/apps/cnquery/cmd/providers.go b/apps/cnquery/cmd/providers.go index a8a2d3d52f..04fbb4847f 100644 --- a/apps/cnquery/cmd/providers.go +++ b/apps/cnquery/cmd/providers.go @@ -14,9 +14,9 @@ import ( "github.com/rs/zerolog/log" "github.com/spf13/cobra" - "go.mondoo.com/cnquery/v9/cli/theme" - "go.mondoo.com/cnquery/v9/providers" - "go.mondoo.com/cnquery/v9/utils/sortx" + "go.mondoo.com/cnquery/v10/cli/theme" + "go.mondoo.com/cnquery/v10/providers" + "go.mondoo.com/cnquery/v10/utils/sortx" ) func init() { diff --git a/apps/cnquery/cmd/root.go b/apps/cnquery/cmd/root.go index 478a606a93..9fd05756f0 100644 --- a/apps/cnquery/cmd/root.go +++ b/apps/cnquery/cmd/root.go @@ -14,13 +14,13 @@ import ( "github.com/spf13/cobra" "github.com/spf13/cobra/doc" "github.com/spf13/viper" - "go.mondoo.com/cnquery/v9" - "go.mondoo.com/cnquery/v9/cli/config" - cli_errors "go.mondoo.com/cnquery/v9/cli/errors" - "go.mondoo.com/cnquery/v9/cli/providers" - "go.mondoo.com/cnquery/v9/cli/theme" - "go.mondoo.com/cnquery/v9/logger" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/sysinfo" + "go.mondoo.com/cnquery/v10" + "go.mondoo.com/cnquery/v10/cli/config" + cli_errors "go.mondoo.com/cnquery/v10/cli/errors" + "go.mondoo.com/cnquery/v10/cli/providers" + "go.mondoo.com/cnquery/v10/cli/theme" + "go.mondoo.com/cnquery/v10/logger" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/sysinfo" "go.mondoo.com/ranger-rpc" "go.mondoo.com/ranger-rpc/plugins/scope" ) diff --git a/apps/cnquery/cmd/run.go b/apps/cnquery/cmd/run.go index b1f8274864..c9940d25c1 100644 --- a/apps/cnquery/cmd/run.go +++ b/apps/cnquery/cmd/run.go @@ -9,11 +9,11 @@ import ( "github.com/rs/zerolog/log" "github.com/spf13/cobra" "github.com/spf13/viper" - "go.mondoo.com/cnquery/v9/providers" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/shared" - "go.mondoo.com/cnquery/v9/shared/proto" + "go.mondoo.com/cnquery/v10/providers" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/shared" + "go.mondoo.com/cnquery/v10/shared/proto" ) func init() { diff --git a/apps/cnquery/cmd/sbom.go b/apps/cnquery/cmd/sbom.go index 43b7f44e60..fc96a2b03b 100644 --- a/apps/cnquery/cmd/sbom.go +++ b/apps/cnquery/cmd/sbom.go @@ -9,17 +9,17 @@ import ( "github.com/rs/zerolog/log" "github.com/spf13/cobra" "github.com/spf13/viper" - "go.mondoo.com/cnquery/v9/cli/config" - "go.mondoo.com/cnquery/v9/cli/execruntime" - "go.mondoo.com/cnquery/v9/cli/inventoryloader" - "go.mondoo.com/cnquery/v9/cli/reporter" - "go.mondoo.com/cnquery/v9/logger" - "go.mondoo.com/cnquery/v9/providers" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream" - sbom "go.mondoo.com/cnquery/v9/sbom" - "go.mondoo.com/cnquery/v9/shared" + "go.mondoo.com/cnquery/v10/cli/config" + "go.mondoo.com/cnquery/v10/cli/execruntime" + "go.mondoo.com/cnquery/v10/cli/inventoryloader" + "go.mondoo.com/cnquery/v10/cli/reporter" + "go.mondoo.com/cnquery/v10/logger" + "go.mondoo.com/cnquery/v10/providers" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream" + sbom "go.mondoo.com/cnquery/v10/sbom" + "go.mondoo.com/cnquery/v10/shared" ) func init() { diff --git a/apps/cnquery/cmd/scan.go b/apps/cnquery/cmd/scan.go index 81d388231b..fdbb374a46 100644 --- a/apps/cnquery/cmd/scan.go +++ b/apps/cnquery/cmd/scan.go @@ -13,19 +13,19 @@ import ( "github.com/rs/zerolog/log" "github.com/spf13/cobra" "github.com/spf13/viper" - "go.mondoo.com/cnquery/v9" - "go.mondoo.com/cnquery/v9/cli/config" - "go.mondoo.com/cnquery/v9/cli/execruntime" - "go.mondoo.com/cnquery/v9/cli/inventoryloader" - "go.mondoo.com/cnquery/v9/cli/reporter" - "go.mondoo.com/cnquery/v9/cli/theme" - "go.mondoo.com/cnquery/v9/explorer" - "go.mondoo.com/cnquery/v9/explorer/scan" - "go.mondoo.com/cnquery/v9/mqlc" - "go.mondoo.com/cnquery/v9/providers" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream" + "go.mondoo.com/cnquery/v10" + "go.mondoo.com/cnquery/v10/cli/config" + "go.mondoo.com/cnquery/v10/cli/execruntime" + "go.mondoo.com/cnquery/v10/cli/inventoryloader" + "go.mondoo.com/cnquery/v10/cli/reporter" + "go.mondoo.com/cnquery/v10/cli/theme" + "go.mondoo.com/cnquery/v10/explorer" + "go.mondoo.com/cnquery/v10/explorer/scan" + "go.mondoo.com/cnquery/v10/mqlc" + "go.mondoo.com/cnquery/v10/providers" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream" ) func init() { diff --git a/apps/cnquery/cmd/shell.go b/apps/cnquery/cmd/shell.go index 22c7a875ed..226a862f37 100644 --- a/apps/cnquery/cmd/shell.go +++ b/apps/cnquery/cmd/shell.go @@ -12,16 +12,16 @@ import ( "github.com/rs/zerolog/log" "github.com/spf13/cobra" "github.com/spf13/viper" - "go.mondoo.com/cnquery/v9" - "go.mondoo.com/cnquery/v9/cli/components" - "go.mondoo.com/cnquery/v9/cli/config" - "go.mondoo.com/cnquery/v9/cli/shell" - "go.mondoo.com/cnquery/v9/cli/theme" - "go.mondoo.com/cnquery/v9/providers" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory/manager" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream" + "go.mondoo.com/cnquery/v10" + "go.mondoo.com/cnquery/v10/cli/components" + "go.mondoo.com/cnquery/v10/cli/config" + "go.mondoo.com/cnquery/v10/cli/shell" + "go.mondoo.com/cnquery/v10/cli/theme" + "go.mondoo.com/cnquery/v10/providers" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory/manager" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream" ) func init() { diff --git a/apps/cnquery/cmd/status.go b/apps/cnquery/cmd/status.go index aef64a0846..82b7e404ee 100644 --- a/apps/cnquery/cmd/status.go +++ b/apps/cnquery/cmd/status.go @@ -14,15 +14,15 @@ import ( "github.com/rs/zerolog/log" "github.com/spf13/cobra" "github.com/spf13/viper" - "go.mondoo.com/cnquery/v9" - "go.mondoo.com/cnquery/v9/cli/config" - cli_errors "go.mondoo.com/cnquery/v9/cli/errors" - "go.mondoo.com/cnquery/v9/cli/theme" - "go.mondoo.com/cnquery/v9/providers" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/sysinfo" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream/health" + "go.mondoo.com/cnquery/v10" + "go.mondoo.com/cnquery/v10/cli/config" + cli_errors "go.mondoo.com/cnquery/v10/cli/errors" + "go.mondoo.com/cnquery/v10/cli/theme" + "go.mondoo.com/cnquery/v10/providers" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/sysinfo" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream/health" "go.mondoo.com/ranger-rpc" "sigs.k8s.io/yaml" ) diff --git a/apps/cnquery/cmd/vault.go b/apps/cnquery/cmd/vault.go index 337cb5e305..0ad500e92d 100644 --- a/apps/cnquery/cmd/vault.go +++ b/apps/cnquery/cmd/vault.go @@ -12,8 +12,8 @@ import ( "github.com/rs/zerolog/log" "github.com/spf13/cobra" "github.com/spf13/viper" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" ) func init() { diff --git a/apps/cnquery/cmd/version.go b/apps/cnquery/cmd/version.go index a37c4f0dfa..eccb9194f1 100644 --- a/apps/cnquery/cmd/version.go +++ b/apps/cnquery/cmd/version.go @@ -7,7 +7,7 @@ import ( "fmt" "github.com/spf13/cobra" - "go.mondoo.com/cnquery/v9" + "go.mondoo.com/cnquery/v10" ) // versionCmd represents the version command diff --git a/apps/cnquery/cnquery.go b/apps/cnquery/cnquery.go index 57ebb63d2f..13f5c514bc 100644 --- a/apps/cnquery/cnquery.go +++ b/apps/cnquery/cnquery.go @@ -4,9 +4,9 @@ package main import ( - "go.mondoo.com/cnquery/v9" - "go.mondoo.com/cnquery/v9/apps/cnquery/cmd" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream/health" + "go.mondoo.com/cnquery/v10" + "go.mondoo.com/cnquery/v10/apps/cnquery/cmd" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream/health" ) func main() { diff --git a/apps/gen-docs/main.go b/apps/gen-docs/main.go index 9df00f626c..d50f748252 100644 --- a/apps/gen-docs/main.go +++ b/apps/gen-docs/main.go @@ -8,7 +8,7 @@ import ( "github.com/rs/zerolog/log" "github.com/spf13/pflag" - "go.mondoo.com/cnquery/v9/apps/cnquery/cmd" + "go.mondoo.com/cnquery/v10/apps/cnquery/cmd" ) func main() { diff --git a/apps/provider-scaffold/provider-scaffold_test.go b/apps/provider-scaffold/provider-scaffold_test.go index 2a1f36d47e..84bd45fd8f 100644 --- a/apps/provider-scaffold/provider-scaffold_test.go +++ b/apps/provider-scaffold/provider-scaffold_test.go @@ -12,7 +12,7 @@ func TestGenerator(t *testing.T) { Path: "../../cnquery/providers/oci", ProviderID: "oci", ProviderName: "Oracle Cloud Infrastructure", - GoPackage: "go.mondoo.com/cnquery/v9/providers/oci", + GoPackage: "go.mondoo.com/cnquery/v10/providers/oci", CamelcaseProviderID: "Oci", } diff --git a/apps/provider-scaffold/template/config/config.go.template b/apps/provider-scaffold/template/config/config.go.template index 6700aabcd8..e47b7ba6d4 100644 --- a/apps/provider-scaffold/template/config/config.go.template +++ b/apps/provider-scaffold/template/config/config.go.template @@ -1,7 +1,7 @@ package config import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" "{{ .GoPackage }}/provider" ) diff --git a/apps/provider-scaffold/template/connection/connection.go.template b/apps/provider-scaffold/template/connection/connection.go.template index 2087f779b2..17f5b62389 100644 --- a/apps/provider-scaffold/template/connection/connection.go.template +++ b/apps/provider-scaffold/template/connection/connection.go.template @@ -1,7 +1,7 @@ package connection import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" ) type {{ .CamelcaseProviderID }}Connection struct { diff --git a/apps/provider-scaffold/template/gen/main.go.template b/apps/provider-scaffold/template/gen/main.go.template index 5516ec5c5c..00092d07d9 100644 --- a/apps/provider-scaffold/template/gen/main.go.template +++ b/apps/provider-scaffold/template/gen/main.go.template @@ -1,7 +1,7 @@ package main import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin/gen" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin/gen" "{{ .GoPackage }}/config" ) diff --git a/apps/provider-scaffold/template/main.go.template b/apps/provider-scaffold/template/main.go.template index 49406691ac..56c96cf26d 100644 --- a/apps/provider-scaffold/template/main.go.template +++ b/apps/provider-scaffold/template/main.go.template @@ -3,8 +3,8 @@ package main import ( "os" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/{{ .ProviderID }}/provider" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/{{ .ProviderID }}/provider" ) func main() { diff --git a/apps/provider-scaffold/template/provider/provider.go.template b/apps/provider-scaffold/template/provider/provider.go.template index 4169d45dae..bcb8574711 100644 --- a/apps/provider-scaffold/template/provider/provider.go.template +++ b/apps/provider-scaffold/template/provider/provider.go.template @@ -4,10 +4,10 @@ import ( "errors" "strconv" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream" "{{ .GoPackage }}/connection" "{{ .GoPackage }}/resources" ) diff --git a/checksums/bench/checksum_test.go b/checksums/bench/checksum_test.go index de01d89fb8..dcaa59b883 100644 --- a/checksums/bench/checksum_test.go +++ b/checksums/bench/checksum_test.go @@ -9,7 +9,7 @@ import ( "testing" "github.com/segmentio/fasthash/fnv1a" - "go.mondoo.com/cnquery/v9/checksums" + "go.mondoo.com/cnquery/v10/checksums" ) var result string diff --git a/cli/components/assetlist.go b/cli/components/assetlist.go index a048805987..763bb688a4 100644 --- a/cli/components/assetlist.go +++ b/cli/components/assetlist.go @@ -7,8 +7,8 @@ import ( "strings" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/cli/theme" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/cli/theme" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" ) func AssetList(theme *theme.Theme, assetList []*inventory.Asset) string { diff --git a/cli/components/assetselect.go b/cli/components/assetselect.go index 0af326779a..fd5180e6aa 100644 --- a/cli/components/assetselect.go +++ b/cli/components/assetselect.go @@ -9,7 +9,7 @@ import ( tea "github.com/charmbracelet/bubbletea" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" ) func AssetSelect(assetList []*inventory.Asset) *inventory.Asset { diff --git a/cli/config/config.go b/cli/config/config.go index a97d1201aa..f1849529b7 100644 --- a/cli/config/config.go +++ b/cli/config/config.go @@ -13,9 +13,9 @@ import ( "github.com/rs/zerolog/log" "github.com/spf13/cobra" "github.com/spf13/viper" - "go.mondoo.com/cnquery/v9" - "go.mondoo.com/cnquery/v9/logger" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream" + "go.mondoo.com/cnquery/v10" + "go.mondoo.com/cnquery/v10/logger" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream" ) /* diff --git a/cli/inventoryloader/inventory.go b/cli/inventoryloader/inventory.go index c1d3d1e807..4e6181a2bf 100644 --- a/cli/inventoryloader/inventory.go +++ b/cli/inventoryloader/inventory.go @@ -12,9 +12,9 @@ import ( "github.com/cockroachdb/errors" "github.com/rs/zerolog/log" "github.com/spf13/viper" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory/ansibleinventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory/domainlist" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory/ansibleinventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory/domainlist" ) func loadDataPipe() ([]byte, bool) { diff --git a/cli/printer/mql.go b/cli/printer/mql.go index 0bec80072d..495739c633 100644 --- a/cli/printer/mql.go +++ b/cli/printer/mql.go @@ -10,10 +10,10 @@ import ( "strings" "time" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/mqlc" - "go.mondoo.com/cnquery/v9/types" - "go.mondoo.com/cnquery/v9/utils/sortx" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/mqlc" + "go.mondoo.com/cnquery/v10/types" + "go.mondoo.com/cnquery/v10/utils/sortx" "golang.org/x/exp/slices" ) diff --git a/cli/printer/printer.go b/cli/printer/printer.go index b8a771e359..22898d7356 100644 --- a/cli/printer/printer.go +++ b/cli/printer/printer.go @@ -9,8 +9,8 @@ import ( "strings" "github.com/muesli/termenv" - "go.mondoo.com/cnquery/v9/cli/theme/colors" - "go.mondoo.com/cnquery/v9/llx" + "go.mondoo.com/cnquery/v10/cli/theme/colors" + "go.mondoo.com/cnquery/v10/llx" ) // Printer turns code into human-readable strings diff --git a/cli/printer/printer_test.go b/cli/printer/printer_test.go index 313bbe4049..651fd2b8cc 100644 --- a/cli/printer/printer_test.go +++ b/cli/printer/printer_test.go @@ -9,10 +9,10 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/logger" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/testutils" - "go.mondoo.com/cnquery/v9/utils/sortx" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/logger" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/testutils" + "go.mondoo.com/cnquery/v10/utils/sortx" ) var x = testutils.InitTester(testutils.LinuxMock()) diff --git a/cli/progress/multiprogress.go b/cli/progress/multiprogress.go index e01a2ba043..779436186b 100644 --- a/cli/progress/multiprogress.go +++ b/cli/progress/multiprogress.go @@ -13,9 +13,9 @@ import ( "github.com/charmbracelet/bubbles/progress" tea "github.com/charmbracelet/bubbletea" "github.com/muesli/reflow/ansi" - "go.mondoo.com/cnquery/v9/cli/components" - "go.mondoo.com/cnquery/v9/cli/theme" - "go.mondoo.com/cnquery/v9/logger" + "go.mondoo.com/cnquery/v10/cli/components" + "go.mondoo.com/cnquery/v10/cli/theme" + "go.mondoo.com/cnquery/v10/logger" ) type ProgressOption = func(*modelMultiProgress) diff --git a/cli/progress/progress.go b/cli/progress/progress.go index 5df5c3363d..22b92f9c72 100644 --- a/cli/progress/progress.go +++ b/cli/progress/progress.go @@ -13,8 +13,8 @@ import ( tea "github.com/charmbracelet/bubbletea" "github.com/mattn/go-isatty" "github.com/muesli/termenv" - "go.mondoo.com/cnquery/v9/logger" - "go.mondoo.com/cnquery/v9/utils/multierr" + "go.mondoo.com/cnquery/v10/logger" + "go.mondoo.com/cnquery/v10/utils/multierr" ) type Progress interface { diff --git a/cli/progress/renderer.go b/cli/progress/renderer.go index ef6f8305d0..469b1fabb3 100644 --- a/cli/progress/renderer.go +++ b/cli/progress/renderer.go @@ -11,7 +11,7 @@ import ( "github.com/lucasb-eyer/go-colorful" "github.com/muesli/ansi" "github.com/muesli/termenv" - "go.mondoo.com/cnquery/v9/cli/theme/colors" + "go.mondoo.com/cnquery/v10/cli/theme/colors" ) var color func(string) termenv.Color = colors.Profile.Color diff --git a/cli/providers/providers.go b/cli/providers/providers.go index dd57d73d5f..6d8abee103 100644 --- a/cli/providers/providers.go +++ b/cli/providers/providers.go @@ -12,12 +12,12 @@ import ( "github.com/spf13/cobra" "github.com/spf13/pflag" "github.com/spf13/viper" - "go.mondoo.com/cnquery/v9/cli/components" - "go.mondoo.com/cnquery/v9/cli/config" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/cli/components" + "go.mondoo.com/cnquery/v10/cli/config" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/types" ) type Command struct { diff --git a/cli/reporter/cli.go b/cli/reporter/cli.go index 610ec45d88..af624a0cc5 100644 --- a/cli/reporter/cli.go +++ b/cli/reporter/cli.go @@ -10,10 +10,10 @@ import ( "strconv" "github.com/muesli/termenv" - "go.mondoo.com/cnquery/v9/explorer" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/mrn" - "go.mondoo.com/cnquery/v9/utils/stringx" + "go.mondoo.com/cnquery/v10/explorer" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/mrn" + "go.mondoo.com/cnquery/v10/utils/stringx" ) type cliReporter struct { diff --git a/cli/reporter/csv.go b/cli/reporter/csv.go index ef6b6ba724..a527f5c75b 100644 --- a/cli/reporter/csv.go +++ b/cli/reporter/csv.go @@ -7,10 +7,10 @@ import ( "bytes" "encoding/csv" - "go.mondoo.com/cnquery/v9/explorer" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/mrn" - "go.mondoo.com/cnquery/v9/shared" + "go.mondoo.com/cnquery/v10/explorer" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/mrn" + "go.mondoo.com/cnquery/v10/shared" ) type csvStruct struct { diff --git a/cli/reporter/csv_test.go b/cli/reporter/csv_test.go index 8fc6f7b2f1..bc9055d966 100644 --- a/cli/reporter/csv_test.go +++ b/cli/reporter/csv_test.go @@ -8,8 +8,8 @@ import ( "testing" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/explorer" - "go.mondoo.com/cnquery/v9/shared" + "go.mondoo.com/cnquery/v10/explorer" + "go.mondoo.com/cnquery/v10/shared" "sigs.k8s.io/yaml" ) diff --git a/cli/reporter/json.go b/cli/reporter/json.go index 054e689969..4f76a4905d 100644 --- a/cli/reporter/json.go +++ b/cli/reporter/json.go @@ -7,9 +7,9 @@ import ( "encoding/json" "errors" - "go.mondoo.com/cnquery/v9/explorer" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/shared" + "go.mondoo.com/cnquery/v10/explorer" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/shared" ) func BundleResultsToJSON(code *llx.CodeBundle, results map[string]*llx.RawResult, out shared.OutputHelper) error { diff --git a/cli/reporter/json_test.go b/cli/reporter/json_test.go index 1b33ab4140..5ce10d3d91 100644 --- a/cli/reporter/json_test.go +++ b/cli/reporter/json_test.go @@ -9,9 +9,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/testutils" - "go.mondoo.com/cnquery/v9/shared" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/testutils" + "go.mondoo.com/cnquery/v10/shared" ) var x = testutils.InitTester(testutils.LinuxMock()) diff --git a/cli/reporter/reporter.go b/cli/reporter/reporter.go index f14152186c..b0f7507787 100644 --- a/cli/reporter/reporter.go +++ b/cli/reporter/reporter.go @@ -10,13 +10,13 @@ import ( "sort" "strings" - "go.mondoo.com/cnquery/v9/logger" + "go.mondoo.com/cnquery/v10/logger" "sigs.k8s.io/yaml" - "go.mondoo.com/cnquery/v9/cli/printer" - "go.mondoo.com/cnquery/v9/cli/theme/colors" - "go.mondoo.com/cnquery/v9/explorer" - "go.mondoo.com/cnquery/v9/shared" + "go.mondoo.com/cnquery/v10/cli/printer" + "go.mondoo.com/cnquery/v10/cli/theme/colors" + "go.mondoo.com/cnquery/v10/explorer" + "go.mondoo.com/cnquery/v10/shared" ) type Format byte diff --git a/cli/shell/completer.go b/cli/shell/completer.go index d35cf04061..29afb9fb68 100644 --- a/cli/shell/completer.go +++ b/cli/shell/completer.go @@ -5,9 +5,9 @@ package shell import ( "github.com/c-bata/go-prompt" - "go.mondoo.com/cnquery/v9" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/mqlc" + "go.mondoo.com/cnquery/v10" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/mqlc" ) var completerSeparator = string([]byte{'.', ' '}) diff --git a/cli/shell/shell.go b/cli/shell/shell.go index 31518623b2..d89612d96b 100644 --- a/cli/shell/shell.go +++ b/cli/shell/shell.go @@ -18,18 +18,18 @@ import ( prompt "github.com/c-bata/go-prompt" "github.com/mitchellh/go-homedir" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9" - "go.mondoo.com/cnquery/v9/cli/theme" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/mql" - "go.mondoo.com/cnquery/v9/mqlc" - "go.mondoo.com/cnquery/v9/mqlc/parser" - "go.mondoo.com/cnquery/v9/providers" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/resources" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream" - "go.mondoo.com/cnquery/v9/types" - "go.mondoo.com/cnquery/v9/utils/sortx" - "go.mondoo.com/cnquery/v9/utils/stringx" + "go.mondoo.com/cnquery/v10" + "go.mondoo.com/cnquery/v10/cli/theme" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/mql" + "go.mondoo.com/cnquery/v10/mqlc" + "go.mondoo.com/cnquery/v10/mqlc/parser" + "go.mondoo.com/cnquery/v10/providers" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/resources" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream" + "go.mondoo.com/cnquery/v10/types" + "go.mondoo.com/cnquery/v10/utils/sortx" + "go.mondoo.com/cnquery/v10/utils/stringx" ) type ShellOption func(c *Shell) diff --git a/cli/shell/shell_test.go b/cli/shell/shell_test.go index 22803e1b75..50ffa92b64 100644 --- a/cli/shell/shell_test.go +++ b/cli/shell/shell_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/stretchr/testify/assert" - "go.mondoo.com/cnquery/v9/cli/shell" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/testutils" + "go.mondoo.com/cnquery/v10/cli/shell" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/testutils" ) func localShell() *shell.Shell { diff --git a/cli/theme/os_colors.go b/cli/theme/os_colors.go index f1156fae6e..081e44101d 100644 --- a/cli/theme/os_colors.go +++ b/cli/theme/os_colors.go @@ -10,8 +10,8 @@ import ( prompt "github.com/c-bata/go-prompt" "github.com/muesli/termenv" - "go.mondoo.com/cnquery/v9/cli/printer" - "go.mondoo.com/cnquery/v9/cli/theme/colors" + "go.mondoo.com/cnquery/v10/cli/printer" + "go.mondoo.com/cnquery/v10/cli/theme/colors" ) // OperatingSystemTheme for unix shell diff --git a/cli/theme/os_colors_windows.go b/cli/theme/os_colors_windows.go index 6b97685315..64835e4a67 100644 --- a/cli/theme/os_colors_windows.go +++ b/cli/theme/os_colors_windows.go @@ -8,8 +8,8 @@ import ( prompt "github.com/c-bata/go-prompt" "github.com/muesli/termenv" - "go.mondoo.com/cnquery/v9/cli/printer" - "go.mondoo.com/cnquery/v9/cli/theme/colors" + "go.mondoo.com/cnquery/v10/cli/printer" + "go.mondoo.com/cnquery/v10/cli/theme/colors" ) // OperatingSystemTheme for windows shell diff --git a/cli/theme/theme.go b/cli/theme/theme.go index eb9bc92a79..e9509e663a 100644 --- a/cli/theme/theme.go +++ b/cli/theme/theme.go @@ -8,8 +8,8 @@ import ( "github.com/c-bata/go-prompt" "github.com/muesli/termenv" - "go.mondoo.com/cnquery/v9/cli/printer" - "go.mondoo.com/cnquery/v9/cli/theme/colors" + "go.mondoo.com/cnquery/v10/cli/printer" + "go.mondoo.com/cnquery/v10/cli/theme/colors" ) type PromptColors struct { diff --git a/explorer/bundle.go b/explorer/bundle.go index 92886a0ee2..68e0069bb0 100644 --- a/explorer/bundle.go +++ b/explorer/bundle.go @@ -13,12 +13,12 @@ import ( "github.com/rs/zerolog/log" "github.com/segmentio/ksuid" - "go.mondoo.com/cnquery/v9" - "go.mondoo.com/cnquery/v9/checksums" - llx "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/mqlc" - "go.mondoo.com/cnquery/v9/mrn" - "go.mondoo.com/cnquery/v9/utils/multierr" + "go.mondoo.com/cnquery/v10" + "go.mondoo.com/cnquery/v10/checksums" + llx "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/mqlc" + "go.mondoo.com/cnquery/v10/mrn" + "go.mondoo.com/cnquery/v10/utils/multierr" "sigs.k8s.io/yaml" ) diff --git a/explorer/bundle_test.go b/explorer/bundle_test.go index f04017d98c..8b5396e70f 100644 --- a/explorer/bundle_test.go +++ b/explorer/bundle_test.go @@ -10,9 +10,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9" - "go.mondoo.com/cnquery/v9/mqlc" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/testutils" + "go.mondoo.com/cnquery/v10" + "go.mondoo.com/cnquery/v10/mqlc" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/testutils" ) var ( diff --git a/explorer/cnquery_explorer.pb.go b/explorer/cnquery_explorer.pb.go index 66780e7561..df855670b2 100644 --- a/explorer/cnquery_explorer.pb.go +++ b/explorer/cnquery_explorer.pb.go @@ -10,8 +10,8 @@ package explorer import ( - llx "go.mondoo.com/cnquery/v9/llx" - inventory "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" + llx "go.mondoo.com/cnquery/v10/llx" + inventory "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" anypb "google.golang.org/protobuf/types/known/anypb" diff --git a/explorer/cnquery_explorer.proto b/explorer/cnquery_explorer.proto index 6bdce268ce..2e3dae9e27 100644 --- a/explorer/cnquery_explorer.proto +++ b/explorer/cnquery_explorer.proto @@ -9,7 +9,7 @@ import "google/protobuf/any.proto"; import "llx/llx.proto"; import "providers-sdk/v1/inventory/inventory.proto"; -option go_package = "go.mondoo.com/cnquery/v9/explorer"; +option go_package = "go.mondoo.com/cnquery/v10/explorer"; message Bundle { string owner_mrn = 1; diff --git a/explorer/datalake.go b/explorer/datalake.go index acad0c810f..13532562ab 100644 --- a/explorer/datalake.go +++ b/explorer/datalake.go @@ -6,8 +6,8 @@ package explorer import ( "context" - llx "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/types" + llx "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/types" ) // DataLake provides a shared database access layer diff --git a/explorer/executor/executor.go b/explorer/executor/executor.go index ffe979c98c..c1c33b9ef7 100644 --- a/explorer/executor/executor.go +++ b/explorer/executor/executor.go @@ -10,12 +10,12 @@ import ( "time" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9" - "go.mondoo.com/cnquery/v9/cli/progress" - "go.mondoo.com/cnquery/v9/explorer" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/mqlc" - "go.mondoo.com/cnquery/v9/utils/multierr" + "go.mondoo.com/cnquery/v10" + "go.mondoo.com/cnquery/v10/cli/progress" + "go.mondoo.com/cnquery/v10/explorer" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/mqlc" + "go.mondoo.com/cnquery/v10/utils/multierr" ) func RunExecutionJob( diff --git a/explorer/executor/mustcompile.go b/explorer/executor/mustcompile.go index a6f420a9ac..fef3ec37a4 100644 --- a/explorer/executor/mustcompile.go +++ b/explorer/executor/mustcompile.go @@ -4,10 +4,10 @@ package executor import ( - "go.mondoo.com/cnquery/v9" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/mqlc" - "go.mondoo.com/cnquery/v9/providers" + "go.mondoo.com/cnquery/v10" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/mqlc" + "go.mondoo.com/cnquery/v10/providers" ) func MustCompile(code string) *llx.CodeBundle { diff --git a/explorer/filters.go b/explorer/filters.go index 9dee5f9a2b..08e1158a53 100644 --- a/explorer/filters.go +++ b/explorer/filters.go @@ -11,9 +11,9 @@ import ( "strconv" "strings" - "go.mondoo.com/cnquery/v9/checksums" - "go.mondoo.com/cnquery/v9/mqlc" - "go.mondoo.com/cnquery/v9/utils/multierr" + "go.mondoo.com/cnquery/v10/checksums" + "go.mondoo.com/cnquery/v10/mqlc" + "go.mondoo.com/cnquery/v10/utils/multierr" ) // NewFilters creates a Filters object from a simple list of MQL snippets diff --git a/explorer/filters_test.go b/explorer/filters_test.go index 45d99a2a42..dd11ac4841 100644 --- a/explorer/filters_test.go +++ b/explorer/filters_test.go @@ -9,8 +9,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/explorer" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/testutils" + "go.mondoo.com/cnquery/v10/explorer" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/testutils" ) func TestNewFilters(t *testing.T) { diff --git a/explorer/impact.go b/explorer/impact.go index d53f512a4d..09ee99c75a 100644 --- a/explorer/impact.go +++ b/explorer/impact.go @@ -7,7 +7,7 @@ import ( "encoding/json" "errors" - "go.mondoo.com/cnquery/v9/checksums" + "go.mondoo.com/cnquery/v10/checksums" "gopkg.in/yaml.v3" ) diff --git a/explorer/mquery.go b/explorer/mquery.go index b6df648a10..ed9416ee3f 100644 --- a/explorer/mquery.go +++ b/explorer/mquery.go @@ -11,13 +11,13 @@ import ( "strings" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/checksums" - llx "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/mqlc" - "go.mondoo.com/cnquery/v9/mrn" - "go.mondoo.com/cnquery/v9/types" - "go.mondoo.com/cnquery/v9/utils/multierr" - "go.mondoo.com/cnquery/v9/utils/sortx" + "go.mondoo.com/cnquery/v10/checksums" + llx "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/mqlc" + "go.mondoo.com/cnquery/v10/mrn" + "go.mondoo.com/cnquery/v10/types" + "go.mondoo.com/cnquery/v10/utils/multierr" + "go.mondoo.com/cnquery/v10/utils/sortx" "google.golang.org/protobuf/proto" ) diff --git a/explorer/mquery_test.go b/explorer/mquery_test.go index 04a1a43347..9179b360aa 100644 --- a/explorer/mquery_test.go +++ b/explorer/mquery_test.go @@ -10,9 +10,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9" - "go.mondoo.com/cnquery/v9/mqlc" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/testutils" + "go.mondoo.com/cnquery/v10" + "go.mondoo.com/cnquery/v10/mqlc" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/testutils" ) func TestMquery_RefreshAsAssetFilterStableChecksum(t *testing.T) { diff --git a/explorer/property.go b/explorer/property.go index 4f4e477d7d..7aa7c05212 100644 --- a/explorer/property.go +++ b/explorer/property.go @@ -7,12 +7,12 @@ import ( "errors" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/checksums" - llx "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/mqlc" - "go.mondoo.com/cnquery/v9/mrn" - "go.mondoo.com/cnquery/v9/types" - "go.mondoo.com/cnquery/v9/utils/multierr" + "go.mondoo.com/cnquery/v10/checksums" + llx "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/mqlc" + "go.mondoo.com/cnquery/v10/mrn" + "go.mondoo.com/cnquery/v10/types" + "go.mondoo.com/cnquery/v10/utils/multierr" "google.golang.org/protobuf/proto" ) diff --git a/explorer/query_conductor.go b/explorer/query_conductor.go index 6829d7f736..19c7968ec5 100644 --- a/explorer/query_conductor.go +++ b/explorer/query_conductor.go @@ -10,11 +10,11 @@ import ( "strings" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9" - llx "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/mqlc" - "go.mondoo.com/cnquery/v9/mrn" - "go.mondoo.com/cnquery/v9/utils/multierr" + "go.mondoo.com/cnquery/v10" + llx "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/mqlc" + "go.mondoo.com/cnquery/v10/mrn" + "go.mondoo.com/cnquery/v10/utils/multierr" "go.mondoo.com/ranger-rpc/codes" "go.mondoo.com/ranger-rpc/status" "google.golang.org/genproto/googleapis/rpc/errdetails" diff --git a/explorer/query_conductor_test.go b/explorer/query_conductor_test.go index 2e5bf4c598..9a0a313bf2 100644 --- a/explorer/query_conductor_test.go +++ b/explorer/query_conductor_test.go @@ -8,9 +8,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9" - "go.mondoo.com/cnquery/v9/mqlc" - "go.mondoo.com/cnquery/v9/providers" + "go.mondoo.com/cnquery/v10" + "go.mondoo.com/cnquery/v10/mqlc" + "go.mondoo.com/cnquery/v10/providers" ) func TestMatchFilters(t *testing.T) { diff --git a/explorer/query_hub.go b/explorer/query_hub.go index a7ea0e2f4d..7075dfc29b 100644 --- a/explorer/query_hub.go +++ b/explorer/query_hub.go @@ -9,11 +9,11 @@ import ( "os" "path" - "go.mondoo.com/cnquery/v9/mrn" + "go.mondoo.com/cnquery/v10/mrn" "go.mondoo.com/ranger-rpc" - "go.mondoo.com/cnquery/v9/logger" + "go.mondoo.com/cnquery/v10/logger" "go.mondoo.com/ranger-rpc/codes" "go.mondoo.com/ranger-rpc/status" "go.opentelemetry.io/otel" @@ -26,7 +26,7 @@ const ( CollectionIDQueryPacks = "querypacks" ) -var tracer = otel.Tracer("go.mondoo.com/cnquery/v9/explorer") +var tracer = otel.Tracer("go.mondoo.com/cnquery/v10/explorer") func NewQueryPackMrn(namespace string, uid string) string { m := &mrn.MRN{ diff --git a/explorer/querypack.go b/explorer/querypack.go index c0948ef011..78298aa867 100644 --- a/explorer/querypack.go +++ b/explorer/querypack.go @@ -9,9 +9,9 @@ import ( "sort" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/checksums" - "go.mondoo.com/cnquery/v9/utils/multierr" - "go.mondoo.com/cnquery/v9/utils/sortx" + "go.mondoo.com/cnquery/v10/checksums" + "go.mondoo.com/cnquery/v10/utils/multierr" + "go.mondoo.com/cnquery/v10/utils/sortx" ) func (p *QueryPack) InvalidateAllChecksums() { diff --git a/explorer/report.go b/explorer/report.go index b6fd2119b8..27ea4a1632 100644 --- a/explorer/report.go +++ b/explorer/report.go @@ -3,7 +3,7 @@ package explorer -import llx "go.mondoo.com/cnquery/v9/llx" +import llx "go.mondoo.com/cnquery/v10/llx" func (r *Report) RawResults() map[string]*llx.RawResult { results := map[string]*llx.RawResult{} diff --git a/explorer/scan/cnquery_explorer_scan.pb.go b/explorer/scan/cnquery_explorer_scan.pb.go index abfbb64d84..15b7d5c18d 100644 --- a/explorer/scan/cnquery_explorer_scan.pb.go +++ b/explorer/scan/cnquery_explorer_scan.pb.go @@ -10,8 +10,8 @@ package scan import ( - explorer "go.mondoo.com/cnquery/v9/explorer" - inventory "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" + explorer "go.mondoo.com/cnquery/v10/explorer" + inventory "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" diff --git a/explorer/scan/cnquery_explorer_scan.proto b/explorer/scan/cnquery_explorer_scan.proto index c0683c2a0c..2e0ec95280 100644 --- a/explorer/scan/cnquery_explorer_scan.proto +++ b/explorer/scan/cnquery_explorer_scan.proto @@ -8,7 +8,7 @@ package cnquery.explorer.scan; import "explorer/cnquery_explorer.proto"; import "providers-sdk/v1/inventory/inventory.proto"; -option go_package = "go.mondoo.com/cnquery/v9/explorer/scan"; +option go_package = "go.mondoo.com/cnquery/v10/explorer/scan"; message Job { cnquery.providers.v1.Inventory inventory = 1; diff --git a/explorer/scan/fetcher.go b/explorer/scan/fetcher.go index 1550931480..529b35ea54 100644 --- a/explorer/scan/fetcher.go +++ b/explorer/scan/fetcher.go @@ -9,10 +9,10 @@ import ( "io" "net/http" - "go.mondoo.com/cnquery/v9" - "go.mondoo.com/cnquery/v9/explorer" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/utils/multierr" + "go.mondoo.com/cnquery/v10" + "go.mondoo.com/cnquery/v10/explorer" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/utils/multierr" ) type fetcher struct { diff --git a/explorer/scan/local_scanner.go b/explorer/scan/local_scanner.go index 67a01133b4..aad1bdc69f 100644 --- a/explorer/scan/local_scanner.go +++ b/explorer/scan/local_scanner.go @@ -12,27 +12,27 @@ import ( sync "sync" "time" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory/manager" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory/manager" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" "github.com/mattn/go-isatty" "github.com/rs/zerolog/log" "github.com/segmentio/ksuid" "github.com/spf13/viper" - "go.mondoo.com/cnquery/v9" - "go.mondoo.com/cnquery/v9/cli/config" - "go.mondoo.com/cnquery/v9/cli/progress" - "go.mondoo.com/cnquery/v9/explorer" - "go.mondoo.com/cnquery/v9/explorer/executor" - "go.mondoo.com/cnquery/v9/internal/datalakes/inmemory" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/logger" - "go.mondoo.com/cnquery/v9/mql" - "go.mondoo.com/cnquery/v9/mrn" - "go.mondoo.com/cnquery/v9/providers" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream" - "go.mondoo.com/cnquery/v9/utils/multierr" + "go.mondoo.com/cnquery/v10" + "go.mondoo.com/cnquery/v10/cli/config" + "go.mondoo.com/cnquery/v10/cli/progress" + "go.mondoo.com/cnquery/v10/explorer" + "go.mondoo.com/cnquery/v10/explorer/executor" + "go.mondoo.com/cnquery/v10/internal/datalakes/inmemory" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/logger" + "go.mondoo.com/cnquery/v10/mql" + "go.mondoo.com/cnquery/v10/mrn" + "go.mondoo.com/cnquery/v10/providers" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream" + "go.mondoo.com/cnquery/v10/utils/multierr" "go.mondoo.com/ranger-rpc/codes" "go.mondoo.com/ranger-rpc/status" "google.golang.org/protobuf/proto" diff --git a/explorer/scan/reporter.go b/explorer/scan/reporter.go index a590917645..f53df398e1 100644 --- a/explorer/scan/reporter.go +++ b/explorer/scan/reporter.go @@ -4,9 +4,9 @@ package scan import ( - "go.mondoo.com/cnquery/v9/explorer" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/utils/multierr" + "go.mondoo.com/cnquery/v10/explorer" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/utils/multierr" ) type Reporter interface { diff --git a/explorer/scan/scan.go b/explorer/scan/scan.go index 72d687855b..2ffc9de4a0 100644 --- a/explorer/scan/scan.go +++ b/explorer/scan/scan.go @@ -8,11 +8,11 @@ import ( "math/rand" "time" - "go.mondoo.com/cnquery/v9/cli/progress" - "go.mondoo.com/cnquery/v9/explorer" - "go.mondoo.com/cnquery/v9/providers" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream" + "go.mondoo.com/cnquery/v10/cli/progress" + "go.mondoo.com/cnquery/v10/explorer" + "go.mondoo.com/cnquery/v10/providers" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream" ) //go:generate protoc --proto_path=../../:. --go_out=. --go_opt=paths=source_relative --rangerrpc_out=. cnquery_explorer_scan.proto diff --git a/explorer/services.go b/explorer/services.go index 0e29b5849c..f852332291 100644 --- a/explorer/services.go +++ b/explorer/services.go @@ -6,7 +6,7 @@ package explorer import ( "net/http" - llx "go.mondoo.com/cnquery/v9/llx" + llx "go.mondoo.com/cnquery/v10/llx" "go.mondoo.com/ranger-rpc" "golang.org/x/sync/semaphore" ) diff --git a/go.mod b/go.mod index 424bf343a7..97f9356b82 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module go.mondoo.com/cnquery/v9 +module go.mondoo.com/cnquery/v10 go 1.21 diff --git a/internal/datalakes/inmemory/assets.go b/internal/datalakes/inmemory/assets.go index e976ffcf39..92b91e7fe8 100644 --- a/internal/datalakes/inmemory/assets.go +++ b/internal/datalakes/inmemory/assets.go @@ -8,7 +8,7 @@ import ( "errors" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/explorer" + "go.mondoo.com/cnquery/v10/explorer" ) type wrapAsset struct { diff --git a/internal/datalakes/inmemory/inmemory.go b/internal/datalakes/inmemory/inmemory.go index 21dcf02e8e..0041382729 100644 --- a/internal/datalakes/inmemory/inmemory.go +++ b/internal/datalakes/inmemory/inmemory.go @@ -7,8 +7,8 @@ import ( "time" "github.com/google/uuid" - "go.mondoo.com/cnquery/v9/explorer" - "go.mondoo.com/cnquery/v9/llx" + "go.mondoo.com/cnquery/v10/explorer" + "go.mondoo.com/cnquery/v10/llx" ) // Db is the database backend, it allows the interaction with the underlying data. diff --git a/internal/datalakes/inmemory/query_conductor.go b/internal/datalakes/inmemory/query_conductor.go index 79c92cec84..3ac9d23990 100644 --- a/internal/datalakes/inmemory/query_conductor.go +++ b/internal/datalakes/inmemory/query_conductor.go @@ -9,10 +9,10 @@ import ( "fmt" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/explorer" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/types" - "go.mondoo.com/cnquery/v9/utils/multierr" + "go.mondoo.com/cnquery/v10/explorer" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/types" + "go.mondoo.com/cnquery/v10/utils/multierr" ) type wrapResolved struct { diff --git a/internal/datalakes/inmemory/query_hub.go b/internal/datalakes/inmemory/query_hub.go index 40984b3ebe..3d1bfec837 100644 --- a/internal/datalakes/inmemory/query_hub.go +++ b/internal/datalakes/inmemory/query_hub.go @@ -8,8 +8,8 @@ import ( "errors" "strings" - "go.mondoo.com/cnquery/v9/explorer" - "go.mondoo.com/cnquery/v9/mrn" + "go.mondoo.com/cnquery/v10/explorer" + "go.mondoo.com/cnquery/v10/mrn" ) type wrapQuery struct { diff --git a/llx/builtin.go b/llx/builtin.go index 9105915f6e..02353cc94c 100644 --- a/llx/builtin.go +++ b/llx/builtin.go @@ -8,8 +8,8 @@ import ( "fmt" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/resources" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/resources" + "go.mondoo.com/cnquery/v10/types" ) type chunkHandlerV2 struct { diff --git a/llx/builtin_array.go b/llx/builtin_array.go index 044f9934f5..9280900885 100644 --- a/llx/builtin_array.go +++ b/llx/builtin_array.go @@ -7,8 +7,8 @@ import ( "errors" "strconv" - "go.mondoo.com/cnquery/v9/types" - "go.mondoo.com/cnquery/v9/utils/multierr" + "go.mondoo.com/cnquery/v10/types" + "go.mondoo.com/cnquery/v10/utils/multierr" ) var arrayBlockType = types.Array(types.Block) diff --git a/llx/builtin_global.go b/llx/builtin_global.go index 37280bc6a2..36b9b169dd 100644 --- a/llx/builtin_global.go +++ b/llx/builtin_global.go @@ -7,7 +7,7 @@ import ( "errors" "strconv" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/types" ) // handleGlobal takes a global function and returns a handler if found. diff --git a/llx/builtin_map.go b/llx/builtin_map.go index acf909e278..712e1ef61d 100644 --- a/llx/builtin_map.go +++ b/llx/builtin_map.go @@ -10,7 +10,7 @@ import ( "strings" "sync" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/types" ) // mapFunctions are all the handlers for builtin array methods diff --git a/llx/builtin_resource.go b/llx/builtin_resource.go index 3a9933825f..6558a07acf 100644 --- a/llx/builtin_resource.go +++ b/llx/builtin_resource.go @@ -10,7 +10,7 @@ import ( "strings" "time" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/types" ) type Resource interface { diff --git a/llx/builtin_semver.go b/llx/builtin_semver.go index 1b42a783dd..b7da7fcbaf 100644 --- a/llx/builtin_semver.go +++ b/llx/builtin_semver.go @@ -5,7 +5,7 @@ package llx import ( "github.com/Masterminds/semver" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/types" ) func semverLT(left interface{}, right interface{}) *RawData { diff --git a/llx/builtin_simple.go b/llx/builtin_simple.go index afb953b2bf..b50dd907e4 100644 --- a/llx/builtin_simple.go +++ b/llx/builtin_simple.go @@ -12,7 +12,7 @@ import ( "time" "unicode" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/types" ) // run an operation that returns true/false on a bind data vs a chunk call. diff --git a/llx/chunk.go b/llx/chunk.go index b7ac898c0f..116fcd9e7e 100644 --- a/llx/chunk.go +++ b/llx/chunk.go @@ -7,8 +7,8 @@ import ( "encoding/base64" "encoding/binary" - "go.mondoo.com/cnquery/v9/types" - "go.mondoo.com/cnquery/v9/utils/sortx" + "go.mondoo.com/cnquery/v10/types" + "go.mondoo.com/cnquery/v10/utils/sortx" "golang.org/x/crypto/blake2b" ) diff --git a/llx/code.go b/llx/code.go index 6a89cc6fb5..4daa2ba31c 100644 --- a/llx/code.go +++ b/llx/code.go @@ -7,8 +7,8 @@ import ( "bytes" "sort" - "go.mondoo.com/cnquery/v9/checksums" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/checksums" + "go.mondoo.com/cnquery/v10/types" ) func (b *Block) ChunkIndex() uint32 { diff --git a/llx/data_conversions.go b/llx/data_conversions.go index 1d4cd8a07d..c8331296ab 100644 --- a/llx/data_conversions.go +++ b/llx/data_conversions.go @@ -11,7 +11,7 @@ import ( "strconv" "time" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/types" "google.golang.org/protobuf/proto" ) diff --git a/llx/llx.go b/llx/llx.go index 98e29fe0c4..b76a9a0fe8 100644 --- a/llx/llx.go +++ b/llx/llx.go @@ -13,9 +13,9 @@ import ( uuid "github.com/gofrs/uuid" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/resources" - "go.mondoo.com/cnquery/v9/types" - "go.mondoo.com/cnquery/v9/utils/multierr" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/resources" + "go.mondoo.com/cnquery/v10/types" + "go.mondoo.com/cnquery/v10/utils/multierr" ) // ResultCallback function type diff --git a/llx/llx.proto b/llx/llx.proto index fb622b0649..d421d8b84f 100644 --- a/llx/llx.proto +++ b/llx/llx.proto @@ -5,7 +5,7 @@ syntax = "proto3"; package cnquery.llx; -option go_package = "go.mondoo.com/cnquery/v9/llx"; +option go_package = "go.mondoo.com/cnquery/v10/llx"; message Primitive { string type = 1; diff --git a/llx/primitives.go b/llx/primitives.go index 2293e60404..3432f4ce1b 100644 --- a/llx/primitives.go +++ b/llx/primitives.go @@ -12,7 +12,7 @@ import ( "time" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/types" ) // UnsetPrimitive is the unset primitive diff --git a/llx/primitives_test.go b/llx/primitives_test.go index 528082983c..284af3a527 100644 --- a/llx/primitives_test.go +++ b/llx/primitives_test.go @@ -8,8 +8,8 @@ import ( "time" "github.com/stretchr/testify/assert" - "go.mondoo.com/cnquery/v9/logger" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/logger" + "go.mondoo.com/cnquery/v10/types" ) func init() { diff --git a/llx/rawdata.go b/llx/rawdata.go index d5b906562f..9b5f4cedf1 100644 --- a/llx/rawdata.go +++ b/llx/rawdata.go @@ -10,7 +10,7 @@ import ( "strings" "time" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/types" ) // RawData is an internal track of raw data that can be cast to the appropriate types diff --git a/llx/rawdata_deref.go b/llx/rawdata_deref.go index 1361222ab9..dd6b3c8a38 100644 --- a/llx/rawdata_deref.go +++ b/llx/rawdata_deref.go @@ -8,7 +8,7 @@ import ( "fmt" "time" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/types" ) func dereferenceDict(raw interface{}) (*RawData, error) { diff --git a/llx/rawdata_json.go b/llx/rawdata_json.go index 09304aef1a..d12e5e4956 100644 --- a/llx/rawdata_json.go +++ b/llx/rawdata_json.go @@ -13,8 +13,8 @@ import ( "strconv" "time" - "go.mondoo.com/cnquery/v9/types" - "go.mondoo.com/cnquery/v9/utils/sortx" + "go.mondoo.com/cnquery/v10/types" + "go.mondoo.com/cnquery/v10/utils/sortx" ) func intKeys(m map[int]interface{}) []int { diff --git a/llx/rawdata_json_test.go b/llx/rawdata_json_test.go index eff23cd5d8..c1d7c4d129 100644 --- a/llx/rawdata_json_test.go +++ b/llx/rawdata_json_test.go @@ -10,7 +10,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/types" ) func TestRawDataJson_removeUnderscoreKeys(t *testing.T) { diff --git a/llx/rawdata_test.go b/llx/rawdata_test.go index b6ed91191e..c19ed74648 100644 --- a/llx/rawdata_test.go +++ b/llx/rawdata_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/types" ) var now = time.Now() diff --git a/llx/runtime.go b/llx/runtime.go index 44952dce86..3d27bc11bd 100644 --- a/llx/runtime.go +++ b/llx/runtime.go @@ -3,7 +3,7 @@ package llx -import "go.mondoo.com/cnquery/v9/providers-sdk/v1/resources" +import "go.mondoo.com/cnquery/v10/providers-sdk/v1/resources" type Runtime interface { AssetMRN() string diff --git a/llx/types.go b/llx/types.go index cf9cffe508..b751380ca2 100644 --- a/llx/types.go +++ b/llx/types.go @@ -4,7 +4,7 @@ package llx import ( - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/types" ) // Type of this chunk, by looking at either the primitive or function. diff --git a/logger/cliwriter.go b/logger/cliwriter.go index 5dd331e707..9fde69911c 100644 --- a/logger/cliwriter.go +++ b/logger/cliwriter.go @@ -11,7 +11,7 @@ import ( "strings" "github.com/muesli/termenv" - "go.mondoo.com/cnquery/v9/cli/theme/colors" + "go.mondoo.com/cnquery/v10/cli/theme/colors" "github.com/rs/zerolog" "github.com/rs/zerolog/log" diff --git a/mql/internal/builder.go b/mql/internal/builder.go index ba9e73844b..b0c6c3ae68 100644 --- a/mql/internal/builder.go +++ b/mql/internal/builder.go @@ -11,8 +11,8 @@ import ( vrs "github.com/hashicorp/go-version" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9" - "go.mondoo.com/cnquery/v9/llx" + "go.mondoo.com/cnquery/v10" + "go.mondoo.com/cnquery/v10/llx" ) type query struct { diff --git a/mql/internal/builder_test.go b/mql/internal/builder_test.go index f5944175ba..7d6b0b1e21 100644 --- a/mql/internal/builder_test.go +++ b/mql/internal/builder_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/types" ) func TestPrioritizeNode(t *testing.T) { diff --git a/mql/internal/collector.go b/mql/internal/collector.go index 3b34a6dc17..3f51b05b08 100644 --- a/mql/internal/collector.go +++ b/mql/internal/collector.go @@ -8,7 +8,7 @@ import ( "time" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" + "go.mondoo.com/cnquery/v10/llx" ) const ( diff --git a/mql/internal/execution_manager.go b/mql/internal/execution_manager.go index 0a58d7cd45..c01eab36a5 100644 --- a/mql/internal/execution_manager.go +++ b/mql/internal/execution_manager.go @@ -9,7 +9,7 @@ import ( "time" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" + "go.mondoo.com/cnquery/v10/llx" ) type executionManager struct { diff --git a/mql/internal/graph.go b/mql/internal/graph.go index 0f246a8ebe..3ce99d8d6f 100644 --- a/mql/internal/graph.go +++ b/mql/internal/graph.go @@ -11,7 +11,7 @@ import ( vrs "github.com/hashicorp/go-version" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" + "go.mondoo.com/cnquery/v10/llx" ) type ( diff --git a/mql/internal/nodes.go b/mql/internal/nodes.go index 6a4a5b5653..a5c4fe7b65 100644 --- a/mql/internal/nodes.go +++ b/mql/internal/nodes.go @@ -5,8 +5,8 @@ package internal import ( "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/types" ) const ( diff --git a/mql/internal/nodes_test.go b/mql/internal/nodes_test.go index ccbe654c03..b804720e55 100644 --- a/mql/internal/nodes_test.go +++ b/mql/internal/nodes_test.go @@ -9,8 +9,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/types" ) func TestDatapointNode(t *testing.T) { diff --git a/mql/mql.go b/mql/mql.go index c7a122eb45..61035fad30 100644 --- a/mql/mql.go +++ b/mql/mql.go @@ -7,10 +7,10 @@ import ( "errors" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/mql/internal" - "go.mondoo.com/cnquery/v9/mqlc" + "go.mondoo.com/cnquery/v10" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/mql/internal" + "go.mondoo.com/cnquery/v10/mqlc" ) // New creates a new MQL executor instance. It allows you to easily run multiple queries against the diff --git a/mql/mql_test.go b/mql/mql_test.go index 93c7150f16..3b53856efe 100644 --- a/mql/mql_test.go +++ b/mql/mql_test.go @@ -11,11 +11,11 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/mql" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/testutils" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/mql" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/testutils" + "go.mondoo.com/cnquery/v10/types" ) var features cnquery.Features diff --git a/mqlc/assertion.go b/mqlc/assertion.go index 73985004f7..164c60ed87 100644 --- a/mqlc/assertion.go +++ b/mqlc/assertion.go @@ -8,9 +8,9 @@ import ( "strconv" "strings" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/mqlc/parser" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/mqlc/parser" + "go.mondoo.com/cnquery/v10/types" ) func extractComments(c *parser.Expression) string { diff --git a/mqlc/builtin.go b/mqlc/builtin.go index 02110ef0b7..efc4532f41 100644 --- a/mqlc/builtin.go +++ b/mqlc/builtin.go @@ -6,10 +6,10 @@ package mqlc import ( "errors" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/mqlc/parser" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/resources" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/mqlc/parser" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/resources" + "go.mondoo.com/cnquery/v10/types" ) type compileHandler struct { diff --git a/mqlc/builtin_array.go b/mqlc/builtin_array.go index 4261d3f8fe..d1c363d8d4 100644 --- a/mqlc/builtin_array.go +++ b/mqlc/builtin_array.go @@ -6,9 +6,9 @@ package mqlc import ( "errors" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/mqlc/parser" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/mqlc/parser" + "go.mondoo.com/cnquery/v10/types" ) func compileArrayWhere(c *compiler, typ types.Type, ref uint64, id string, call *parser.Call) (types.Type, error) { diff --git a/mqlc/builtin_map.go b/mqlc/builtin_map.go index 095a716cd7..9f32476881 100644 --- a/mqlc/builtin_map.go +++ b/mqlc/builtin_map.go @@ -6,9 +6,9 @@ package mqlc import ( "errors" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/mqlc/parser" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/mqlc/parser" + "go.mondoo.com/cnquery/v10/types" ) func compileDictWhere(c *compiler, typ types.Type, ref uint64, id string, call *parser.Call) (types.Type, error) { diff --git a/mqlc/builtin_resource.go b/mqlc/builtin_resource.go index bd6a5abe81..c80cfeda6c 100644 --- a/mqlc/builtin_resource.go +++ b/mqlc/builtin_resource.go @@ -7,11 +7,11 @@ import ( "errors" "strconv" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/mqlc/parser" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/resources" - "go.mondoo.com/cnquery/v9/types" - "go.mondoo.com/cnquery/v9/utils/multierr" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/mqlc/parser" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/resources" + "go.mondoo.com/cnquery/v10/types" + "go.mondoo.com/cnquery/v10/utils/multierr" ) func compileResourceDefault(c *compiler, typ types.Type, ref uint64, id string, call *parser.Call) (types.Type, error) { diff --git a/mqlc/builtin_simple.go b/mqlc/builtin_simple.go index f63c0b5b2a..19e448c484 100644 --- a/mqlc/builtin_simple.go +++ b/mqlc/builtin_simple.go @@ -7,9 +7,9 @@ import ( "errors" "strconv" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/mqlc/parser" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/mqlc/parser" + "go.mondoo.com/cnquery/v10/types" ) func callArgTypeIs(c *compiler, call *parser.Call, id string, argName string, idx int, types ...types.Type) (*llx.Primitive, error) { diff --git a/mqlc/checksum_test.go b/mqlc/checksum_test.go index 0650ed483e..2bbd381801 100644 --- a/mqlc/checksum_test.go +++ b/mqlc/checksum_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/mqlc" + "go.mondoo.com/cnquery/v10/mqlc" ) func TestIfChecksumming(t *testing.T) { diff --git a/mqlc/invariants.go b/mqlc/invariants.go index aa8eef947a..1a45d01518 100644 --- a/mqlc/invariants.go +++ b/mqlc/invariants.go @@ -6,8 +6,8 @@ package mqlc import ( "fmt" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/utils/multierr" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/utils/multierr" ) // An Invariant is a condition that we expect compiled code to hold. diff --git a/mqlc/labels.go b/mqlc/labels.go index 776bc76303..4bf45da317 100644 --- a/mqlc/labels.go +++ b/mqlc/labels.go @@ -8,8 +8,8 @@ import ( "regexp" "strconv" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/types" "golang.org/x/text/transform" "golang.org/x/text/unicode/norm" ) diff --git a/mqlc/labels_test.go b/mqlc/labels_test.go index 26efe817ac..bfbf910402 100644 --- a/mqlc/labels_test.go +++ b/mqlc/labels_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/stretchr/testify/assert" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/mqlc" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/mqlc" ) func label(t *testing.T, s string, f func(res *llx.Labels)) { diff --git a/mqlc/mqlc.go b/mqlc/mqlc.go index 6841c0899b..c9c180f68b 100644 --- a/mqlc/mqlc.go +++ b/mqlc/mqlc.go @@ -14,12 +14,12 @@ import ( "github.com/hashicorp/go-version" "github.com/lithammer/fuzzysearch/fuzzy" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/mqlc/parser" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/resources" - "go.mondoo.com/cnquery/v9/types" - "go.mondoo.com/cnquery/v9/utils/sortx" + "go.mondoo.com/cnquery/v10" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/mqlc/parser" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/resources" + "go.mondoo.com/cnquery/v10/types" + "go.mondoo.com/cnquery/v10/utils/sortx" ) type ErrIdentifierNotFound struct { diff --git a/mqlc/mqlc_stats.go b/mqlc/mqlc_stats.go index 21b420831a..9664cb5a83 100644 --- a/mqlc/mqlc_stats.go +++ b/mqlc/mqlc_stats.go @@ -9,8 +9,8 @@ import ( "time" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/resources" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/resources" + "go.mondoo.com/cnquery/v10/types" ) type CompilerStats interface { diff --git a/mqlc/mqlc_test.go b/mqlc/mqlc_test.go index 9b0425fcee..065a38dd50 100644 --- a/mqlc/mqlc_test.go +++ b/mqlc/mqlc_test.go @@ -11,13 +11,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/logger" - "go.mondoo.com/cnquery/v9/mqlc" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/logger" + "go.mondoo.com/cnquery/v10/mqlc" + "go.mondoo.com/cnquery/v10/types" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/testutils" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/testutils" ) var ( diff --git a/mqlc/operators.go b/mqlc/operators.go index fa2b1d7c40..ea344d3a12 100644 --- a/mqlc/operators.go +++ b/mqlc/operators.go @@ -7,9 +7,9 @@ import ( "errors" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/mqlc/parser" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/mqlc/parser" + "go.mondoo.com/cnquery/v10/types" ) type fieldCompiler func(*compiler, string, *parser.Call) (types.Type, error) diff --git a/mqlc/parser/parser_test.go b/mqlc/parser/parser_test.go index 78b49e6423..a13b53b593 100644 --- a/mqlc/parser/parser_test.go +++ b/mqlc/parser/parser_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/logger" + "go.mondoo.com/cnquery/v10/logger" ) func init() { diff --git a/providers-sdk/v1/inventory/ansibleinventory/inventory.go b/providers-sdk/v1/inventory/ansibleinventory/inventory.go index 9952f20293..7a851fe296 100644 --- a/providers-sdk/v1/inventory/ansibleinventory/inventory.go +++ b/providers-sdk/v1/inventory/ansibleinventory/inventory.go @@ -10,8 +10,8 @@ import ( "github.com/mitchellh/mapstructure" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" "sigs.k8s.io/yaml" ) diff --git a/providers-sdk/v1/inventory/ansibleinventory/inventory_test.go b/providers-sdk/v1/inventory/ansibleinventory/inventory_test.go index 239cad6399..b451315ee9 100644 --- a/providers-sdk/v1/inventory/ansibleinventory/inventory_test.go +++ b/providers-sdk/v1/inventory/ansibleinventory/inventory_test.go @@ -9,9 +9,9 @@ import ( "testing" "github.com/stretchr/testify/assert" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory/ansibleinventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory/ansibleinventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" ) func TestValidInventory(t *testing.T) { diff --git a/providers-sdk/v1/inventory/domainlist/domainlist.go b/providers-sdk/v1/inventory/domainlist/domainlist.go index f76e4371dc..a71258e15b 100644 --- a/providers-sdk/v1/inventory/domainlist/domainlist.go +++ b/providers-sdk/v1/inventory/domainlist/domainlist.go @@ -12,7 +12,7 @@ import ( "github.com/cockroachdb/errors" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" ) func Parse(input io.Reader) (*Inventory, error) { diff --git a/providers-sdk/v1/inventory/inventory.go b/providers-sdk/v1/inventory/inventory.go index d8a52484d3..0ac96bb14b 100644 --- a/providers-sdk/v1/inventory/inventory.go +++ b/providers-sdk/v1/inventory/inventory.go @@ -11,8 +11,8 @@ import ( "github.com/cockroachdb/errors" "github.com/rs/zerolog/log" "github.com/segmentio/ksuid" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault/config" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault/config" "google.golang.org/protobuf/proto" "sigs.k8s.io/yaml" ) diff --git a/providers-sdk/v1/inventory/inventory.pb.go b/providers-sdk/v1/inventory/inventory.pb.go index abcb4abdb3..758dcdae64 100644 --- a/providers-sdk/v1/inventory/inventory.pb.go +++ b/providers-sdk/v1/inventory/inventory.pb.go @@ -10,8 +10,8 @@ package inventory import ( - upstream "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream" - vault "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" + upstream "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream" + vault "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" diff --git a/providers-sdk/v1/inventory/inventory.proto b/providers-sdk/v1/inventory/inventory.proto index 0c22c1d91a..815a9a59c9 100644 --- a/providers-sdk/v1/inventory/inventory.proto +++ b/providers-sdk/v1/inventory/inventory.proto @@ -7,7 +7,7 @@ package cnquery.providers.v1; import "providers-sdk/v1/upstream/upstream.proto"; import "providers-sdk/v1/vault/vault.proto"; -option go_package = "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory"; +option go_package = "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory"; enum State { // protolint:disable:next ENUM_FIELD_NAMES_ZERO_VALUE_END_WITH diff --git a/providers-sdk/v1/inventory/inventory_test.go b/providers-sdk/v1/inventory/inventory_test.go index 1591f4cc3d..cd605ece7a 100644 --- a/providers-sdk/v1/inventory/inventory_test.go +++ b/providers-sdk/v1/inventory/inventory_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" ) func TestInventoryParser(t *testing.T) { diff --git a/providers-sdk/v1/inventory/manager/credentials_query.go b/providers-sdk/v1/inventory/manager/credentials_query.go index 046a3658a4..b27b96ab2a 100644 --- a/providers-sdk/v1/inventory/manager/credentials_query.go +++ b/providers-sdk/v1/inventory/manager/credentials_query.go @@ -9,12 +9,12 @@ import ( "github.com/cockroachdb/errors" "github.com/mitchellh/mapstructure" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/mql" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/mql" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/types" ) type CredentialQueryResponse struct { diff --git a/providers-sdk/v1/inventory/manager/credentials_query_test.go b/providers-sdk/v1/inventory/manager/credentials_query_test.go index ac776cef3b..5b95cc3119 100644 --- a/providers-sdk/v1/inventory/manager/credentials_query_test.go +++ b/providers-sdk/v1/inventory/manager/credentials_query_test.go @@ -8,11 +8,11 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory/manager" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/testutils" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory/manager" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/testutils" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" ) var runtime llx.Runtime diff --git a/providers-sdk/v1/inventory/manager/manager.go b/providers-sdk/v1/inventory/manager/manager.go index 6904691155..9fb6703414 100644 --- a/providers-sdk/v1/inventory/manager/manager.go +++ b/providers-sdk/v1/inventory/manager/manager.go @@ -7,13 +7,13 @@ import ( "context" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/logger" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault/credentials_resolver" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault/inmemory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault/multivault" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/logger" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault/credentials_resolver" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault/inmemory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault/multivault" protobuf "google.golang.org/protobuf/proto" ) diff --git a/providers-sdk/v1/lr/cli/cmd/docs.go b/providers-sdk/v1/lr/cli/cmd/docs.go index d6cb96b787..09ac869ea9 100644 --- a/providers-sdk/v1/lr/cli/cmd/docs.go +++ b/providers-sdk/v1/lr/cli/cmd/docs.go @@ -14,8 +14,8 @@ import ( "github.com/rs/zerolog/log" "github.com/spf13/cobra" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/lr" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/lr/docs" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/lr" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/lr/docs" "sigs.k8s.io/yaml" ) diff --git a/providers-sdk/v1/lr/cli/cmd/docs_test.go b/providers-sdk/v1/lr/cli/cmd/docs_test.go index 809df9b029..ebb4dcfcb3 100644 --- a/providers-sdk/v1/lr/cli/cmd/docs_test.go +++ b/providers-sdk/v1/lr/cli/cmd/docs_test.go @@ -5,7 +5,7 @@ package cmd import ( "github.com/stretchr/testify/assert" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/lr/docs" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/lr/docs" "testing" ) diff --git a/providers-sdk/v1/lr/cli/cmd/go.go b/providers-sdk/v1/lr/cli/cmd/go.go index bdf853c8a0..67fb669950 100644 --- a/providers-sdk/v1/lr/cli/cmd/go.go +++ b/providers-sdk/v1/lr/cli/cmd/go.go @@ -11,8 +11,8 @@ import ( "github.com/rs/zerolog/log" "github.com/spf13/cobra" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/lr" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/lr/docs" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/lr" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/lr/docs" "sigs.k8s.io/yaml" ) diff --git a/providers-sdk/v1/lr/cli/cmd/markdown.go b/providers-sdk/v1/lr/cli/cmd/markdown.go index f3eac29483..09dcef00c1 100644 --- a/providers-sdk/v1/lr/cli/cmd/markdown.go +++ b/providers-sdk/v1/lr/cli/cmd/markdown.go @@ -17,9 +17,9 @@ import ( "github.com/olekukonko/tablewriter" "github.com/rs/zerolog/log" "github.com/spf13/cobra" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/lr" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/lr/docs" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/resources" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/lr" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/lr/docs" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/resources" "sigs.k8s.io/yaml" ) diff --git a/providers-sdk/v1/lr/cli/cmd/parse.go b/providers-sdk/v1/lr/cli/cmd/parse.go index 5e314d48db..29513e2ac3 100644 --- a/providers-sdk/v1/lr/cli/cmd/parse.go +++ b/providers-sdk/v1/lr/cli/cmd/parse.go @@ -10,7 +10,7 @@ import ( "github.com/rs/zerolog/log" "github.com/spf13/cobra" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/lr" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/lr" ) var parseCmd = &cobra.Command{ diff --git a/providers-sdk/v1/lr/cli/main.go b/providers-sdk/v1/lr/cli/main.go index 464e389f8d..b9d1ac6c95 100644 --- a/providers-sdk/v1/lr/cli/main.go +++ b/providers-sdk/v1/lr/cli/main.go @@ -5,8 +5,8 @@ package main import ( - "go.mondoo.com/cnquery/v9/logger" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/lr/cli/cmd" + "go.mondoo.com/cnquery/v10/logger" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/lr/cli/cmd" ) func init() { diff --git a/providers-sdk/v1/lr/collector.go b/providers-sdk/v1/lr/collector.go index 5f6b4228b5..d7a1cac937 100644 --- a/providers-sdk/v1/lr/collector.go +++ b/providers-sdk/v1/lr/collector.go @@ -10,7 +10,7 @@ import ( "strings" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/types" ) // Collector provides helpers for go files inside a context diff --git a/providers-sdk/v1/lr/docs/docs.go b/providers-sdk/v1/lr/docs/docs.go index 756857bb21..ef5b975a4b 100644 --- a/providers-sdk/v1/lr/docs/docs.go +++ b/providers-sdk/v1/lr/docs/docs.go @@ -8,7 +8,7 @@ import ( "strconv" "strings" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/resources" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/resources" ) type LrDocs struct { diff --git a/providers-sdk/v1/lr/go.go b/providers-sdk/v1/lr/go.go index 0857660023..ddc22e0c3b 100644 --- a/providers-sdk/v1/lr/go.go +++ b/providers-sdk/v1/lr/go.go @@ -12,8 +12,8 @@ import ( "strconv" "strings" - "go.mondoo.com/cnquery/v9/types" - "go.mondoo.com/cnquery/v9/utils/multierr" + "go.mondoo.com/cnquery/v10/types" + "go.mondoo.com/cnquery/v10/utils/multierr" ) // Go produced go code for the LR file @@ -117,9 +117,9 @@ package resources import ( "errors"%s - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/types"%s + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/types"%s ) ` diff --git a/providers-sdk/v1/lr/schema.go b/providers-sdk/v1/lr/schema.go index ed1b2f9d58..e61ce6ee29 100644 --- a/providers-sdk/v1/lr/schema.go +++ b/providers-sdk/v1/lr/schema.go @@ -7,8 +7,8 @@ import ( "errors" "strings" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/resources" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/resources" + "go.mondoo.com/cnquery/v10/types" ) func Schema(ast *LR) (*resources.Schema, error) { diff --git a/providers-sdk/v1/lr/schema_test.go b/providers-sdk/v1/lr/schema_test.go index 0b81a68195..4b094b774a 100644 --- a/providers-sdk/v1/lr/schema_test.go +++ b/providers-sdk/v1/lr/schema_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/resources" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/resources" + "go.mondoo.com/cnquery/v10/types" ) const provider = "🐱" diff --git a/providers-sdk/v1/plugin/gen/gen.go b/providers-sdk/v1/plugin/gen/gen.go index c5e2574fc2..3962c4b8f5 100644 --- a/providers-sdk/v1/plugin/gen/gen.go +++ b/providers-sdk/v1/plugin/gen/gen.go @@ -12,7 +12,7 @@ import ( "github.com/Masterminds/semver" "github.com/spf13/afero" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" ) // This package contains shared components for plugin generation. diff --git a/providers-sdk/v1/plugin/plugin.go b/providers-sdk/v1/plugin/plugin.go index 3a07d6859a..8a4b596a7c 100644 --- a/providers-sdk/v1/plugin/plugin.go +++ b/providers-sdk/v1/plugin/plugin.go @@ -3,7 +3,7 @@ package plugin -import llx "go.mondoo.com/cnquery/v9/llx" +import llx "go.mondoo.com/cnquery/v10/llx" //go:generate protoc --proto_path=../../../:. --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative plugin.proto diff --git a/providers-sdk/v1/plugin/plugin.pb.go b/providers-sdk/v1/plugin/plugin.pb.go index 913100f3f2..4f18d947f3 100644 --- a/providers-sdk/v1/plugin/plugin.pb.go +++ b/providers-sdk/v1/plugin/plugin.pb.go @@ -10,9 +10,9 @@ package plugin import ( - llx "go.mondoo.com/cnquery/v9/llx" - inventory "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - upstream "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream" + llx "go.mondoo.com/cnquery/v10/llx" + inventory "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + upstream "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" diff --git a/providers-sdk/v1/plugin/plugin.proto b/providers-sdk/v1/plugin/plugin.proto index de737d8b3d..c59cf45158 100644 --- a/providers-sdk/v1/plugin/plugin.proto +++ b/providers-sdk/v1/plugin/plugin.proto @@ -8,7 +8,7 @@ import "llx/llx.proto"; import "providers-sdk/v1/inventory/inventory.proto"; import "providers-sdk/v1/upstream/upstream.proto"; -option go_package = "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin"; +option go_package = "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin"; message ParseCLIReq { string connector = 1; diff --git a/providers-sdk/v1/plugin/runtime.go b/providers-sdk/v1/plugin/runtime.go index 144cb601b2..094b09099a 100644 --- a/providers-sdk/v1/plugin/runtime.go +++ b/providers-sdk/v1/plugin/runtime.go @@ -6,10 +6,10 @@ package plugin import ( "errors" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream" - "go.mondoo.com/cnquery/v9/types" - "go.mondoo.com/cnquery/v9/utils/syncx" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream" + "go.mondoo.com/cnquery/v10/types" + "go.mondoo.com/cnquery/v10/utils/syncx" ) type Runtime struct { diff --git a/providers-sdk/v1/plugin/start.go b/providers-sdk/v1/plugin/start.go index 833539274d..1ac0eed46d 100644 --- a/providers-sdk/v1/plugin/start.go +++ b/providers-sdk/v1/plugin/start.go @@ -11,7 +11,7 @@ import ( "github.com/rs/zerolog" "github.com/rs/zerolog/log" "github.com/spf13/pflag" - "go.mondoo.com/cnquery/v9/logger" + "go.mondoo.com/cnquery/v10/logger" ) type Provider struct { diff --git a/providers-sdk/v1/resources/resources.proto b/providers-sdk/v1/resources/resources.proto index 726f49b41a..77bd7d3547 100644 --- a/providers-sdk/v1/resources/resources.proto +++ b/providers-sdk/v1/resources/resources.proto @@ -4,7 +4,7 @@ syntax = "proto3"; package mondoo.resources; -option go_package = "go.mondoo.com/cnquery/v9/providers-sdk/v1/resources"; +option go_package = "go.mondoo.com/cnquery/v10/providers-sdk/v1/resources"; // BASIC DATATYPES diff --git a/providers-sdk/v1/sysinfo/sysinfo.go b/providers-sdk/v1/sysinfo/sysinfo.go index a7e9617f67..981e9fc954 100644 --- a/providers-sdk/v1/sysinfo/sysinfo.go +++ b/providers-sdk/v1/sysinfo/sysinfo.go @@ -8,14 +8,14 @@ import ( "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9" - "go.mondoo.com/cnquery/v9/cli/execruntime" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/local" - "go.mondoo.com/cnquery/v9/providers/os/detector" - "go.mondoo.com/cnquery/v9/providers/os/id" - "go.mondoo.com/cnquery/v9/providers/os/id/hostname" - "go.mondoo.com/cnquery/v9/providers/os/resources/networkinterface" + "go.mondoo.com/cnquery/v10" + "go.mondoo.com/cnquery/v10/cli/execruntime" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/local" + "go.mondoo.com/cnquery/v10/providers/os/detector" + "go.mondoo.com/cnquery/v10/providers/os/id" + "go.mondoo.com/cnquery/v10/providers/os/id/hostname" + "go.mondoo.com/cnquery/v10/providers/os/resources/networkinterface" ) type SystemInfo struct { diff --git a/providers-sdk/v1/testutils/mockprovider/mockprovider.go b/providers-sdk/v1/testutils/mockprovider/mockprovider.go index 7771c37f86..e05af8030e 100644 --- a/providers-sdk/v1/testutils/mockprovider/mockprovider.go +++ b/providers-sdk/v1/testutils/mockprovider/mockprovider.go @@ -8,14 +8,14 @@ import ( "strconv" "strings" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/testutils/mockprovider/resources" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/testutils/mockprovider/resources" ) var Config = plugin.Provider{ Name: "mock", - ID: "go.mondoo.com/cnquery/v9/providers-sdk/v1/testutils/mockprovider", + ID: "go.mondoo.com/cnquery/v10/providers-sdk/v1/testutils/mockprovider", Version: "0.0.0", Connectors: []plugin.Connector{}, } diff --git a/providers-sdk/v1/testutils/mockprovider/resources/all.go b/providers-sdk/v1/testutils/mockprovider/resources/all.go index 04026d554c..12d9f1cca5 100644 --- a/providers-sdk/v1/testutils/mockprovider/resources/all.go +++ b/providers-sdk/v1/testutils/mockprovider/resources/all.go @@ -4,8 +4,8 @@ package resources import ( - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" ) func (c *mqlMuser) id() (string, error) { diff --git a/providers-sdk/v1/testutils/mockprovider/resources/mockprovider.lr b/providers-sdk/v1/testutils/mockprovider/resources/mockprovider.lr index 391f7a1df8..12c56f1954 100644 --- a/providers-sdk/v1/testutils/mockprovider/resources/mockprovider.lr +++ b/providers-sdk/v1/testutils/mockprovider/resources/mockprovider.lr @@ -1,8 +1,8 @@ // Copyright (c) Mondoo, Inc. // SPDX-License-Identifier: BUSL-1.1 -option provider = "go.mondoo.com/cnquery/v9/providers-sdk/v1/testutils/mockprovider" -option go_package = "go.mondoo.com/cnquery/v9/providers-sdk/v1/testutils/mockprovider" +option provider = "go.mondoo.com/cnquery/v10/providers-sdk/v1/testutils/mockprovider" +option go_package = "go.mondoo.com/cnquery/v10/providers-sdk/v1/testutils/mockprovider" muser { name string diff --git a/providers-sdk/v1/testutils/mockprovider/resources/mockprovider.lr.go b/providers-sdk/v1/testutils/mockprovider/resources/mockprovider.lr.go index d6c4e96d54..25334694c3 100644 --- a/providers-sdk/v1/testutils/mockprovider/resources/mockprovider.lr.go +++ b/providers-sdk/v1/testutils/mockprovider/resources/mockprovider.lr.go @@ -8,9 +8,9 @@ package resources import ( "errors" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/types" ) var resourceFactories map[string]plugin.ResourceFactory diff --git a/providers-sdk/v1/testutils/testdata/arch.json b/providers-sdk/v1/testutils/testdata/arch.json index 4afec784a7..32c7662ca3 100644 --- a/providers-sdk/v1/testutils/testdata/arch.json +++ b/providers-sdk/v1/testutils/testdata/arch.json @@ -21,7 +21,7 @@ "connections": [ { "url": "local://", - "provider": "go.mondoo.com/cnquery/v9/providers/os", + "provider": "go.mondoo.com/cnquery/v10/providers/os", "connector": "local", "version": "" }, diff --git a/providers-sdk/v1/testutils/testdata/kubelet-aks.json b/providers-sdk/v1/testutils/testdata/kubelet-aks.json index f321fb6cae..e28d0a422c 100644 --- a/providers-sdk/v1/testutils/testdata/kubelet-aks.json +++ b/providers-sdk/v1/testutils/testdata/kubelet-aks.json @@ -1 +1 @@ -{"assets":[{"asset":{"id":"Buildroot 2021.02.12","platformIDs":["//platformid.api.mondoo.app/hostname/minikube","//platformid.api.mondoo.app/runtime/ssh/hostkey/SHA256-9GHnVr3zGaRkwyvFET6LOu0zq3k3j89XH/Xwb6r/vlI"],"name":"buildroot","arch":"x86_64","title":"Buildroot 2021.02.12","family":["linux","unix","os"],"version":"2021.02.12","kind":"baremetal","labels":{"distro-id":"buildroot"}},"connections":[{"url":"ssh://192.168.39.137","provider":"go.mondoo.com/cnquery/v9/providers/os","connector":"ssh","version":""}],"resources":[{"Resource":"file","ID":"/var/lib/kubelet/config.yaml","Fields":{"exists":{"type":"\u0004","value":false},"path":{"type":"\u0007","value":"/var/lib/kubelet/config.yaml"}}},{"Resource":"kubelet","ID":"","Fields":{"process":{"type":"\u001bprocess","value":{"Name":"process","ID":"107838"}}}},{"Resource":"process","ID":"1","Fields":{"executable":{"type":"\u0007","value":"/sbin/init"},"pid":{"type":"\u0005","value":1},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"10","Fields":{"executable":{"type":"\u0007","value":"[rcu_tasks_rude_]"},"pid":{"type":"\u0005","value":10},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1011","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/cri-dockerd"},"pid":{"type":"\u0005","value":1011},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"102330","Fields":{"executable":{"type":"\u0007","value":"[kworker/0:12-events_power_efficient]"},"pid":{"type":"\u0005","value":102330},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"104490","Fields":{"executable":{"type":"\u0007","value":"[kworker/u4:1-events_unbound]"},"pid":{"type":"\u0005","value":104490},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"104499","Fields":{"executable":{"type":"\u0007","value":"[kworker/1:0-cgroup_destroy]"},"pid":{"type":"\u0005","value":104499},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"104500","Fields":{"executable":{"type":"\u0007","value":"[kworker/1:1-mm_percpu_wq]"},"pid":{"type":"\u0005","value":104500},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"105573","Fields":{"executable":{"type":"\u0007","value":"[kworker/0:0-cgroup_pidlist_destroy]"},"pid":{"type":"\u0005","value":105573},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"107838","Fields":{"command":{"type":"\u0007","value":"/var/lib/minikube/binaries/v1.28.3/kubelet --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --container-runtime-endpoint=unix:///var/run/cri-dockerd.sock --hostname-override=minikube --kubeconfig=/etc/kubernetes/kubelet.conf --node-ip=192.168.39.137 --anonymous-auth=false --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_GCM_SHA256 --eviction-hard=memory.available\u003c750Mi,nodefs.available\u003c10%,nodefs.inodesFree\u003c5% --read-only-port=0"},"executable":{"type":"\u0007","value":"/var/lib/minikube/binaries/v1.28.3/kubelet"},"flags":{"type":"\u001a\u0007\u0007","value":{"anonymous-auth":"false","bootstrap-kubeconfig":"/etc/kubernetes/bootstrap-kubelet.conf","container-runtime-endpoint":"unix:///var/run/cri-dockerd.sock","eviction-hard":"memory.available\u003c750Mi,nodefs.available\u003c10%,nodefs.inodesFree\u003c5%","hostname-override":"minikube","kubeconfig":"/etc/kubernetes/kubelet.conf","node-ip":"192.168.39.137","read-only-port":"0","tls-cipher-suites":"TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_GCM_SHA256"}},"pid":{"type":"\u0005","value":107838},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"11","Fields":{"executable":{"type":"\u0007","value":"[rcu_tasks_trace]"},"pid":{"type":"\u0005","value":11},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1116","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/dockerd"},"pid":{"type":"\u0005","value":1116},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1122","Fields":{"executable":{"type":"\u0007","value":"containerd"},"pid":{"type":"\u0005","value":1122},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"116801","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":116801},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"116803","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":116803},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"116807","Fields":{"executable":{"type":"\u0007","value":"/usr/libexec/sftp-server"},"pid":{"type":"\u0005","value":116807},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"116814","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":116814},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"116816","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":116816},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"116819","Fields":{"executable":{"type":"\u0007","value":"/usr/libexec/sftp-server"},"pid":{"type":"\u0005","value":116819},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"116820","Fields":{"executable":{"type":"\u0007","value":"/usr/libexec/sftp-server"},"pid":{"type":"\u0005","value":116820},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"116821","Fields":{"executable":{"type":"\u0007","value":"/usr/libexec/sftp-server"},"pid":{"type":"\u0005","value":116821},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"116905","Fields":{"executable":{"type":"\u0007","value":"ps"},"pid":{"type":"\u0005","value":116905},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"12","Fields":{"executable":{"type":"\u0007","value":"[ksoftirqd/0]"},"pid":{"type":"\u0005","value":12},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"13","Fields":{"executable":{"type":"\u0007","value":"[rcu_sched]"},"pid":{"type":"\u0005","value":13},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"14","Fields":{"executable":{"type":"\u0007","value":"[migration/0]"},"pid":{"type":"\u0005","value":14},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"15","Fields":{"executable":{"type":"\u0007","value":"[cpuhp/0]"},"pid":{"type":"\u0005","value":15},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16","Fields":{"executable":{"type":"\u0007","value":"[cpuhp/1]"},"pid":{"type":"\u0005","value":16},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16211","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-timesyncd"},"pid":{"type":"\u0005","value":16211},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16220","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-udevd"},"pid":{"type":"\u0005","value":16220},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16229","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-journald"},"pid":{"type":"\u0005","value":16229},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16233","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-logind"},"pid":{"type":"\u0005","value":16233},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16314","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-networkd"},"pid":{"type":"\u0005","value":16314},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16317","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-resolved"},"pid":{"type":"\u0005","value":16317},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"17","Fields":{"executable":{"type":"\u0007","value":"[migration/1]"},"pid":{"type":"\u0005","value":17},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"18","Fields":{"executable":{"type":"\u0007","value":"[ksoftirqd/1]"},"pid":{"type":"\u0005","value":18},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"2","Fields":{"executable":{"type":"\u0007","value":"[kthreadd]"},"pid":{"type":"\u0005","value":2},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"20","Fields":{"executable":{"type":"\u0007","value":"[kworker/1:0H-events_highpri]"},"pid":{"type":"\u0005","value":20},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"21","Fields":{"executable":{"type":"\u0007","value":"[kdevtmpfs]"},"pid":{"type":"\u0005","value":21},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"22","Fields":{"executable":{"type":"\u0007","value":"[netns]"},"pid":{"type":"\u0005","value":22},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"221","Fields":{"executable":{"type":"\u0007","value":"/usr/sbin/acpid"},"pid":{"type":"\u0005","value":221},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"222","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/dbus-daemon"},"pid":{"type":"\u0005","value":222},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"224","Fields":{"executable":{"type":"\u0007","value":"/sbin/agetty"},"pid":{"type":"\u0005","value":224},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"23","Fields":{"executable":{"type":"\u0007","value":"[kauditd]"},"pid":{"type":"\u0005","value":23},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"232","Fields":{"executable":{"type":"\u0007","value":"/sbin/agetty"},"pid":{"type":"\u0005","value":232},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"24","Fields":{"executable":{"type":"\u0007","value":"[oom_reaper]"},"pid":{"type":"\u0005","value":24},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"25","Fields":{"executable":{"type":"\u0007","value":"[writeback]"},"pid":{"type":"\u0005","value":25},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"26","Fields":{"executable":{"type":"\u0007","value":"[kcompactd0]"},"pid":{"type":"\u0005","value":26},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"27","Fields":{"executable":{"type":"\u0007","value":"[khugepaged]"},"pid":{"type":"\u0005","value":27},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"292","Fields":{"executable":{"type":"\u0007","value":"[jbd2/vda1-8]"},"pid":{"type":"\u0005","value":292},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"293","Fields":{"executable":{"type":"\u0007","value":"[ext4-rsv-conver]"},"pid":{"type":"\u0005","value":293},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3","Fields":{"executable":{"type":"\u0007","value":"[rcu_gp]"},"pid":{"type":"\u0005","value":3},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3166","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3166},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3186","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":3186},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3208","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3208},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3228","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":3228},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3242","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3242},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3264","Fields":{"executable":{"type":"\u0007","value":"/usr/local/bin/kube-proxy"},"pid":{"type":"\u0005","value":3264},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"341","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":341},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3438","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3438},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3459","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":3459},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3529","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3529},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3551","Fields":{"executable":{"type":"\u0007","value":"/coredns"},"pid":{"type":"\u0005","value":3551},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"380","Fields":{"executable":{"type":"\u0007","value":"/usr/sbin/rpc.statd"},"pid":{"type":"\u0005","value":380},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"386","Fields":{"executable":{"type":"\u0007","value":"/usr/sbin/rpcbind"},"pid":{"type":"\u0005","value":386},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"387","Fields":{"executable":{"type":"\u0007","value":"/usr/sbin/rpc.mountd"},"pid":{"type":"\u0005","value":387},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"393","Fields":{"executable":{"type":"\u0007","value":"[kworker/u5:1-xprtiod]"},"pid":{"type":"\u0005","value":393},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"394","Fields":{"executable":{"type":"\u0007","value":"[lockd]"},"pid":{"type":"\u0005","value":394},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"4","Fields":{"executable":{"type":"\u0007","value":"[rcu_par_gp]"},"pid":{"type":"\u0005","value":4},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"41","Fields":{"executable":{"type":"\u0007","value":"[cryptd]"},"pid":{"type":"\u0005","value":41},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"434","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":434},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"435","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":435},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"436","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":436},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"437","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":437},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"438","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":438},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"439","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":439},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"440","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":440},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"441","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":441},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"53","Fields":{"executable":{"type":"\u0007","value":"[kblockd]"},"pid":{"type":"\u0005","value":53},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"54","Fields":{"executable":{"type":"\u0007","value":"[blkcg_punt_bio]"},"pid":{"type":"\u0005","value":54},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"55","Fields":{"executable":{"type":"\u0007","value":"[ata_sff]"},"pid":{"type":"\u0005","value":55},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"55460","Fields":{"executable":{"type":"\u0007","value":"[kworker/u4:0-events_unbound]"},"pid":{"type":"\u0005","value":55460},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"56","Fields":{"executable":{"type":"\u0007","value":"[md]"},"pid":{"type":"\u0005","value":56},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"57","Fields":{"executable":{"type":"\u0007","value":"[kworker/0:1H-kblockd]"},"pid":{"type":"\u0005","value":57},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"58","Fields":{"executable":{"type":"\u0007","value":"[rpciod]"},"pid":{"type":"\u0005","value":58},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"59","Fields":{"executable":{"type":"\u0007","value":"[kworker/u5:0-xprtiod]"},"pid":{"type":"\u0005","value":59},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"6","Fields":{"executable":{"type":"\u0007","value":"[kworker/0:0H-events_highpri]"},"pid":{"type":"\u0005","value":6},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"60","Fields":{"executable":{"type":"\u0007","value":"[xprtiod]"},"pid":{"type":"\u0005","value":60},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"61","Fields":{"executable":{"type":"\u0007","value":"[cfg80211]"},"pid":{"type":"\u0005","value":61},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"63","Fields":{"executable":{"type":"\u0007","value":"[kswapd0]"},"pid":{"type":"\u0005","value":63},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"64","Fields":{"executable":{"type":"\u0007","value":"[nfsiod]"},"pid":{"type":"\u0005","value":64},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"65","Fields":{"executable":{"type":"\u0007","value":"[cifsiod]"},"pid":{"type":"\u0005","value":65},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"66","Fields":{"executable":{"type":"\u0007","value":"[smb3decryptd]"},"pid":{"type":"\u0005","value":66},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"67","Fields":{"executable":{"type":"\u0007","value":"[cifsfileinfoput]"},"pid":{"type":"\u0005","value":67},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"68","Fields":{"executable":{"type":"\u0007","value":"[cifsoplockd]"},"pid":{"type":"\u0005","value":68},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"69","Fields":{"executable":{"type":"\u0007","value":"[xfsalloc]"},"pid":{"type":"\u0005","value":69},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"70","Fields":{"executable":{"type":"\u0007","value":"[xfs_mru_cache]"},"pid":{"type":"\u0005","value":70},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"72","Fields":{"executable":{"type":"\u0007","value":"[acpi_thermal_pm]"},"pid":{"type":"\u0005","value":72},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"74","Fields":{"executable":{"type":"\u0007","value":"[hwrng]"},"pid":{"type":"\u0005","value":74},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"75","Fields":{"executable":{"type":"\u0007","value":"[scsi_eh_0]"},"pid":{"type":"\u0005","value":75},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"76","Fields":{"executable":{"type":"\u0007","value":"[scsi_tmf_0]"},"pid":{"type":"\u0005","value":76},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"77","Fields":{"executable":{"type":"\u0007","value":"[scsi_eh_1]"},"pid":{"type":"\u0005","value":77},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"78","Fields":{"executable":{"type":"\u0007","value":"[scsi_tmf_1]"},"pid":{"type":"\u0005","value":78},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"81","Fields":{"executable":{"type":"\u0007","value":"[dm_bufio_cache]"},"pid":{"type":"\u0005","value":81},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"82","Fields":{"executable":{"type":"\u0007","value":"[kworker/1:1H-kblockd]"},"pid":{"type":"\u0005","value":82},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"83","Fields":{"executable":{"type":"\u0007","value":"[ipv6_addrconf]"},"pid":{"type":"\u0005","value":83},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"84","Fields":{"executable":{"type":"\u0007","value":"[ceph-msgr]"},"pid":{"type":"\u0005","value":84},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"9","Fields":{"executable":{"type":"\u0007","value":"[mm_percpu_wq]"},"pid":{"type":"\u0005","value":9},"state":{"type":"\u0007","value":""}}},{"Resource":"processes","ID":"","Fields":{"list":{"type":"\u0019\u001bprocess","value":[{"Name":"process","ID":"1"},{"Name":"process","ID":"2"},{"Name":"process","ID":"3"},{"Name":"process","ID":"4"},{"Name":"process","ID":"6"},{"Name":"process","ID":"9"},{"Name":"process","ID":"10"},{"Name":"process","ID":"11"},{"Name":"process","ID":"12"},{"Name":"process","ID":"13"},{"Name":"process","ID":"14"},{"Name":"process","ID":"15"},{"Name":"process","ID":"16"},{"Name":"process","ID":"17"},{"Name":"process","ID":"18"},{"Name":"process","ID":"20"},{"Name":"process","ID":"21"},{"Name":"process","ID":"22"},{"Name":"process","ID":"23"},{"Name":"process","ID":"24"},{"Name":"process","ID":"25"},{"Name":"process","ID":"26"},{"Name":"process","ID":"27"},{"Name":"process","ID":"41"},{"Name":"process","ID":"53"},{"Name":"process","ID":"54"},{"Name":"process","ID":"55"},{"Name":"process","ID":"56"},{"Name":"process","ID":"57"},{"Name":"process","ID":"58"},{"Name":"process","ID":"59"},{"Name":"process","ID":"60"},{"Name":"process","ID":"61"},{"Name":"process","ID":"63"},{"Name":"process","ID":"64"},{"Name":"process","ID":"65"},{"Name":"process","ID":"66"},{"Name":"process","ID":"67"},{"Name":"process","ID":"68"},{"Name":"process","ID":"69"},{"Name":"process","ID":"70"},{"Name":"process","ID":"72"},{"Name":"process","ID":"74"},{"Name":"process","ID":"75"},{"Name":"process","ID":"76"},{"Name":"process","ID":"77"},{"Name":"process","ID":"78"},{"Name":"process","ID":"81"},{"Name":"process","ID":"82"},{"Name":"process","ID":"83"},{"Name":"process","ID":"84"},{"Name":"process","ID":"221"},{"Name":"process","ID":"222"},{"Name":"process","ID":"224"},{"Name":"process","ID":"232"},{"Name":"process","ID":"292"},{"Name":"process","ID":"293"},{"Name":"process","ID":"341"},{"Name":"process","ID":"380"},{"Name":"process","ID":"386"},{"Name":"process","ID":"387"},{"Name":"process","ID":"393"},{"Name":"process","ID":"394"},{"Name":"process","ID":"434"},{"Name":"process","ID":"435"},{"Name":"process","ID":"436"},{"Name":"process","ID":"437"},{"Name":"process","ID":"438"},{"Name":"process","ID":"439"},{"Name":"process","ID":"440"},{"Name":"process","ID":"441"},{"Name":"process","ID":"1011"},{"Name":"process","ID":"1116"},{"Name":"process","ID":"1122"},{"Name":"process","ID":"3166"},{"Name":"process","ID":"3186"},{"Name":"process","ID":"3208"},{"Name":"process","ID":"3228"},{"Name":"process","ID":"3242"},{"Name":"process","ID":"3264"},{"Name":"process","ID":"3438"},{"Name":"process","ID":"3459"},{"Name":"process","ID":"3529"},{"Name":"process","ID":"3551"},{"Name":"process","ID":"16211"},{"Name":"process","ID":"16220"},{"Name":"process","ID":"16229"},{"Name":"process","ID":"16233"},{"Name":"process","ID":"16314"},{"Name":"process","ID":"16317"},{"Name":"process","ID":"55460"},{"Name":"process","ID":"102330"},{"Name":"process","ID":"104490"},{"Name":"process","ID":"104499"},{"Name":"process","ID":"104500"},{"Name":"process","ID":"105573"},{"Name":"process","ID":"107838"},{"Name":"process","ID":"116801"},{"Name":"process","ID":"116803"},{"Name":"process","ID":"116807"},{"Name":"process","ID":"116814"},{"Name":"process","ID":"116816"},{"Name":"process","ID":"116819"},{"Name":"process","ID":"116820"},{"Name":"process","ID":"116821"},{"Name":"process","ID":"116905"}]}}}]}]} \ No newline at end of file +{"assets":[{"asset":{"id":"Buildroot 2021.02.12","platformIDs":["//platformid.api.mondoo.app/hostname/minikube","//platformid.api.mondoo.app/runtime/ssh/hostkey/SHA256-9GHnVr3zGaRkwyvFET6LOu0zq3k3j89XH/Xwb6r/vlI"],"name":"buildroot","arch":"x86_64","title":"Buildroot 2021.02.12","family":["linux","unix","os"],"version":"2021.02.12","kind":"baremetal","labels":{"distro-id":"buildroot"}},"connections":[{"url":"ssh://192.168.39.137","provider":"go.mondoo.com/cnquery/v10/providers/os","connector":"ssh","version":""}],"resources":[{"Resource":"file","ID":"/var/lib/kubelet/config.yaml","Fields":{"exists":{"type":"\u0004","value":false},"path":{"type":"\u0007","value":"/var/lib/kubelet/config.yaml"}}},{"Resource":"kubelet","ID":"","Fields":{"process":{"type":"\u001bprocess","value":{"Name":"process","ID":"107838"}}}},{"Resource":"process","ID":"1","Fields":{"executable":{"type":"\u0007","value":"/sbin/init"},"pid":{"type":"\u0005","value":1},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"10","Fields":{"executable":{"type":"\u0007","value":"[rcu_tasks_rude_]"},"pid":{"type":"\u0005","value":10},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1011","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/cri-dockerd"},"pid":{"type":"\u0005","value":1011},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"102330","Fields":{"executable":{"type":"\u0007","value":"[kworker/0:12-events_power_efficient]"},"pid":{"type":"\u0005","value":102330},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"104490","Fields":{"executable":{"type":"\u0007","value":"[kworker/u4:1-events_unbound]"},"pid":{"type":"\u0005","value":104490},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"104499","Fields":{"executable":{"type":"\u0007","value":"[kworker/1:0-cgroup_destroy]"},"pid":{"type":"\u0005","value":104499},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"104500","Fields":{"executable":{"type":"\u0007","value":"[kworker/1:1-mm_percpu_wq]"},"pid":{"type":"\u0005","value":104500},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"105573","Fields":{"executable":{"type":"\u0007","value":"[kworker/0:0-cgroup_pidlist_destroy]"},"pid":{"type":"\u0005","value":105573},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"107838","Fields":{"command":{"type":"\u0007","value":"/var/lib/minikube/binaries/v1.28.3/kubelet --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --container-runtime-endpoint=unix:///var/run/cri-dockerd.sock --hostname-override=minikube --kubeconfig=/etc/kubernetes/kubelet.conf --node-ip=192.168.39.137 --anonymous-auth=false --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_GCM_SHA256 --eviction-hard=memory.available\u003c750Mi,nodefs.available\u003c10%,nodefs.inodesFree\u003c5% --read-only-port=0"},"executable":{"type":"\u0007","value":"/var/lib/minikube/binaries/v1.28.3/kubelet"},"flags":{"type":"\u001a\u0007\u0007","value":{"anonymous-auth":"false","bootstrap-kubeconfig":"/etc/kubernetes/bootstrap-kubelet.conf","container-runtime-endpoint":"unix:///var/run/cri-dockerd.sock","eviction-hard":"memory.available\u003c750Mi,nodefs.available\u003c10%,nodefs.inodesFree\u003c5%","hostname-override":"minikube","kubeconfig":"/etc/kubernetes/kubelet.conf","node-ip":"192.168.39.137","read-only-port":"0","tls-cipher-suites":"TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_GCM_SHA256"}},"pid":{"type":"\u0005","value":107838},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"11","Fields":{"executable":{"type":"\u0007","value":"[rcu_tasks_trace]"},"pid":{"type":"\u0005","value":11},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1116","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/dockerd"},"pid":{"type":"\u0005","value":1116},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1122","Fields":{"executable":{"type":"\u0007","value":"containerd"},"pid":{"type":"\u0005","value":1122},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"116801","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":116801},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"116803","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":116803},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"116807","Fields":{"executable":{"type":"\u0007","value":"/usr/libexec/sftp-server"},"pid":{"type":"\u0005","value":116807},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"116814","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":116814},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"116816","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":116816},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"116819","Fields":{"executable":{"type":"\u0007","value":"/usr/libexec/sftp-server"},"pid":{"type":"\u0005","value":116819},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"116820","Fields":{"executable":{"type":"\u0007","value":"/usr/libexec/sftp-server"},"pid":{"type":"\u0005","value":116820},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"116821","Fields":{"executable":{"type":"\u0007","value":"/usr/libexec/sftp-server"},"pid":{"type":"\u0005","value":116821},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"116905","Fields":{"executable":{"type":"\u0007","value":"ps"},"pid":{"type":"\u0005","value":116905},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"12","Fields":{"executable":{"type":"\u0007","value":"[ksoftirqd/0]"},"pid":{"type":"\u0005","value":12},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"13","Fields":{"executable":{"type":"\u0007","value":"[rcu_sched]"},"pid":{"type":"\u0005","value":13},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"14","Fields":{"executable":{"type":"\u0007","value":"[migration/0]"},"pid":{"type":"\u0005","value":14},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"15","Fields":{"executable":{"type":"\u0007","value":"[cpuhp/0]"},"pid":{"type":"\u0005","value":15},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16","Fields":{"executable":{"type":"\u0007","value":"[cpuhp/1]"},"pid":{"type":"\u0005","value":16},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16211","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-timesyncd"},"pid":{"type":"\u0005","value":16211},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16220","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-udevd"},"pid":{"type":"\u0005","value":16220},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16229","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-journald"},"pid":{"type":"\u0005","value":16229},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16233","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-logind"},"pid":{"type":"\u0005","value":16233},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16314","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-networkd"},"pid":{"type":"\u0005","value":16314},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16317","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-resolved"},"pid":{"type":"\u0005","value":16317},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"17","Fields":{"executable":{"type":"\u0007","value":"[migration/1]"},"pid":{"type":"\u0005","value":17},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"18","Fields":{"executable":{"type":"\u0007","value":"[ksoftirqd/1]"},"pid":{"type":"\u0005","value":18},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"2","Fields":{"executable":{"type":"\u0007","value":"[kthreadd]"},"pid":{"type":"\u0005","value":2},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"20","Fields":{"executable":{"type":"\u0007","value":"[kworker/1:0H-events_highpri]"},"pid":{"type":"\u0005","value":20},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"21","Fields":{"executable":{"type":"\u0007","value":"[kdevtmpfs]"},"pid":{"type":"\u0005","value":21},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"22","Fields":{"executable":{"type":"\u0007","value":"[netns]"},"pid":{"type":"\u0005","value":22},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"221","Fields":{"executable":{"type":"\u0007","value":"/usr/sbin/acpid"},"pid":{"type":"\u0005","value":221},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"222","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/dbus-daemon"},"pid":{"type":"\u0005","value":222},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"224","Fields":{"executable":{"type":"\u0007","value":"/sbin/agetty"},"pid":{"type":"\u0005","value":224},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"23","Fields":{"executable":{"type":"\u0007","value":"[kauditd]"},"pid":{"type":"\u0005","value":23},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"232","Fields":{"executable":{"type":"\u0007","value":"/sbin/agetty"},"pid":{"type":"\u0005","value":232},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"24","Fields":{"executable":{"type":"\u0007","value":"[oom_reaper]"},"pid":{"type":"\u0005","value":24},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"25","Fields":{"executable":{"type":"\u0007","value":"[writeback]"},"pid":{"type":"\u0005","value":25},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"26","Fields":{"executable":{"type":"\u0007","value":"[kcompactd0]"},"pid":{"type":"\u0005","value":26},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"27","Fields":{"executable":{"type":"\u0007","value":"[khugepaged]"},"pid":{"type":"\u0005","value":27},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"292","Fields":{"executable":{"type":"\u0007","value":"[jbd2/vda1-8]"},"pid":{"type":"\u0005","value":292},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"293","Fields":{"executable":{"type":"\u0007","value":"[ext4-rsv-conver]"},"pid":{"type":"\u0005","value":293},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3","Fields":{"executable":{"type":"\u0007","value":"[rcu_gp]"},"pid":{"type":"\u0005","value":3},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3166","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3166},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3186","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":3186},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3208","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3208},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3228","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":3228},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3242","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3242},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3264","Fields":{"executable":{"type":"\u0007","value":"/usr/local/bin/kube-proxy"},"pid":{"type":"\u0005","value":3264},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"341","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":341},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3438","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3438},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3459","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":3459},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3529","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3529},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3551","Fields":{"executable":{"type":"\u0007","value":"/coredns"},"pid":{"type":"\u0005","value":3551},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"380","Fields":{"executable":{"type":"\u0007","value":"/usr/sbin/rpc.statd"},"pid":{"type":"\u0005","value":380},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"386","Fields":{"executable":{"type":"\u0007","value":"/usr/sbin/rpcbind"},"pid":{"type":"\u0005","value":386},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"387","Fields":{"executable":{"type":"\u0007","value":"/usr/sbin/rpc.mountd"},"pid":{"type":"\u0005","value":387},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"393","Fields":{"executable":{"type":"\u0007","value":"[kworker/u5:1-xprtiod]"},"pid":{"type":"\u0005","value":393},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"394","Fields":{"executable":{"type":"\u0007","value":"[lockd]"},"pid":{"type":"\u0005","value":394},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"4","Fields":{"executable":{"type":"\u0007","value":"[rcu_par_gp]"},"pid":{"type":"\u0005","value":4},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"41","Fields":{"executable":{"type":"\u0007","value":"[cryptd]"},"pid":{"type":"\u0005","value":41},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"434","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":434},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"435","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":435},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"436","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":436},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"437","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":437},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"438","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":438},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"439","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":439},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"440","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":440},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"441","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":441},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"53","Fields":{"executable":{"type":"\u0007","value":"[kblockd]"},"pid":{"type":"\u0005","value":53},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"54","Fields":{"executable":{"type":"\u0007","value":"[blkcg_punt_bio]"},"pid":{"type":"\u0005","value":54},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"55","Fields":{"executable":{"type":"\u0007","value":"[ata_sff]"},"pid":{"type":"\u0005","value":55},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"55460","Fields":{"executable":{"type":"\u0007","value":"[kworker/u4:0-events_unbound]"},"pid":{"type":"\u0005","value":55460},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"56","Fields":{"executable":{"type":"\u0007","value":"[md]"},"pid":{"type":"\u0005","value":56},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"57","Fields":{"executable":{"type":"\u0007","value":"[kworker/0:1H-kblockd]"},"pid":{"type":"\u0005","value":57},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"58","Fields":{"executable":{"type":"\u0007","value":"[rpciod]"},"pid":{"type":"\u0005","value":58},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"59","Fields":{"executable":{"type":"\u0007","value":"[kworker/u5:0-xprtiod]"},"pid":{"type":"\u0005","value":59},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"6","Fields":{"executable":{"type":"\u0007","value":"[kworker/0:0H-events_highpri]"},"pid":{"type":"\u0005","value":6},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"60","Fields":{"executable":{"type":"\u0007","value":"[xprtiod]"},"pid":{"type":"\u0005","value":60},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"61","Fields":{"executable":{"type":"\u0007","value":"[cfg80211]"},"pid":{"type":"\u0005","value":61},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"63","Fields":{"executable":{"type":"\u0007","value":"[kswapd0]"},"pid":{"type":"\u0005","value":63},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"64","Fields":{"executable":{"type":"\u0007","value":"[nfsiod]"},"pid":{"type":"\u0005","value":64},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"65","Fields":{"executable":{"type":"\u0007","value":"[cifsiod]"},"pid":{"type":"\u0005","value":65},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"66","Fields":{"executable":{"type":"\u0007","value":"[smb3decryptd]"},"pid":{"type":"\u0005","value":66},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"67","Fields":{"executable":{"type":"\u0007","value":"[cifsfileinfoput]"},"pid":{"type":"\u0005","value":67},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"68","Fields":{"executable":{"type":"\u0007","value":"[cifsoplockd]"},"pid":{"type":"\u0005","value":68},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"69","Fields":{"executable":{"type":"\u0007","value":"[xfsalloc]"},"pid":{"type":"\u0005","value":69},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"70","Fields":{"executable":{"type":"\u0007","value":"[xfs_mru_cache]"},"pid":{"type":"\u0005","value":70},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"72","Fields":{"executable":{"type":"\u0007","value":"[acpi_thermal_pm]"},"pid":{"type":"\u0005","value":72},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"74","Fields":{"executable":{"type":"\u0007","value":"[hwrng]"},"pid":{"type":"\u0005","value":74},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"75","Fields":{"executable":{"type":"\u0007","value":"[scsi_eh_0]"},"pid":{"type":"\u0005","value":75},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"76","Fields":{"executable":{"type":"\u0007","value":"[scsi_tmf_0]"},"pid":{"type":"\u0005","value":76},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"77","Fields":{"executable":{"type":"\u0007","value":"[scsi_eh_1]"},"pid":{"type":"\u0005","value":77},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"78","Fields":{"executable":{"type":"\u0007","value":"[scsi_tmf_1]"},"pid":{"type":"\u0005","value":78},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"81","Fields":{"executable":{"type":"\u0007","value":"[dm_bufio_cache]"},"pid":{"type":"\u0005","value":81},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"82","Fields":{"executable":{"type":"\u0007","value":"[kworker/1:1H-kblockd]"},"pid":{"type":"\u0005","value":82},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"83","Fields":{"executable":{"type":"\u0007","value":"[ipv6_addrconf]"},"pid":{"type":"\u0005","value":83},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"84","Fields":{"executable":{"type":"\u0007","value":"[ceph-msgr]"},"pid":{"type":"\u0005","value":84},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"9","Fields":{"executable":{"type":"\u0007","value":"[mm_percpu_wq]"},"pid":{"type":"\u0005","value":9},"state":{"type":"\u0007","value":""}}},{"Resource":"processes","ID":"","Fields":{"list":{"type":"\u0019\u001bprocess","value":[{"Name":"process","ID":"1"},{"Name":"process","ID":"2"},{"Name":"process","ID":"3"},{"Name":"process","ID":"4"},{"Name":"process","ID":"6"},{"Name":"process","ID":"9"},{"Name":"process","ID":"10"},{"Name":"process","ID":"11"},{"Name":"process","ID":"12"},{"Name":"process","ID":"13"},{"Name":"process","ID":"14"},{"Name":"process","ID":"15"},{"Name":"process","ID":"16"},{"Name":"process","ID":"17"},{"Name":"process","ID":"18"},{"Name":"process","ID":"20"},{"Name":"process","ID":"21"},{"Name":"process","ID":"22"},{"Name":"process","ID":"23"},{"Name":"process","ID":"24"},{"Name":"process","ID":"25"},{"Name":"process","ID":"26"},{"Name":"process","ID":"27"},{"Name":"process","ID":"41"},{"Name":"process","ID":"53"},{"Name":"process","ID":"54"},{"Name":"process","ID":"55"},{"Name":"process","ID":"56"},{"Name":"process","ID":"57"},{"Name":"process","ID":"58"},{"Name":"process","ID":"59"},{"Name":"process","ID":"60"},{"Name":"process","ID":"61"},{"Name":"process","ID":"63"},{"Name":"process","ID":"64"},{"Name":"process","ID":"65"},{"Name":"process","ID":"66"},{"Name":"process","ID":"67"},{"Name":"process","ID":"68"},{"Name":"process","ID":"69"},{"Name":"process","ID":"70"},{"Name":"process","ID":"72"},{"Name":"process","ID":"74"},{"Name":"process","ID":"75"},{"Name":"process","ID":"76"},{"Name":"process","ID":"77"},{"Name":"process","ID":"78"},{"Name":"process","ID":"81"},{"Name":"process","ID":"82"},{"Name":"process","ID":"83"},{"Name":"process","ID":"84"},{"Name":"process","ID":"221"},{"Name":"process","ID":"222"},{"Name":"process","ID":"224"},{"Name":"process","ID":"232"},{"Name":"process","ID":"292"},{"Name":"process","ID":"293"},{"Name":"process","ID":"341"},{"Name":"process","ID":"380"},{"Name":"process","ID":"386"},{"Name":"process","ID":"387"},{"Name":"process","ID":"393"},{"Name":"process","ID":"394"},{"Name":"process","ID":"434"},{"Name":"process","ID":"435"},{"Name":"process","ID":"436"},{"Name":"process","ID":"437"},{"Name":"process","ID":"438"},{"Name":"process","ID":"439"},{"Name":"process","ID":"440"},{"Name":"process","ID":"441"},{"Name":"process","ID":"1011"},{"Name":"process","ID":"1116"},{"Name":"process","ID":"1122"},{"Name":"process","ID":"3166"},{"Name":"process","ID":"3186"},{"Name":"process","ID":"3208"},{"Name":"process","ID":"3228"},{"Name":"process","ID":"3242"},{"Name":"process","ID":"3264"},{"Name":"process","ID":"3438"},{"Name":"process","ID":"3459"},{"Name":"process","ID":"3529"},{"Name":"process","ID":"3551"},{"Name":"process","ID":"16211"},{"Name":"process","ID":"16220"},{"Name":"process","ID":"16229"},{"Name":"process","ID":"16233"},{"Name":"process","ID":"16314"},{"Name":"process","ID":"16317"},{"Name":"process","ID":"55460"},{"Name":"process","ID":"102330"},{"Name":"process","ID":"104490"},{"Name":"process","ID":"104499"},{"Name":"process","ID":"104500"},{"Name":"process","ID":"105573"},{"Name":"process","ID":"107838"},{"Name":"process","ID":"116801"},{"Name":"process","ID":"116803"},{"Name":"process","ID":"116807"},{"Name":"process","ID":"116814"},{"Name":"process","ID":"116816"},{"Name":"process","ID":"116819"},{"Name":"process","ID":"116820"},{"Name":"process","ID":"116821"},{"Name":"process","ID":"116905"}]}}}]}]} \ No newline at end of file diff --git a/providers-sdk/v1/testutils/testdata/kubelet-eks.json b/providers-sdk/v1/testutils/testdata/kubelet-eks.json index 9dd6ab1f63..bb85e53505 100644 --- a/providers-sdk/v1/testutils/testdata/kubelet-eks.json +++ b/providers-sdk/v1/testutils/testdata/kubelet-eks.json @@ -1 +1 @@ -{"assets":[{"asset":{"id":"Buildroot 2021.02.12","platformIDs":["//platformid.api.mondoo.app/hostname/minikube","//platformid.api.mondoo.app/runtime/ssh/hostkey/SHA256-9GHnVr3zGaRkwyvFET6LOu0zq3k3j89XH/Xwb6r/vlI"],"name":"buildroot","arch":"x86_64","title":"Buildroot 2021.02.12","family":["linux","unix","os"],"version":"2021.02.12","kind":"baremetal","labels":{"distro-id":"buildroot"}},"connections":[{"url":"ssh://192.168.39.137","provider":"go.mondoo.com/cnquery/v9/providers/os","connector":"ssh","version":""}],"resources":[{"Resource":"file","ID":"/etc/kubernetes/kubelet/kubelet-config.json","Fields":{"basename":{"type":"\u0007","value":"kubelet-config.json"},"content":{"type":"\u0007","value":"{\n \"kind\": \"KubeletConfiguration\",\n \"apiVersion\": \"kubelet.config.k8s.io/v1beta1\",\n \"address\": \"0.0.0.0\",\n \"authentication\": {\n \"anonymous\": {\n \"enabled\": false\n },\n \"webhook\": {\n \"cacheTTL\": \"2m0s\",\n \"enabled\": true\n },\n \"x509\": {\n \"clientCAFile\": \"/var/lib/minikube/certs/ca.crt\"\n }\n },\n \"authorization\": {\n \"mode\": \"Webhook\",\n \"webhook\": {\n \"cacheAuthorizedTTL\": \"5m0s\",\n \"cacheUnauthorizedTTL\": \"30s\"\n }\n },\n \"clusterDomain\": \"cluster.local\",\n \"hairpinMode\": \"hairpin-veth\",\n \"readOnlyPort\": 0,\n \"cgroupDriver\": \"cgroupfs\",\n \"cgroupRoot\": \"/\",\n \"featureGates\": {\n \"RotateKubeletServerCertificate\": true\n },\n \"protectKernelDefaults\": true,\n \"serializeImagePulls\": false,\n \"serverTLSBootstrap\": true,\n \"tlsCipherSuites\": [\"TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256\", \"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256\", \"TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305\", \"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384\", \"TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305\", \"TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384\", \"TLS_RSA_WITH_AES_256_GCM_SHA384\", \"TLS_RSA_WITH_AES_128_GCM_SHA256\"]\n}\n"},"dirname":{"type":"\u0007","value":"/etc/kubernetes/kubelet"},"empty":{"type":"\u0004","value":false},"exists":{"type":"\u0004","value":true},"group":{"type":"\u001bgroup","value":{"Name":"group","ID":"group/0/root"}},"path":{"type":"\u0007","value":"/etc/kubernetes/kubelet/kubelet-config.json"},"permissions":{"type":"\u001bfile.permissions","value":{"Name":"file.permissions","ID":"-rw-r--r--"}},"size":{"type":"\u0005","value":1124},"user":{"type":"\u001buser","value":{"Name":"user","ID":"user/0/root"}}}},{"Resource":"file.permissions","ID":"-rw-r--r--","Fields":{"string":{"type":"\u0007","value":"-rw-r--r--"}}},{"Resource":"group","ID":"group/0/root","Fields":{"gid":{"type":"\u0005","value":0},"name":{"type":"\u0007","value":"root"}}},{"Resource":"kubelet","ID":"","Fields":{"configFile":{"type":"\u001bfile","value":{"Name":"file","ID":"/etc/kubernetes/kubelet/kubelet-config.json"}},"process":{"type":"\u001bprocess","value":{"Name":"process","ID":"153347"}}}},{"Resource":"process","ID":"1","Fields":{"executable":{"type":"\u0007","value":"/sbin/init"},"pid":{"type":"\u0005","value":1},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"10","Fields":{"executable":{"type":"\u0007","value":"[rcu_tasks_rude_]"},"pid":{"type":"\u0005","value":10},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1011","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/cri-dockerd"},"pid":{"type":"\u0005","value":1011},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"102330","Fields":{"executable":{"type":"\u0007","value":"[kworker/0:12-events_power_efficient]"},"pid":{"type":"\u0005","value":102330},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"104490","Fields":{"executable":{"type":"\u0007","value":"[kworker/u4:1-events_unbound]"},"pid":{"type":"\u0005","value":104490},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"104500","Fields":{"executable":{"type":"\u0007","value":"[kworker/1:1-events_power_efficient]"},"pid":{"type":"\u0005","value":104500},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"11","Fields":{"executable":{"type":"\u0007","value":"[rcu_tasks_trace]"},"pid":{"type":"\u0005","value":11},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1116","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/dockerd"},"pid":{"type":"\u0005","value":1116},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1122","Fields":{"executable":{"type":"\u0007","value":"containerd"},"pid":{"type":"\u0005","value":1122},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"12","Fields":{"executable":{"type":"\u0007","value":"[ksoftirqd/0]"},"pid":{"type":"\u0005","value":12},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"13","Fields":{"executable":{"type":"\u0007","value":"[rcu_sched]"},"pid":{"type":"\u0005","value":13},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"14","Fields":{"executable":{"type":"\u0007","value":"[migration/0]"},"pid":{"type":"\u0005","value":14},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"15","Fields":{"executable":{"type":"\u0007","value":"[cpuhp/0]"},"pid":{"type":"\u0005","value":15},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"151749","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":151749},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"151751","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":151751},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"151756","Fields":{"executable":{"type":"\u0007","value":"-bash"},"pid":{"type":"\u0005","value":151756},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"152409","Fields":{"executable":{"type":"\u0007","value":"[kworker/1:3-cgroup_destroy]"},"pid":{"type":"\u0005","value":152409},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"152412","Fields":{"executable":{"type":"\u0007","value":"[kworker/0:1-cgroup_destroy]"},"pid":{"type":"\u0005","value":152412},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"153347","Fields":{"command":{"type":"\u0007","value":"/var/lib/minikube/binaries/v1.28.3/kubelet --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --config /etc/kubernetes/kubelet/kubelet-config.json --container-runtime-endpoint=unix:///var/run/cri-dockerd.sock --hostname-override=minikube --kubeconfig=/etc/kubernetes/kubelet.conf --node-ip=192.168.39.137 --runtime-request-timeout=7m"},"executable":{"type":"\u0007","value":"/var/lib/minikube/binaries/v1.28.3/kubelet"},"flags":{"type":"\u001a\u0007\u0007","value":{"bootstrap-kubeconfig":"/etc/kubernetes/bootstrap-kubelet.conf","config":"/etc/kubernetes/kubelet/kubelet-config.json","container-runtime-endpoint":"unix:///var/run/cri-dockerd.sock","hostname-override":"minikube","kubeconfig":"/etc/kubernetes/kubelet.conf","node-ip":"192.168.39.137","runtime-request-timeout":"7m"}},"pid":{"type":"\u0005","value":153347},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16","Fields":{"executable":{"type":"\u0007","value":"[cpuhp/1]"},"pid":{"type":"\u0005","value":16},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16211","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-timesyncd"},"pid":{"type":"\u0005","value":16211},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16220","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-udevd"},"pid":{"type":"\u0005","value":16220},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16229","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-journald"},"pid":{"type":"\u0005","value":16229},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16233","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-logind"},"pid":{"type":"\u0005","value":16233},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"162687","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":162687},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"162689","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":162689},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"162693","Fields":{"executable":{"type":"\u0007","value":"/usr/libexec/sftp-server"},"pid":{"type":"\u0005","value":162693},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"162700","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":162700},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"162702","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":162702},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"162705","Fields":{"executable":{"type":"\u0007","value":"/usr/libexec/sftp-server"},"pid":{"type":"\u0005","value":162705},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"162706","Fields":{"executable":{"type":"\u0007","value":"/usr/libexec/sftp-server"},"pid":{"type":"\u0005","value":162706},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"162707","Fields":{"executable":{"type":"\u0007","value":"/usr/libexec/sftp-server"},"pid":{"type":"\u0005","value":162707},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"162723","Fields":{"executable":{"type":"\u0007","value":"ps"},"pid":{"type":"\u0005","value":162723},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16314","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-networkd"},"pid":{"type":"\u0005","value":16314},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16317","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-resolved"},"pid":{"type":"\u0005","value":16317},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"17","Fields":{"executable":{"type":"\u0007","value":"[migration/1]"},"pid":{"type":"\u0005","value":17},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"18","Fields":{"executable":{"type":"\u0007","value":"[ksoftirqd/1]"},"pid":{"type":"\u0005","value":18},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"2","Fields":{"executable":{"type":"\u0007","value":"[kthreadd]"},"pid":{"type":"\u0005","value":2},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"20","Fields":{"executable":{"type":"\u0007","value":"[kworker/1:0H-events_highpri]"},"pid":{"type":"\u0005","value":20},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"21","Fields":{"executable":{"type":"\u0007","value":"[kdevtmpfs]"},"pid":{"type":"\u0005","value":21},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"22","Fields":{"executable":{"type":"\u0007","value":"[netns]"},"pid":{"type":"\u0005","value":22},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"221","Fields":{"executable":{"type":"\u0007","value":"/usr/sbin/acpid"},"pid":{"type":"\u0005","value":221},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"222","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/dbus-daemon"},"pid":{"type":"\u0005","value":222},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"224","Fields":{"executable":{"type":"\u0007","value":"/sbin/agetty"},"pid":{"type":"\u0005","value":224},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"23","Fields":{"executable":{"type":"\u0007","value":"[kauditd]"},"pid":{"type":"\u0005","value":23},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"232","Fields":{"executable":{"type":"\u0007","value":"/sbin/agetty"},"pid":{"type":"\u0005","value":232},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"24","Fields":{"executable":{"type":"\u0007","value":"[oom_reaper]"},"pid":{"type":"\u0005","value":24},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"25","Fields":{"executable":{"type":"\u0007","value":"[writeback]"},"pid":{"type":"\u0005","value":25},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"26","Fields":{"executable":{"type":"\u0007","value":"[kcompactd0]"},"pid":{"type":"\u0005","value":26},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"27","Fields":{"executable":{"type":"\u0007","value":"[khugepaged]"},"pid":{"type":"\u0005","value":27},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"292","Fields":{"executable":{"type":"\u0007","value":"[jbd2/vda1-8]"},"pid":{"type":"\u0005","value":292},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"293","Fields":{"executable":{"type":"\u0007","value":"[ext4-rsv-conver]"},"pid":{"type":"\u0005","value":293},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3","Fields":{"executable":{"type":"\u0007","value":"[rcu_gp]"},"pid":{"type":"\u0005","value":3},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3166","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3166},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3186","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":3186},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3208","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3208},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3228","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":3228},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3242","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3242},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3264","Fields":{"executable":{"type":"\u0007","value":"/usr/local/bin/kube-proxy"},"pid":{"type":"\u0005","value":3264},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"341","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":341},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3438","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3438},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3459","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":3459},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3529","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3529},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3551","Fields":{"executable":{"type":"\u0007","value":"/coredns"},"pid":{"type":"\u0005","value":3551},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"380","Fields":{"executable":{"type":"\u0007","value":"/usr/sbin/rpc.statd"},"pid":{"type":"\u0005","value":380},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"386","Fields":{"executable":{"type":"\u0007","value":"/usr/sbin/rpcbind"},"pid":{"type":"\u0005","value":386},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"387","Fields":{"executable":{"type":"\u0007","value":"/usr/sbin/rpc.mountd"},"pid":{"type":"\u0005","value":387},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"393","Fields":{"executable":{"type":"\u0007","value":"[kworker/u5:1-xprtiod]"},"pid":{"type":"\u0005","value":393},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"394","Fields":{"executable":{"type":"\u0007","value":"[lockd]"},"pid":{"type":"\u0005","value":394},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"4","Fields":{"executable":{"type":"\u0007","value":"[rcu_par_gp]"},"pid":{"type":"\u0005","value":4},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"41","Fields":{"executable":{"type":"\u0007","value":"[cryptd]"},"pid":{"type":"\u0005","value":41},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"434","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":434},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"435","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":435},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"436","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":436},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"437","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":437},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"438","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":438},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"439","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":439},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"440","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":440},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"441","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":441},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"53","Fields":{"executable":{"type":"\u0007","value":"[kblockd]"},"pid":{"type":"\u0005","value":53},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"54","Fields":{"executable":{"type":"\u0007","value":"[blkcg_punt_bio]"},"pid":{"type":"\u0005","value":54},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"55","Fields":{"executable":{"type":"\u0007","value":"[ata_sff]"},"pid":{"type":"\u0005","value":55},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"55460","Fields":{"executable":{"type":"\u0007","value":"[kworker/u4:0-events_unbound]"},"pid":{"type":"\u0005","value":55460},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"56","Fields":{"executable":{"type":"\u0007","value":"[md]"},"pid":{"type":"\u0005","value":56},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"57","Fields":{"executable":{"type":"\u0007","value":"[kworker/0:1H-kblockd]"},"pid":{"type":"\u0005","value":57},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"58","Fields":{"executable":{"type":"\u0007","value":"[rpciod]"},"pid":{"type":"\u0005","value":58},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"59","Fields":{"executable":{"type":"\u0007","value":"[kworker/u5:0-xprtiod]"},"pid":{"type":"\u0005","value":59},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"6","Fields":{"executable":{"type":"\u0007","value":"[kworker/0:0H-events_highpri]"},"pid":{"type":"\u0005","value":6},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"60","Fields":{"executable":{"type":"\u0007","value":"[xprtiod]"},"pid":{"type":"\u0005","value":60},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"61","Fields":{"executable":{"type":"\u0007","value":"[cfg80211]"},"pid":{"type":"\u0005","value":61},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"63","Fields":{"executable":{"type":"\u0007","value":"[kswapd0]"},"pid":{"type":"\u0005","value":63},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"64","Fields":{"executable":{"type":"\u0007","value":"[nfsiod]"},"pid":{"type":"\u0005","value":64},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"65","Fields":{"executable":{"type":"\u0007","value":"[cifsiod]"},"pid":{"type":"\u0005","value":65},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"66","Fields":{"executable":{"type":"\u0007","value":"[smb3decryptd]"},"pid":{"type":"\u0005","value":66},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"67","Fields":{"executable":{"type":"\u0007","value":"[cifsfileinfoput]"},"pid":{"type":"\u0005","value":67},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"68","Fields":{"executable":{"type":"\u0007","value":"[cifsoplockd]"},"pid":{"type":"\u0005","value":68},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"69","Fields":{"executable":{"type":"\u0007","value":"[xfsalloc]"},"pid":{"type":"\u0005","value":69},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"70","Fields":{"executable":{"type":"\u0007","value":"[xfs_mru_cache]"},"pid":{"type":"\u0005","value":70},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"72","Fields":{"executable":{"type":"\u0007","value":"[acpi_thermal_pm]"},"pid":{"type":"\u0005","value":72},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"74","Fields":{"executable":{"type":"\u0007","value":"[hwrng]"},"pid":{"type":"\u0005","value":74},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"75","Fields":{"executable":{"type":"\u0007","value":"[scsi_eh_0]"},"pid":{"type":"\u0005","value":75},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"76","Fields":{"executable":{"type":"\u0007","value":"[scsi_tmf_0]"},"pid":{"type":"\u0005","value":76},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"77","Fields":{"executable":{"type":"\u0007","value":"[scsi_eh_1]"},"pid":{"type":"\u0005","value":77},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"78","Fields":{"executable":{"type":"\u0007","value":"[scsi_tmf_1]"},"pid":{"type":"\u0005","value":78},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"81","Fields":{"executable":{"type":"\u0007","value":"[dm_bufio_cache]"},"pid":{"type":"\u0005","value":81},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"82","Fields":{"executable":{"type":"\u0007","value":"[kworker/1:1H-kblockd]"},"pid":{"type":"\u0005","value":82},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"83","Fields":{"executable":{"type":"\u0007","value":"[ipv6_addrconf]"},"pid":{"type":"\u0005","value":83},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"84","Fields":{"executable":{"type":"\u0007","value":"[ceph-msgr]"},"pid":{"type":"\u0005","value":84},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"9","Fields":{"executable":{"type":"\u0007","value":"[mm_percpu_wq]"},"pid":{"type":"\u0005","value":9},"state":{"type":"\u0007","value":""}}},{"Resource":"processes","ID":"","Fields":{"list":{"type":"\u0019\u001bprocess","value":[{"Name":"process","ID":"1"},{"Name":"process","ID":"2"},{"Name":"process","ID":"3"},{"Name":"process","ID":"4"},{"Name":"process","ID":"6"},{"Name":"process","ID":"9"},{"Name":"process","ID":"10"},{"Name":"process","ID":"11"},{"Name":"process","ID":"12"},{"Name":"process","ID":"13"},{"Name":"process","ID":"14"},{"Name":"process","ID":"15"},{"Name":"process","ID":"16"},{"Name":"process","ID":"17"},{"Name":"process","ID":"18"},{"Name":"process","ID":"20"},{"Name":"process","ID":"21"},{"Name":"process","ID":"22"},{"Name":"process","ID":"23"},{"Name":"process","ID":"24"},{"Name":"process","ID":"25"},{"Name":"process","ID":"26"},{"Name":"process","ID":"27"},{"Name":"process","ID":"41"},{"Name":"process","ID":"53"},{"Name":"process","ID":"54"},{"Name":"process","ID":"55"},{"Name":"process","ID":"56"},{"Name":"process","ID":"57"},{"Name":"process","ID":"58"},{"Name":"process","ID":"59"},{"Name":"process","ID":"60"},{"Name":"process","ID":"61"},{"Name":"process","ID":"63"},{"Name":"process","ID":"64"},{"Name":"process","ID":"65"},{"Name":"process","ID":"66"},{"Name":"process","ID":"67"},{"Name":"process","ID":"68"},{"Name":"process","ID":"69"},{"Name":"process","ID":"70"},{"Name":"process","ID":"72"},{"Name":"process","ID":"74"},{"Name":"process","ID":"75"},{"Name":"process","ID":"76"},{"Name":"process","ID":"77"},{"Name":"process","ID":"78"},{"Name":"process","ID":"81"},{"Name":"process","ID":"82"},{"Name":"process","ID":"83"},{"Name":"process","ID":"84"},{"Name":"process","ID":"221"},{"Name":"process","ID":"222"},{"Name":"process","ID":"224"},{"Name":"process","ID":"232"},{"Name":"process","ID":"292"},{"Name":"process","ID":"293"},{"Name":"process","ID":"341"},{"Name":"process","ID":"380"},{"Name":"process","ID":"386"},{"Name":"process","ID":"387"},{"Name":"process","ID":"393"},{"Name":"process","ID":"394"},{"Name":"process","ID":"434"},{"Name":"process","ID":"435"},{"Name":"process","ID":"436"},{"Name":"process","ID":"437"},{"Name":"process","ID":"438"},{"Name":"process","ID":"439"},{"Name":"process","ID":"440"},{"Name":"process","ID":"441"},{"Name":"process","ID":"1011"},{"Name":"process","ID":"1116"},{"Name":"process","ID":"1122"},{"Name":"process","ID":"3166"},{"Name":"process","ID":"3186"},{"Name":"process","ID":"3208"},{"Name":"process","ID":"3228"},{"Name":"process","ID":"3242"},{"Name":"process","ID":"3264"},{"Name":"process","ID":"3438"},{"Name":"process","ID":"3459"},{"Name":"process","ID":"3529"},{"Name":"process","ID":"3551"},{"Name":"process","ID":"16211"},{"Name":"process","ID":"16220"},{"Name":"process","ID":"16229"},{"Name":"process","ID":"16233"},{"Name":"process","ID":"16314"},{"Name":"process","ID":"16317"},{"Name":"process","ID":"55460"},{"Name":"process","ID":"102330"},{"Name":"process","ID":"104490"},{"Name":"process","ID":"104500"},{"Name":"process","ID":"151749"},{"Name":"process","ID":"151751"},{"Name":"process","ID":"151756"},{"Name":"process","ID":"152409"},{"Name":"process","ID":"152412"},{"Name":"process","ID":"153347"},{"Name":"process","ID":"162687"},{"Name":"process","ID":"162689"},{"Name":"process","ID":"162693"},{"Name":"process","ID":"162700"},{"Name":"process","ID":"162702"},{"Name":"process","ID":"162705"},{"Name":"process","ID":"162706"},{"Name":"process","ID":"162707"},{"Name":"process","ID":"162723"}]}}},{"Resource":"user","ID":"user/0/root","Fields":{"gid":{"type":"\u0005","value":0},"name":{"type":"\u0007","value":"root"},"uid":{"type":"\u0005","value":0}}}]}]} \ No newline at end of file +{"assets":[{"asset":{"id":"Buildroot 2021.02.12","platformIDs":["//platformid.api.mondoo.app/hostname/minikube","//platformid.api.mondoo.app/runtime/ssh/hostkey/SHA256-9GHnVr3zGaRkwyvFET6LOu0zq3k3j89XH/Xwb6r/vlI"],"name":"buildroot","arch":"x86_64","title":"Buildroot 2021.02.12","family":["linux","unix","os"],"version":"2021.02.12","kind":"baremetal","labels":{"distro-id":"buildroot"}},"connections":[{"url":"ssh://192.168.39.137","provider":"go.mondoo.com/cnquery/v10/providers/os","connector":"ssh","version":""}],"resources":[{"Resource":"file","ID":"/etc/kubernetes/kubelet/kubelet-config.json","Fields":{"basename":{"type":"\u0007","value":"kubelet-config.json"},"content":{"type":"\u0007","value":"{\n \"kind\": \"KubeletConfiguration\",\n \"apiVersion\": \"kubelet.config.k8s.io/v1beta1\",\n \"address\": \"0.0.0.0\",\n \"authentication\": {\n \"anonymous\": {\n \"enabled\": false\n },\n \"webhook\": {\n \"cacheTTL\": \"2m0s\",\n \"enabled\": true\n },\n \"x509\": {\n \"clientCAFile\": \"/var/lib/minikube/certs/ca.crt\"\n }\n },\n \"authorization\": {\n \"mode\": \"Webhook\",\n \"webhook\": {\n \"cacheAuthorizedTTL\": \"5m0s\",\n \"cacheUnauthorizedTTL\": \"30s\"\n }\n },\n \"clusterDomain\": \"cluster.local\",\n \"hairpinMode\": \"hairpin-veth\",\n \"readOnlyPort\": 0,\n \"cgroupDriver\": \"cgroupfs\",\n \"cgroupRoot\": \"/\",\n \"featureGates\": {\n \"RotateKubeletServerCertificate\": true\n },\n \"protectKernelDefaults\": true,\n \"serializeImagePulls\": false,\n \"serverTLSBootstrap\": true,\n \"tlsCipherSuites\": [\"TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256\", \"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256\", \"TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305\", \"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384\", \"TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305\", \"TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384\", \"TLS_RSA_WITH_AES_256_GCM_SHA384\", \"TLS_RSA_WITH_AES_128_GCM_SHA256\"]\n}\n"},"dirname":{"type":"\u0007","value":"/etc/kubernetes/kubelet"},"empty":{"type":"\u0004","value":false},"exists":{"type":"\u0004","value":true},"group":{"type":"\u001bgroup","value":{"Name":"group","ID":"group/0/root"}},"path":{"type":"\u0007","value":"/etc/kubernetes/kubelet/kubelet-config.json"},"permissions":{"type":"\u001bfile.permissions","value":{"Name":"file.permissions","ID":"-rw-r--r--"}},"size":{"type":"\u0005","value":1124},"user":{"type":"\u001buser","value":{"Name":"user","ID":"user/0/root"}}}},{"Resource":"file.permissions","ID":"-rw-r--r--","Fields":{"string":{"type":"\u0007","value":"-rw-r--r--"}}},{"Resource":"group","ID":"group/0/root","Fields":{"gid":{"type":"\u0005","value":0},"name":{"type":"\u0007","value":"root"}}},{"Resource":"kubelet","ID":"","Fields":{"configFile":{"type":"\u001bfile","value":{"Name":"file","ID":"/etc/kubernetes/kubelet/kubelet-config.json"}},"process":{"type":"\u001bprocess","value":{"Name":"process","ID":"153347"}}}},{"Resource":"process","ID":"1","Fields":{"executable":{"type":"\u0007","value":"/sbin/init"},"pid":{"type":"\u0005","value":1},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"10","Fields":{"executable":{"type":"\u0007","value":"[rcu_tasks_rude_]"},"pid":{"type":"\u0005","value":10},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1011","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/cri-dockerd"},"pid":{"type":"\u0005","value":1011},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"102330","Fields":{"executable":{"type":"\u0007","value":"[kworker/0:12-events_power_efficient]"},"pid":{"type":"\u0005","value":102330},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"104490","Fields":{"executable":{"type":"\u0007","value":"[kworker/u4:1-events_unbound]"},"pid":{"type":"\u0005","value":104490},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"104500","Fields":{"executable":{"type":"\u0007","value":"[kworker/1:1-events_power_efficient]"},"pid":{"type":"\u0005","value":104500},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"11","Fields":{"executable":{"type":"\u0007","value":"[rcu_tasks_trace]"},"pid":{"type":"\u0005","value":11},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1116","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/dockerd"},"pid":{"type":"\u0005","value":1116},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1122","Fields":{"executable":{"type":"\u0007","value":"containerd"},"pid":{"type":"\u0005","value":1122},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"12","Fields":{"executable":{"type":"\u0007","value":"[ksoftirqd/0]"},"pid":{"type":"\u0005","value":12},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"13","Fields":{"executable":{"type":"\u0007","value":"[rcu_sched]"},"pid":{"type":"\u0005","value":13},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"14","Fields":{"executable":{"type":"\u0007","value":"[migration/0]"},"pid":{"type":"\u0005","value":14},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"15","Fields":{"executable":{"type":"\u0007","value":"[cpuhp/0]"},"pid":{"type":"\u0005","value":15},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"151749","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":151749},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"151751","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":151751},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"151756","Fields":{"executable":{"type":"\u0007","value":"-bash"},"pid":{"type":"\u0005","value":151756},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"152409","Fields":{"executable":{"type":"\u0007","value":"[kworker/1:3-cgroup_destroy]"},"pid":{"type":"\u0005","value":152409},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"152412","Fields":{"executable":{"type":"\u0007","value":"[kworker/0:1-cgroup_destroy]"},"pid":{"type":"\u0005","value":152412},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"153347","Fields":{"command":{"type":"\u0007","value":"/var/lib/minikube/binaries/v1.28.3/kubelet --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --config /etc/kubernetes/kubelet/kubelet-config.json --container-runtime-endpoint=unix:///var/run/cri-dockerd.sock --hostname-override=minikube --kubeconfig=/etc/kubernetes/kubelet.conf --node-ip=192.168.39.137 --runtime-request-timeout=7m"},"executable":{"type":"\u0007","value":"/var/lib/minikube/binaries/v1.28.3/kubelet"},"flags":{"type":"\u001a\u0007\u0007","value":{"bootstrap-kubeconfig":"/etc/kubernetes/bootstrap-kubelet.conf","config":"/etc/kubernetes/kubelet/kubelet-config.json","container-runtime-endpoint":"unix:///var/run/cri-dockerd.sock","hostname-override":"minikube","kubeconfig":"/etc/kubernetes/kubelet.conf","node-ip":"192.168.39.137","runtime-request-timeout":"7m"}},"pid":{"type":"\u0005","value":153347},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16","Fields":{"executable":{"type":"\u0007","value":"[cpuhp/1]"},"pid":{"type":"\u0005","value":16},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16211","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-timesyncd"},"pid":{"type":"\u0005","value":16211},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16220","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-udevd"},"pid":{"type":"\u0005","value":16220},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16229","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-journald"},"pid":{"type":"\u0005","value":16229},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16233","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-logind"},"pid":{"type":"\u0005","value":16233},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"162687","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":162687},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"162689","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":162689},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"162693","Fields":{"executable":{"type":"\u0007","value":"/usr/libexec/sftp-server"},"pid":{"type":"\u0005","value":162693},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"162700","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":162700},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"162702","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":162702},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"162705","Fields":{"executable":{"type":"\u0007","value":"/usr/libexec/sftp-server"},"pid":{"type":"\u0005","value":162705},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"162706","Fields":{"executable":{"type":"\u0007","value":"/usr/libexec/sftp-server"},"pid":{"type":"\u0005","value":162706},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"162707","Fields":{"executable":{"type":"\u0007","value":"/usr/libexec/sftp-server"},"pid":{"type":"\u0005","value":162707},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"162723","Fields":{"executable":{"type":"\u0007","value":"ps"},"pid":{"type":"\u0005","value":162723},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16314","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-networkd"},"pid":{"type":"\u0005","value":16314},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16317","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-resolved"},"pid":{"type":"\u0005","value":16317},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"17","Fields":{"executable":{"type":"\u0007","value":"[migration/1]"},"pid":{"type":"\u0005","value":17},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"18","Fields":{"executable":{"type":"\u0007","value":"[ksoftirqd/1]"},"pid":{"type":"\u0005","value":18},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"2","Fields":{"executable":{"type":"\u0007","value":"[kthreadd]"},"pid":{"type":"\u0005","value":2},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"20","Fields":{"executable":{"type":"\u0007","value":"[kworker/1:0H-events_highpri]"},"pid":{"type":"\u0005","value":20},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"21","Fields":{"executable":{"type":"\u0007","value":"[kdevtmpfs]"},"pid":{"type":"\u0005","value":21},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"22","Fields":{"executable":{"type":"\u0007","value":"[netns]"},"pid":{"type":"\u0005","value":22},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"221","Fields":{"executable":{"type":"\u0007","value":"/usr/sbin/acpid"},"pid":{"type":"\u0005","value":221},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"222","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/dbus-daemon"},"pid":{"type":"\u0005","value":222},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"224","Fields":{"executable":{"type":"\u0007","value":"/sbin/agetty"},"pid":{"type":"\u0005","value":224},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"23","Fields":{"executable":{"type":"\u0007","value":"[kauditd]"},"pid":{"type":"\u0005","value":23},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"232","Fields":{"executable":{"type":"\u0007","value":"/sbin/agetty"},"pid":{"type":"\u0005","value":232},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"24","Fields":{"executable":{"type":"\u0007","value":"[oom_reaper]"},"pid":{"type":"\u0005","value":24},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"25","Fields":{"executable":{"type":"\u0007","value":"[writeback]"},"pid":{"type":"\u0005","value":25},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"26","Fields":{"executable":{"type":"\u0007","value":"[kcompactd0]"},"pid":{"type":"\u0005","value":26},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"27","Fields":{"executable":{"type":"\u0007","value":"[khugepaged]"},"pid":{"type":"\u0005","value":27},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"292","Fields":{"executable":{"type":"\u0007","value":"[jbd2/vda1-8]"},"pid":{"type":"\u0005","value":292},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"293","Fields":{"executable":{"type":"\u0007","value":"[ext4-rsv-conver]"},"pid":{"type":"\u0005","value":293},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3","Fields":{"executable":{"type":"\u0007","value":"[rcu_gp]"},"pid":{"type":"\u0005","value":3},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3166","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3166},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3186","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":3186},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3208","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3208},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3228","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":3228},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3242","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3242},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3264","Fields":{"executable":{"type":"\u0007","value":"/usr/local/bin/kube-proxy"},"pid":{"type":"\u0005","value":3264},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"341","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":341},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3438","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3438},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3459","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":3459},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3529","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3529},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3551","Fields":{"executable":{"type":"\u0007","value":"/coredns"},"pid":{"type":"\u0005","value":3551},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"380","Fields":{"executable":{"type":"\u0007","value":"/usr/sbin/rpc.statd"},"pid":{"type":"\u0005","value":380},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"386","Fields":{"executable":{"type":"\u0007","value":"/usr/sbin/rpcbind"},"pid":{"type":"\u0005","value":386},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"387","Fields":{"executable":{"type":"\u0007","value":"/usr/sbin/rpc.mountd"},"pid":{"type":"\u0005","value":387},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"393","Fields":{"executable":{"type":"\u0007","value":"[kworker/u5:1-xprtiod]"},"pid":{"type":"\u0005","value":393},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"394","Fields":{"executable":{"type":"\u0007","value":"[lockd]"},"pid":{"type":"\u0005","value":394},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"4","Fields":{"executable":{"type":"\u0007","value":"[rcu_par_gp]"},"pid":{"type":"\u0005","value":4},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"41","Fields":{"executable":{"type":"\u0007","value":"[cryptd]"},"pid":{"type":"\u0005","value":41},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"434","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":434},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"435","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":435},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"436","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":436},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"437","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":437},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"438","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":438},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"439","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":439},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"440","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":440},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"441","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":441},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"53","Fields":{"executable":{"type":"\u0007","value":"[kblockd]"},"pid":{"type":"\u0005","value":53},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"54","Fields":{"executable":{"type":"\u0007","value":"[blkcg_punt_bio]"},"pid":{"type":"\u0005","value":54},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"55","Fields":{"executable":{"type":"\u0007","value":"[ata_sff]"},"pid":{"type":"\u0005","value":55},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"55460","Fields":{"executable":{"type":"\u0007","value":"[kworker/u4:0-events_unbound]"},"pid":{"type":"\u0005","value":55460},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"56","Fields":{"executable":{"type":"\u0007","value":"[md]"},"pid":{"type":"\u0005","value":56},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"57","Fields":{"executable":{"type":"\u0007","value":"[kworker/0:1H-kblockd]"},"pid":{"type":"\u0005","value":57},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"58","Fields":{"executable":{"type":"\u0007","value":"[rpciod]"},"pid":{"type":"\u0005","value":58},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"59","Fields":{"executable":{"type":"\u0007","value":"[kworker/u5:0-xprtiod]"},"pid":{"type":"\u0005","value":59},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"6","Fields":{"executable":{"type":"\u0007","value":"[kworker/0:0H-events_highpri]"},"pid":{"type":"\u0005","value":6},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"60","Fields":{"executable":{"type":"\u0007","value":"[xprtiod]"},"pid":{"type":"\u0005","value":60},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"61","Fields":{"executable":{"type":"\u0007","value":"[cfg80211]"},"pid":{"type":"\u0005","value":61},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"63","Fields":{"executable":{"type":"\u0007","value":"[kswapd0]"},"pid":{"type":"\u0005","value":63},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"64","Fields":{"executable":{"type":"\u0007","value":"[nfsiod]"},"pid":{"type":"\u0005","value":64},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"65","Fields":{"executable":{"type":"\u0007","value":"[cifsiod]"},"pid":{"type":"\u0005","value":65},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"66","Fields":{"executable":{"type":"\u0007","value":"[smb3decryptd]"},"pid":{"type":"\u0005","value":66},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"67","Fields":{"executable":{"type":"\u0007","value":"[cifsfileinfoput]"},"pid":{"type":"\u0005","value":67},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"68","Fields":{"executable":{"type":"\u0007","value":"[cifsoplockd]"},"pid":{"type":"\u0005","value":68},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"69","Fields":{"executable":{"type":"\u0007","value":"[xfsalloc]"},"pid":{"type":"\u0005","value":69},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"70","Fields":{"executable":{"type":"\u0007","value":"[xfs_mru_cache]"},"pid":{"type":"\u0005","value":70},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"72","Fields":{"executable":{"type":"\u0007","value":"[acpi_thermal_pm]"},"pid":{"type":"\u0005","value":72},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"74","Fields":{"executable":{"type":"\u0007","value":"[hwrng]"},"pid":{"type":"\u0005","value":74},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"75","Fields":{"executable":{"type":"\u0007","value":"[scsi_eh_0]"},"pid":{"type":"\u0005","value":75},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"76","Fields":{"executable":{"type":"\u0007","value":"[scsi_tmf_0]"},"pid":{"type":"\u0005","value":76},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"77","Fields":{"executable":{"type":"\u0007","value":"[scsi_eh_1]"},"pid":{"type":"\u0005","value":77},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"78","Fields":{"executable":{"type":"\u0007","value":"[scsi_tmf_1]"},"pid":{"type":"\u0005","value":78},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"81","Fields":{"executable":{"type":"\u0007","value":"[dm_bufio_cache]"},"pid":{"type":"\u0005","value":81},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"82","Fields":{"executable":{"type":"\u0007","value":"[kworker/1:1H-kblockd]"},"pid":{"type":"\u0005","value":82},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"83","Fields":{"executable":{"type":"\u0007","value":"[ipv6_addrconf]"},"pid":{"type":"\u0005","value":83},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"84","Fields":{"executable":{"type":"\u0007","value":"[ceph-msgr]"},"pid":{"type":"\u0005","value":84},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"9","Fields":{"executable":{"type":"\u0007","value":"[mm_percpu_wq]"},"pid":{"type":"\u0005","value":9},"state":{"type":"\u0007","value":""}}},{"Resource":"processes","ID":"","Fields":{"list":{"type":"\u0019\u001bprocess","value":[{"Name":"process","ID":"1"},{"Name":"process","ID":"2"},{"Name":"process","ID":"3"},{"Name":"process","ID":"4"},{"Name":"process","ID":"6"},{"Name":"process","ID":"9"},{"Name":"process","ID":"10"},{"Name":"process","ID":"11"},{"Name":"process","ID":"12"},{"Name":"process","ID":"13"},{"Name":"process","ID":"14"},{"Name":"process","ID":"15"},{"Name":"process","ID":"16"},{"Name":"process","ID":"17"},{"Name":"process","ID":"18"},{"Name":"process","ID":"20"},{"Name":"process","ID":"21"},{"Name":"process","ID":"22"},{"Name":"process","ID":"23"},{"Name":"process","ID":"24"},{"Name":"process","ID":"25"},{"Name":"process","ID":"26"},{"Name":"process","ID":"27"},{"Name":"process","ID":"41"},{"Name":"process","ID":"53"},{"Name":"process","ID":"54"},{"Name":"process","ID":"55"},{"Name":"process","ID":"56"},{"Name":"process","ID":"57"},{"Name":"process","ID":"58"},{"Name":"process","ID":"59"},{"Name":"process","ID":"60"},{"Name":"process","ID":"61"},{"Name":"process","ID":"63"},{"Name":"process","ID":"64"},{"Name":"process","ID":"65"},{"Name":"process","ID":"66"},{"Name":"process","ID":"67"},{"Name":"process","ID":"68"},{"Name":"process","ID":"69"},{"Name":"process","ID":"70"},{"Name":"process","ID":"72"},{"Name":"process","ID":"74"},{"Name":"process","ID":"75"},{"Name":"process","ID":"76"},{"Name":"process","ID":"77"},{"Name":"process","ID":"78"},{"Name":"process","ID":"81"},{"Name":"process","ID":"82"},{"Name":"process","ID":"83"},{"Name":"process","ID":"84"},{"Name":"process","ID":"221"},{"Name":"process","ID":"222"},{"Name":"process","ID":"224"},{"Name":"process","ID":"232"},{"Name":"process","ID":"292"},{"Name":"process","ID":"293"},{"Name":"process","ID":"341"},{"Name":"process","ID":"380"},{"Name":"process","ID":"386"},{"Name":"process","ID":"387"},{"Name":"process","ID":"393"},{"Name":"process","ID":"394"},{"Name":"process","ID":"434"},{"Name":"process","ID":"435"},{"Name":"process","ID":"436"},{"Name":"process","ID":"437"},{"Name":"process","ID":"438"},{"Name":"process","ID":"439"},{"Name":"process","ID":"440"},{"Name":"process","ID":"441"},{"Name":"process","ID":"1011"},{"Name":"process","ID":"1116"},{"Name":"process","ID":"1122"},{"Name":"process","ID":"3166"},{"Name":"process","ID":"3186"},{"Name":"process","ID":"3208"},{"Name":"process","ID":"3228"},{"Name":"process","ID":"3242"},{"Name":"process","ID":"3264"},{"Name":"process","ID":"3438"},{"Name":"process","ID":"3459"},{"Name":"process","ID":"3529"},{"Name":"process","ID":"3551"},{"Name":"process","ID":"16211"},{"Name":"process","ID":"16220"},{"Name":"process","ID":"16229"},{"Name":"process","ID":"16233"},{"Name":"process","ID":"16314"},{"Name":"process","ID":"16317"},{"Name":"process","ID":"55460"},{"Name":"process","ID":"102330"},{"Name":"process","ID":"104490"},{"Name":"process","ID":"104500"},{"Name":"process","ID":"151749"},{"Name":"process","ID":"151751"},{"Name":"process","ID":"151756"},{"Name":"process","ID":"152409"},{"Name":"process","ID":"152412"},{"Name":"process","ID":"153347"},{"Name":"process","ID":"162687"},{"Name":"process","ID":"162689"},{"Name":"process","ID":"162693"},{"Name":"process","ID":"162700"},{"Name":"process","ID":"162702"},{"Name":"process","ID":"162705"},{"Name":"process","ID":"162706"},{"Name":"process","ID":"162707"},{"Name":"process","ID":"162723"}]}}},{"Resource":"user","ID":"user/0/root","Fields":{"gid":{"type":"\u0005","value":0},"name":{"type":"\u0007","value":"root"},"uid":{"type":"\u0005","value":0}}}]}]} \ No newline at end of file diff --git a/providers-sdk/v1/testutils/testdata/kubelet.json b/providers-sdk/v1/testutils/testdata/kubelet.json index 9cf6e2b6dd..b3cbbf18a7 100644 --- a/providers-sdk/v1/testutils/testdata/kubelet.json +++ b/providers-sdk/v1/testutils/testdata/kubelet.json @@ -1 +1 @@ -{"assets":[{"asset":{"id":"Buildroot 2021.02.12","platformIDs":["//platformid.api.mondoo.app/hostname/minikube","//platformid.api.mondoo.app/runtime/ssh/hostkey/SHA256-9GHnVr3zGaRkwyvFET6LOu0zq3k3j89XH/Xwb6r/vlI"],"name":"buildroot","arch":"x86_64","title":"Buildroot 2021.02.12","family":["linux","unix","os"],"version":"2021.02.12","kind":"baremetal","labels":{"distro-id":"buildroot"}},"connections":[{"url":"ssh://192.168.39.137","provider":"go.mondoo.com/cnquery/v9/providers/os","connector":"ssh","version":""}],"resources":[{"Resource":"file","ID":"/var/lib/kubelet/config.yaml","Fields":{"basename":{"type":"\u0007","value":"config.yaml"},"content":{"type":"\u0007","value":"apiVersion: kubelet.config.k8s.io/v1beta1\nauthentication:\n anonymous:\n enabled: false\n webhook:\n cacheTTL: 0s\n enabled: true\n x509:\n clientCAFile: /var/lib/minikube/certs/ca.crt\nauthorization:\n mode: Webhook\n webhook:\n cacheAuthorizedTTL: 0s\n cacheUnauthorizedTTL: 0s\ncgroupDriver: cgroupfs\nclusterDNS:\n- 10.96.0.10\nclusterDomain: cluster.local\ncontainerRuntimeEndpoint: \"\"\ncpuManagerReconcilePeriod: 0s\nevictionHard:\n imagefs.available: 0%\n nodefs.available: 0%\n nodefs.inodesFree: 0%\nevictionPressureTransitionPeriod: 0s\nfailSwapOn: false\nfileCheckFrequency: 0s\nhairpinMode: hairpin-veth\nhealthzBindAddress: 127.0.0.1\nhealthzPort: 10248\nhttpCheckFrequency: 0s\nimageGCHighThresholdPercent: 100\nimageMinimumGCAge: 0s\nkind: KubeletConfiguration\nlogging:\n flushFrequency: 0\n options:\n json:\n infoBufferSize: \"0\"\n verbosity: 0\nmemorySwap: {}\nnodeStatusReportFrequency: 0s\nnodeStatusUpdateFrequency: 0s\nresolvConf: /run/systemd/resolve/resolv.conf\nrotateCertificates: true\nruntimeRequestTimeout: 15m0s\nshutdownGracePeriod: 0s\nshutdownGracePeriodCriticalPods: 0s\nstaticPodPath: /etc/kubernetes/manifests\nstreamingConnectionIdleTimeout: 0s\nsyncFrequency: 0s\nvolumeStatsAggPeriod: 0s\n"},"dirname":{"type":"\u0007","value":"/var/lib/kubelet"},"empty":{"type":"\u0004","value":false},"exists":{"type":"\u0004","value":true},"group":{"type":"\u001bgroup","value":{"Name":"group","ID":"group/0/root"}},"path":{"type":"\u0007","value":"/var/lib/kubelet/config.yaml"},"permissions":{"type":"\u001bfile.permissions","value":{"Name":"file.permissions","ID":"-rw-r--r--"}},"size":{"type":"\u0005","value":1214},"user":{"type":"\u001buser","value":{"Name":"user","ID":"user/0/root"}}}},{"Resource":"file.permissions","ID":"-rw-r--r--","Fields":{"string":{"type":"\u0007","value":"-rw-r--r--"}}},{"Resource":"group","ID":"group/0/root","Fields":{"gid":{"type":"\u0005","value":0},"name":{"type":"\u0007","value":"root"}}},{"Resource":"kubelet","ID":"","Fields":{"configFile":{"type":"\u001bfile","value":{"Name":"file","ID":"/var/lib/kubelet/config.yaml"}},"process":{"type":"\u001bprocess","value":{"Name":"process","ID":"57742"}}}},{"Resource":"process","ID":"1","Fields":{"executable":{"type":"\u0007","value":"/sbin/init"},"pid":{"type":"\u0005","value":1},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"10","Fields":{"executable":{"type":"\u0007","value":"[rcu_tasks_rude_]"},"pid":{"type":"\u0005","value":10},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1011","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/cri-dockerd"},"pid":{"type":"\u0005","value":1011},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"11","Fields":{"executable":{"type":"\u0007","value":"[rcu_tasks_trace]"},"pid":{"type":"\u0005","value":11},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1116","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/dockerd"},"pid":{"type":"\u0005","value":1116},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1122","Fields":{"executable":{"type":"\u0007","value":"containerd"},"pid":{"type":"\u0005","value":1122},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"11504","Fields":{"executable":{"type":"\u0007","value":"[kworker/1:0-cgroup_pidlist_destroy]"},"pid":{"type":"\u0005","value":11504},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"12","Fields":{"executable":{"type":"\u0007","value":"[ksoftirqd/0]"},"pid":{"type":"\u0005","value":12},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"13","Fields":{"executable":{"type":"\u0007","value":"[rcu_sched]"},"pid":{"type":"\u0005","value":13},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"14","Fields":{"executable":{"type":"\u0007","value":"[migration/0]"},"pid":{"type":"\u0005","value":14},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"15","Fields":{"executable":{"type":"\u0007","value":"[cpuhp/0]"},"pid":{"type":"\u0005","value":15},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16","Fields":{"executable":{"type":"\u0007","value":"[cpuhp/1]"},"pid":{"type":"\u0005","value":16},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16206","Fields":{"executable":{"type":"\u0007","value":"[kworker/0:1-cgroup_pidlist_destroy]"},"pid":{"type":"\u0005","value":16206},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16211","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-timesyncd"},"pid":{"type":"\u0005","value":16211},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16220","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-udevd"},"pid":{"type":"\u0005","value":16220},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16229","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-journald"},"pid":{"type":"\u0005","value":16229},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16233","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-logind"},"pid":{"type":"\u0005","value":16233},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16251","Fields":{"executable":{"type":"\u0007","value":"[kworker/u4:4-flush-253:0]"},"pid":{"type":"\u0005","value":16251},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1628","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":1628},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16314","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-networkd"},"pid":{"type":"\u0005","value":16314},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16317","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-resolved"},"pid":{"type":"\u0005","value":16317},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1638","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":1638},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1670","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":1670},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"17","Fields":{"executable":{"type":"\u0007","value":"[migration/1]"},"pid":{"type":"\u0005","value":17},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1702","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":1702},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1708","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":1708},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1723","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":1723},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1743","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":1743},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1754","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":1754},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"18","Fields":{"executable":{"type":"\u0007","value":"[ksoftirqd/1]"},"pid":{"type":"\u0005","value":18},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1803","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":1803},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1823","Fields":{"executable":{"type":"\u0007","value":"kube-controller-manager"},"pid":{"type":"\u0005","value":1823},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1850","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":1850},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1871","Fields":{"executable":{"type":"\u0007","value":"kube-apiserver"},"pid":{"type":"\u0005","value":1871},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1886","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":1886},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1921","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":1921},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1936","Fields":{"executable":{"type":"\u0007","value":"etcd"},"pid":{"type":"\u0005","value":1936},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1953","Fields":{"executable":{"type":"\u0007","value":"kube-scheduler"},"pid":{"type":"\u0005","value":1953},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"2","Fields":{"executable":{"type":"\u0007","value":"[kthreadd]"},"pid":{"type":"\u0005","value":2},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"20","Fields":{"executable":{"type":"\u0007","value":"[kworker/1:0H-events_highpri]"},"pid":{"type":"\u0005","value":20},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"21","Fields":{"executable":{"type":"\u0007","value":"[kdevtmpfs]"},"pid":{"type":"\u0005","value":21},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"22","Fields":{"executable":{"type":"\u0007","value":"[netns]"},"pid":{"type":"\u0005","value":22},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"221","Fields":{"executable":{"type":"\u0007","value":"/usr/sbin/acpid"},"pid":{"type":"\u0005","value":221},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"222","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/dbus-daemon"},"pid":{"type":"\u0005","value":222},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"25","Fields":{"executable":{"type":"\u0007","value":"[writeback]"},"pid":{"type":"\u0005","value":25},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"26","Fields":{"executable":{"type":"\u0007","value":"[kcompactd0]"},"pid":{"type":"\u0005","value":26},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"27","Fields":{"executable":{"type":"\u0007","value":"[khugepaged]"},"pid":{"type":"\u0005","value":27},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"292","Fields":{"executable":{"type":"\u0007","value":"[jbd2/vda1-8]"},"pid":{"type":"\u0005","value":292},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"293","Fields":{"executable":{"type":"\u0007","value":"[ext4-rsv-conver]"},"pid":{"type":"\u0005","value":293},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3","Fields":{"executable":{"type":"\u0007","value":"[rcu_gp]"},"pid":{"type":"\u0005","value":3},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3166","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3166},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3186","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":3186},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3208","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3208},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3228","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":3228},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3242","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3242},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3264","Fields":{"executable":{"type":"\u0007","value":"/usr/local/bin/kube-proxy"},"pid":{"type":"\u0005","value":3264},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3391","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3391},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"341","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":341},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3411","Fields":{"executable":{"type":"\u0007","value":"/storage-provisioner"},"pid":{"type":"\u0005","value":3411},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3438","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3438},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3459","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":3459},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3529","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3529},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3551","Fields":{"executable":{"type":"\u0007","value":"/coredns"},"pid":{"type":"\u0005","value":3551},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"380","Fields":{"executable":{"type":"\u0007","value":"/usr/sbin/rpc.statd"},"pid":{"type":"\u0005","value":380},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"386","Fields":{"executable":{"type":"\u0007","value":"/usr/sbin/rpcbind"},"pid":{"type":"\u0005","value":386},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"387","Fields":{"executable":{"type":"\u0007","value":"/usr/sbin/rpc.mountd"},"pid":{"type":"\u0005","value":387},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"393","Fields":{"executable":{"type":"\u0007","value":"[kworker/u5:1-xprtiod]"},"pid":{"type":"\u0005","value":393},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"394","Fields":{"executable":{"type":"\u0007","value":"[lockd]"},"pid":{"type":"\u0005","value":394},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"4","Fields":{"executable":{"type":"\u0007","value":"[rcu_par_gp]"},"pid":{"type":"\u0005","value":4},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"41","Fields":{"executable":{"type":"\u0007","value":"[cryptd]"},"pid":{"type":"\u0005","value":41},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"434","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":434},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"435","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":435},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"436","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":436},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"437","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":437},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"438","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":438},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"439","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":439},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"440","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":440},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"441","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":441},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"53","Fields":{"executable":{"type":"\u0007","value":"[kblockd]"},"pid":{"type":"\u0005","value":53},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"54","Fields":{"executable":{"type":"\u0007","value":"[blkcg_punt_bio]"},"pid":{"type":"\u0005","value":54},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"55","Fields":{"executable":{"type":"\u0007","value":"[ata_sff]"},"pid":{"type":"\u0005","value":55},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"55460","Fields":{"executable":{"type":"\u0007","value":"[kworker/u4:0-flush-253:0]"},"pid":{"type":"\u0005","value":55460},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"56","Fields":{"executable":{"type":"\u0007","value":"[md]"},"pid":{"type":"\u0005","value":56},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"57","Fields":{"executable":{"type":"\u0007","value":"[kworker/0:1H-kblockd]"},"pid":{"type":"\u0005","value":57},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"57503","Fields":{"executable":{"type":"\u0007","value":"[kworker/0:0-events_power_efficient]"},"pid":{"type":"\u0005","value":57503},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"57741","Fields":{"executable":{"type":"\u0007","value":"[kworker/1:1-events_power_efficient]"},"pid":{"type":"\u0005","value":57741},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"57742","Fields":{"command":{"type":"\u0007","value":"/var/lib/minikube/binaries/v1.28.3/kubelet --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --config=/var/lib/kubelet/config.yaml --container-runtime-endpoint=unix:///var/run/cri-dockerd.sock --hostname-override=minikube --kubeconfig=/etc/kubernetes/kubelet.conf --node-ip=192.168.39.137 --runtime-request-timeout=7m"},"executable":{"type":"\u0007","value":"/var/lib/minikube/binaries/v1.28.3/kubelet"},"flags":{"type":"\u001a\u0007\u0007","value":{"bootstrap-kubeconfig":"/etc/kubernetes/bootstrap-kubelet.conf","config":"/var/lib/kubelet/config.yaml","container-runtime-endpoint":"unix:///var/run/cri-dockerd.sock","hostname-override":"minikube","kubeconfig":"/etc/kubernetes/kubelet.conf","node-ip":"192.168.39.137","runtime-request-timeout":"7m"}},"pid":{"type":"\u0005","value":57742},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"58","Fields":{"executable":{"type":"\u0007","value":"[rpciod]"},"pid":{"type":"\u0005","value":58},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"59","Fields":{"executable":{"type":"\u0007","value":"[kworker/u5:0-xprtiod]"},"pid":{"type":"\u0005","value":59},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"6","Fields":{"executable":{"type":"\u0007","value":"[kworker/0:0H-events_highpri]"},"pid":{"type":"\u0005","value":6},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"60","Fields":{"executable":{"type":"\u0007","value":"[xprtiod]"},"pid":{"type":"\u0005","value":60},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"61","Fields":{"executable":{"type":"\u0007","value":"[cfg80211]"},"pid":{"type":"\u0005","value":61},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"61098","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":61098},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"61100","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":61100},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"61104","Fields":{"executable":{"type":"\u0007","value":"/usr/libexec/sftp-server"},"pid":{"type":"\u0005","value":61104},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"61111","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":61111},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"61113","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":61113},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"61116","Fields":{"executable":{"type":"\u0007","value":"/usr/libexec/sftp-server"},"pid":{"type":"\u0005","value":61116},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"61117","Fields":{"executable":{"type":"\u0007","value":"/usr/libexec/sftp-server"},"pid":{"type":"\u0005","value":61117},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"61118","Fields":{"executable":{"type":"\u0007","value":"/usr/libexec/sftp-server"},"pid":{"type":"\u0005","value":61118},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"61188","Fields":{"executable":{"type":"\u0007","value":"ps"},"pid":{"type":"\u0005","value":61188},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"63","Fields":{"executable":{"type":"\u0007","value":"[kswapd0]"},"pid":{"type":"\u0005","value":63},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"64","Fields":{"executable":{"type":"\u0007","value":"[nfsiod]"},"pid":{"type":"\u0005","value":64},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"65","Fields":{"executable":{"type":"\u0007","value":"[cifsiod]"},"pid":{"type":"\u0005","value":65},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"66","Fields":{"executable":{"type":"\u0007","value":"[smb3decryptd]"},"pid":{"type":"\u0005","value":66},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"67","Fields":{"executable":{"type":"\u0007","value":"[cifsfileinfoput]"},"pid":{"type":"\u0005","value":67},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"68","Fields":{"executable":{"type":"\u0007","value":"[cifsoplockd]"},"pid":{"type":"\u0005","value":68},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"69","Fields":{"executable":{"type":"\u0007","value":"[xfsalloc]"},"pid":{"type":"\u0005","value":69},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"70","Fields":{"executable":{"type":"\u0007","value":"[xfs_mru_cache]"},"pid":{"type":"\u0005","value":70},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"72","Fields":{"executable":{"type":"\u0007","value":"[acpi_thermal_pm]"},"pid":{"type":"\u0005","value":72},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"74","Fields":{"executable":{"type":"\u0007","value":"[hwrng]"},"pid":{"type":"\u0005","value":74},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"75","Fields":{"executable":{"type":"\u0007","value":"[scsi_eh_0]"},"pid":{"type":"\u0005","value":75},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"76","Fields":{"executable":{"type":"\u0007","value":"[scsi_tmf_0]"},"pid":{"type":"\u0005","value":76},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"77","Fields":{"executable":{"type":"\u0007","value":"[scsi_eh_1]"},"pid":{"type":"\u0005","value":77},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"78","Fields":{"executable":{"type":"\u0007","value":"[scsi_tmf_1]"},"pid":{"type":"\u0005","value":78},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"81","Fields":{"executable":{"type":"\u0007","value":"[dm_bufio_cache]"},"pid":{"type":"\u0005","value":81},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"82","Fields":{"executable":{"type":"\u0007","value":"[kworker/1:1H-kblockd]"},"pid":{"type":"\u0005","value":82},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"83","Fields":{"executable":{"type":"\u0007","value":"[ipv6_addrconf]"},"pid":{"type":"\u0005","value":83},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"84","Fields":{"executable":{"type":"\u0007","value":"[ceph-msgr]"},"pid":{"type":"\u0005","value":84},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"9","Fields":{"executable":{"type":"\u0007","value":"[mm_percpu_wq]"},"pid":{"type":"\u0005","value":9},"state":{"type":"\u0007","value":""}}},{"Resource":"processes","ID":"","Fields":{"list":{"type":"\u0019\u001bprocess","value":[{"Name":"process","ID":"1"},{"Name":"process","ID":"2"},{"Name":"process","ID":"3"},{"Name":"process","ID":"4"},{"Name":"process","ID":"6"},{"Name":"process","ID":"9"},{"Name":"process","ID":"10"},{"Name":"process","ID":"11"},{"Name":"process","ID":"12"},{"Name":"process","ID":"13"},{"Name":"process","ID":"14"},{"Name":"process","ID":"15"},{"Name":"process","ID":"16"},{"Name":"process","ID":"17"},{"Name":"process","ID":"18"},{"Name":"process","ID":"20"},{"Name":"process","ID":"21"},{"Name":"process","ID":"22"},{"Name":"process","ID":"23"},{"Name":"process","ID":"24"},{"Name":"process","ID":"25"},{"Name":"process","ID":"26"},{"Name":"process","ID":"27"},{"Name":"process","ID":"41"},{"Name":"process","ID":"53"},{"Name":"process","ID":"54"},{"Name":"process","ID":"55"},{"Name":"process","ID":"56"},{"Name":"process","ID":"57"},{"Name":"process","ID":"58"},{"Name":"process","ID":"59"},{"Name":"process","ID":"60"},{"Name":"process","ID":"61"},{"Name":"process","ID":"63"},{"Name":"process","ID":"64"},{"Name":"process","ID":"65"},{"Name":"process","ID":"66"},{"Name":"process","ID":"67"},{"Name":"process","ID":"68"},{"Name":"process","ID":"69"},{"Name":"process","ID":"70"},{"Name":"process","ID":"72"},{"Name":"process","ID":"74"},{"Name":"process","ID":"75"},{"Name":"process","ID":"76"},{"Name":"process","ID":"77"},{"Name":"process","ID":"78"},{"Name":"process","ID":"81"},{"Name":"process","ID":"82"},{"Name":"process","ID":"83"},{"Name":"process","ID":"84"},{"Name":"process","ID":"221"},{"Name":"process","ID":"222"},{"Name":"process","ID":"224"},{"Name":"process","ID":"232"},{"Name":"process","ID":"292"},{"Name":"process","ID":"293"},{"Name":"process","ID":"341"},{"Name":"process","ID":"380"},{"Name":"process","ID":"386"},{"Name":"process","ID":"387"},{"Name":"process","ID":"393"},{"Name":"process","ID":"394"},{"Name":"process","ID":"434"},{"Name":"process","ID":"435"},{"Name":"process","ID":"436"},{"Name":"process","ID":"437"},{"Name":"process","ID":"438"},{"Name":"process","ID":"439"},{"Name":"process","ID":"440"},{"Name":"process","ID":"441"},{"Name":"process","ID":"1011"},{"Name":"process","ID":"1116"},{"Name":"process","ID":"1122"},{"Name":"process","ID":"1628"},{"Name":"process","ID":"1638"},{"Name":"process","ID":"1670"},{"Name":"process","ID":"1702"},{"Name":"process","ID":"1708"},{"Name":"process","ID":"1723"},{"Name":"process","ID":"1743"},{"Name":"process","ID":"1754"},{"Name":"process","ID":"1803"},{"Name":"process","ID":"1823"},{"Name":"process","ID":"1850"},{"Name":"process","ID":"1871"},{"Name":"process","ID":"1886"},{"Name":"process","ID":"1921"},{"Name":"process","ID":"1936"},{"Name":"process","ID":"1953"},{"Name":"process","ID":"3166"},{"Name":"process","ID":"3186"},{"Name":"process","ID":"3208"},{"Name":"process","ID":"3228"},{"Name":"process","ID":"3242"},{"Name":"process","ID":"3264"},{"Name":"process","ID":"3391"},{"Name":"process","ID":"3411"},{"Name":"process","ID":"3438"},{"Name":"process","ID":"3459"},{"Name":"process","ID":"3529"},{"Name":"process","ID":"3551"},{"Name":"process","ID":"11504"},{"Name":"process","ID":"16206"},{"Name":"process","ID":"16211"},{"Name":"process","ID":"16220"},{"Name":"process","ID":"16229"},{"Name":"process","ID":"16233"},{"Name":"process","ID":"16251"},{"Name":"process","ID":"16314"},{"Name":"process","ID":"16317"},{"Name":"process","ID":"55460"},{"Name":"process","ID":"57503"},{"Name":"process","ID":"57741"},{"Name":"process","ID":"57742"},{"Name":"process","ID":"61098"},{"Name":"process","ID":"61100"},{"Name":"process","ID":"61104"},{"Name":"process","ID":"61111"},{"Name":"process","ID":"61113"},{"Name":"process","ID":"61116"},{"Name":"process","ID":"61117"},{"Name":"process","ID":"61118"},{"Name":"process","ID":"61188"}]}}},{"Resource":"user","ID":"user/0/root","Fields":{"gid":{"type":"\u0005","value":0},"name":{"type":"\u0007","value":"root"},"uid":{"type":"\u0005","value":0}}}]}]} \ No newline at end of file +{"assets":[{"asset":{"id":"Buildroot 2021.02.12","platformIDs":["//platformid.api.mondoo.app/hostname/minikube","//platformid.api.mondoo.app/runtime/ssh/hostkey/SHA256-9GHnVr3zGaRkwyvFET6LOu0zq3k3j89XH/Xwb6r/vlI"],"name":"buildroot","arch":"x86_64","title":"Buildroot 2021.02.12","family":["linux","unix","os"],"version":"2021.02.12","kind":"baremetal","labels":{"distro-id":"buildroot"}},"connections":[{"url":"ssh://192.168.39.137","provider":"go.mondoo.com/cnquery/v10/providers/os","connector":"ssh","version":""}],"resources":[{"Resource":"file","ID":"/var/lib/kubelet/config.yaml","Fields":{"basename":{"type":"\u0007","value":"config.yaml"},"content":{"type":"\u0007","value":"apiVersion: kubelet.config.k8s.io/v1beta1\nauthentication:\n anonymous:\n enabled: false\n webhook:\n cacheTTL: 0s\n enabled: true\n x509:\n clientCAFile: /var/lib/minikube/certs/ca.crt\nauthorization:\n mode: Webhook\n webhook:\n cacheAuthorizedTTL: 0s\n cacheUnauthorizedTTL: 0s\ncgroupDriver: cgroupfs\nclusterDNS:\n- 10.96.0.10\nclusterDomain: cluster.local\ncontainerRuntimeEndpoint: \"\"\ncpuManagerReconcilePeriod: 0s\nevictionHard:\n imagefs.available: 0%\n nodefs.available: 0%\n nodefs.inodesFree: 0%\nevictionPressureTransitionPeriod: 0s\nfailSwapOn: false\nfileCheckFrequency: 0s\nhairpinMode: hairpin-veth\nhealthzBindAddress: 127.0.0.1\nhealthzPort: 10248\nhttpCheckFrequency: 0s\nimageGCHighThresholdPercent: 100\nimageMinimumGCAge: 0s\nkind: KubeletConfiguration\nlogging:\n flushFrequency: 0\n options:\n json:\n infoBufferSize: \"0\"\n verbosity: 0\nmemorySwap: {}\nnodeStatusReportFrequency: 0s\nnodeStatusUpdateFrequency: 0s\nresolvConf: /run/systemd/resolve/resolv.conf\nrotateCertificates: true\nruntimeRequestTimeout: 15m0s\nshutdownGracePeriod: 0s\nshutdownGracePeriodCriticalPods: 0s\nstaticPodPath: /etc/kubernetes/manifests\nstreamingConnectionIdleTimeout: 0s\nsyncFrequency: 0s\nvolumeStatsAggPeriod: 0s\n"},"dirname":{"type":"\u0007","value":"/var/lib/kubelet"},"empty":{"type":"\u0004","value":false},"exists":{"type":"\u0004","value":true},"group":{"type":"\u001bgroup","value":{"Name":"group","ID":"group/0/root"}},"path":{"type":"\u0007","value":"/var/lib/kubelet/config.yaml"},"permissions":{"type":"\u001bfile.permissions","value":{"Name":"file.permissions","ID":"-rw-r--r--"}},"size":{"type":"\u0005","value":1214},"user":{"type":"\u001buser","value":{"Name":"user","ID":"user/0/root"}}}},{"Resource":"file.permissions","ID":"-rw-r--r--","Fields":{"string":{"type":"\u0007","value":"-rw-r--r--"}}},{"Resource":"group","ID":"group/0/root","Fields":{"gid":{"type":"\u0005","value":0},"name":{"type":"\u0007","value":"root"}}},{"Resource":"kubelet","ID":"","Fields":{"configFile":{"type":"\u001bfile","value":{"Name":"file","ID":"/var/lib/kubelet/config.yaml"}},"process":{"type":"\u001bprocess","value":{"Name":"process","ID":"57742"}}}},{"Resource":"process","ID":"1","Fields":{"executable":{"type":"\u0007","value":"/sbin/init"},"pid":{"type":"\u0005","value":1},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"10","Fields":{"executable":{"type":"\u0007","value":"[rcu_tasks_rude_]"},"pid":{"type":"\u0005","value":10},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1011","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/cri-dockerd"},"pid":{"type":"\u0005","value":1011},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"11","Fields":{"executable":{"type":"\u0007","value":"[rcu_tasks_trace]"},"pid":{"type":"\u0005","value":11},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1116","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/dockerd"},"pid":{"type":"\u0005","value":1116},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1122","Fields":{"executable":{"type":"\u0007","value":"containerd"},"pid":{"type":"\u0005","value":1122},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"11504","Fields":{"executable":{"type":"\u0007","value":"[kworker/1:0-cgroup_pidlist_destroy]"},"pid":{"type":"\u0005","value":11504},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"12","Fields":{"executable":{"type":"\u0007","value":"[ksoftirqd/0]"},"pid":{"type":"\u0005","value":12},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"13","Fields":{"executable":{"type":"\u0007","value":"[rcu_sched]"},"pid":{"type":"\u0005","value":13},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"14","Fields":{"executable":{"type":"\u0007","value":"[migration/0]"},"pid":{"type":"\u0005","value":14},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"15","Fields":{"executable":{"type":"\u0007","value":"[cpuhp/0]"},"pid":{"type":"\u0005","value":15},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16","Fields":{"executable":{"type":"\u0007","value":"[cpuhp/1]"},"pid":{"type":"\u0005","value":16},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16206","Fields":{"executable":{"type":"\u0007","value":"[kworker/0:1-cgroup_pidlist_destroy]"},"pid":{"type":"\u0005","value":16206},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16211","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-timesyncd"},"pid":{"type":"\u0005","value":16211},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16220","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-udevd"},"pid":{"type":"\u0005","value":16220},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16229","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-journald"},"pid":{"type":"\u0005","value":16229},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16233","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-logind"},"pid":{"type":"\u0005","value":16233},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16251","Fields":{"executable":{"type":"\u0007","value":"[kworker/u4:4-flush-253:0]"},"pid":{"type":"\u0005","value":16251},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1628","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":1628},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16314","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-networkd"},"pid":{"type":"\u0005","value":16314},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16317","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-resolved"},"pid":{"type":"\u0005","value":16317},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1638","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":1638},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1670","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":1670},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"17","Fields":{"executable":{"type":"\u0007","value":"[migration/1]"},"pid":{"type":"\u0005","value":17},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1702","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":1702},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1708","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":1708},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1723","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":1723},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1743","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":1743},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1754","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":1754},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"18","Fields":{"executable":{"type":"\u0007","value":"[ksoftirqd/1]"},"pid":{"type":"\u0005","value":18},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1803","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":1803},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1823","Fields":{"executable":{"type":"\u0007","value":"kube-controller-manager"},"pid":{"type":"\u0005","value":1823},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1850","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":1850},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1871","Fields":{"executable":{"type":"\u0007","value":"kube-apiserver"},"pid":{"type":"\u0005","value":1871},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1886","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":1886},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1921","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":1921},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1936","Fields":{"executable":{"type":"\u0007","value":"etcd"},"pid":{"type":"\u0005","value":1936},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1953","Fields":{"executable":{"type":"\u0007","value":"kube-scheduler"},"pid":{"type":"\u0005","value":1953},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"2","Fields":{"executable":{"type":"\u0007","value":"[kthreadd]"},"pid":{"type":"\u0005","value":2},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"20","Fields":{"executable":{"type":"\u0007","value":"[kworker/1:0H-events_highpri]"},"pid":{"type":"\u0005","value":20},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"21","Fields":{"executable":{"type":"\u0007","value":"[kdevtmpfs]"},"pid":{"type":"\u0005","value":21},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"22","Fields":{"executable":{"type":"\u0007","value":"[netns]"},"pid":{"type":"\u0005","value":22},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"221","Fields":{"executable":{"type":"\u0007","value":"/usr/sbin/acpid"},"pid":{"type":"\u0005","value":221},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"222","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/dbus-daemon"},"pid":{"type":"\u0005","value":222},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"25","Fields":{"executable":{"type":"\u0007","value":"[writeback]"},"pid":{"type":"\u0005","value":25},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"26","Fields":{"executable":{"type":"\u0007","value":"[kcompactd0]"},"pid":{"type":"\u0005","value":26},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"27","Fields":{"executable":{"type":"\u0007","value":"[khugepaged]"},"pid":{"type":"\u0005","value":27},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"292","Fields":{"executable":{"type":"\u0007","value":"[jbd2/vda1-8]"},"pid":{"type":"\u0005","value":292},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"293","Fields":{"executable":{"type":"\u0007","value":"[ext4-rsv-conver]"},"pid":{"type":"\u0005","value":293},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3","Fields":{"executable":{"type":"\u0007","value":"[rcu_gp]"},"pid":{"type":"\u0005","value":3},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3166","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3166},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3186","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":3186},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3208","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3208},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3228","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":3228},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3242","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3242},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3264","Fields":{"executable":{"type":"\u0007","value":"/usr/local/bin/kube-proxy"},"pid":{"type":"\u0005","value":3264},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3391","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3391},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"341","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":341},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3411","Fields":{"executable":{"type":"\u0007","value":"/storage-provisioner"},"pid":{"type":"\u0005","value":3411},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3438","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3438},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3459","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":3459},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3529","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3529},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3551","Fields":{"executable":{"type":"\u0007","value":"/coredns"},"pid":{"type":"\u0005","value":3551},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"380","Fields":{"executable":{"type":"\u0007","value":"/usr/sbin/rpc.statd"},"pid":{"type":"\u0005","value":380},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"386","Fields":{"executable":{"type":"\u0007","value":"/usr/sbin/rpcbind"},"pid":{"type":"\u0005","value":386},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"387","Fields":{"executable":{"type":"\u0007","value":"/usr/sbin/rpc.mountd"},"pid":{"type":"\u0005","value":387},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"393","Fields":{"executable":{"type":"\u0007","value":"[kworker/u5:1-xprtiod]"},"pid":{"type":"\u0005","value":393},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"394","Fields":{"executable":{"type":"\u0007","value":"[lockd]"},"pid":{"type":"\u0005","value":394},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"4","Fields":{"executable":{"type":"\u0007","value":"[rcu_par_gp]"},"pid":{"type":"\u0005","value":4},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"41","Fields":{"executable":{"type":"\u0007","value":"[cryptd]"},"pid":{"type":"\u0005","value":41},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"434","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":434},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"435","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":435},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"436","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":436},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"437","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":437},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"438","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":438},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"439","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":439},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"440","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":440},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"441","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":441},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"53","Fields":{"executable":{"type":"\u0007","value":"[kblockd]"},"pid":{"type":"\u0005","value":53},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"54","Fields":{"executable":{"type":"\u0007","value":"[blkcg_punt_bio]"},"pid":{"type":"\u0005","value":54},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"55","Fields":{"executable":{"type":"\u0007","value":"[ata_sff]"},"pid":{"type":"\u0005","value":55},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"55460","Fields":{"executable":{"type":"\u0007","value":"[kworker/u4:0-flush-253:0]"},"pid":{"type":"\u0005","value":55460},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"56","Fields":{"executable":{"type":"\u0007","value":"[md]"},"pid":{"type":"\u0005","value":56},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"57","Fields":{"executable":{"type":"\u0007","value":"[kworker/0:1H-kblockd]"},"pid":{"type":"\u0005","value":57},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"57503","Fields":{"executable":{"type":"\u0007","value":"[kworker/0:0-events_power_efficient]"},"pid":{"type":"\u0005","value":57503},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"57741","Fields":{"executable":{"type":"\u0007","value":"[kworker/1:1-events_power_efficient]"},"pid":{"type":"\u0005","value":57741},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"57742","Fields":{"command":{"type":"\u0007","value":"/var/lib/minikube/binaries/v1.28.3/kubelet --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --config=/var/lib/kubelet/config.yaml --container-runtime-endpoint=unix:///var/run/cri-dockerd.sock --hostname-override=minikube --kubeconfig=/etc/kubernetes/kubelet.conf --node-ip=192.168.39.137 --runtime-request-timeout=7m"},"executable":{"type":"\u0007","value":"/var/lib/minikube/binaries/v1.28.3/kubelet"},"flags":{"type":"\u001a\u0007\u0007","value":{"bootstrap-kubeconfig":"/etc/kubernetes/bootstrap-kubelet.conf","config":"/var/lib/kubelet/config.yaml","container-runtime-endpoint":"unix:///var/run/cri-dockerd.sock","hostname-override":"minikube","kubeconfig":"/etc/kubernetes/kubelet.conf","node-ip":"192.168.39.137","runtime-request-timeout":"7m"}},"pid":{"type":"\u0005","value":57742},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"58","Fields":{"executable":{"type":"\u0007","value":"[rpciod]"},"pid":{"type":"\u0005","value":58},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"59","Fields":{"executable":{"type":"\u0007","value":"[kworker/u5:0-xprtiod]"},"pid":{"type":"\u0005","value":59},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"6","Fields":{"executable":{"type":"\u0007","value":"[kworker/0:0H-events_highpri]"},"pid":{"type":"\u0005","value":6},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"60","Fields":{"executable":{"type":"\u0007","value":"[xprtiod]"},"pid":{"type":"\u0005","value":60},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"61","Fields":{"executable":{"type":"\u0007","value":"[cfg80211]"},"pid":{"type":"\u0005","value":61},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"61098","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":61098},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"61100","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":61100},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"61104","Fields":{"executable":{"type":"\u0007","value":"/usr/libexec/sftp-server"},"pid":{"type":"\u0005","value":61104},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"61111","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":61111},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"61113","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":61113},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"61116","Fields":{"executable":{"type":"\u0007","value":"/usr/libexec/sftp-server"},"pid":{"type":"\u0005","value":61116},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"61117","Fields":{"executable":{"type":"\u0007","value":"/usr/libexec/sftp-server"},"pid":{"type":"\u0005","value":61117},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"61118","Fields":{"executable":{"type":"\u0007","value":"/usr/libexec/sftp-server"},"pid":{"type":"\u0005","value":61118},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"61188","Fields":{"executable":{"type":"\u0007","value":"ps"},"pid":{"type":"\u0005","value":61188},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"63","Fields":{"executable":{"type":"\u0007","value":"[kswapd0]"},"pid":{"type":"\u0005","value":63},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"64","Fields":{"executable":{"type":"\u0007","value":"[nfsiod]"},"pid":{"type":"\u0005","value":64},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"65","Fields":{"executable":{"type":"\u0007","value":"[cifsiod]"},"pid":{"type":"\u0005","value":65},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"66","Fields":{"executable":{"type":"\u0007","value":"[smb3decryptd]"},"pid":{"type":"\u0005","value":66},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"67","Fields":{"executable":{"type":"\u0007","value":"[cifsfileinfoput]"},"pid":{"type":"\u0005","value":67},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"68","Fields":{"executable":{"type":"\u0007","value":"[cifsoplockd]"},"pid":{"type":"\u0005","value":68},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"69","Fields":{"executable":{"type":"\u0007","value":"[xfsalloc]"},"pid":{"type":"\u0005","value":69},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"70","Fields":{"executable":{"type":"\u0007","value":"[xfs_mru_cache]"},"pid":{"type":"\u0005","value":70},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"72","Fields":{"executable":{"type":"\u0007","value":"[acpi_thermal_pm]"},"pid":{"type":"\u0005","value":72},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"74","Fields":{"executable":{"type":"\u0007","value":"[hwrng]"},"pid":{"type":"\u0005","value":74},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"75","Fields":{"executable":{"type":"\u0007","value":"[scsi_eh_0]"},"pid":{"type":"\u0005","value":75},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"76","Fields":{"executable":{"type":"\u0007","value":"[scsi_tmf_0]"},"pid":{"type":"\u0005","value":76},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"77","Fields":{"executable":{"type":"\u0007","value":"[scsi_eh_1]"},"pid":{"type":"\u0005","value":77},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"78","Fields":{"executable":{"type":"\u0007","value":"[scsi_tmf_1]"},"pid":{"type":"\u0005","value":78},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"81","Fields":{"executable":{"type":"\u0007","value":"[dm_bufio_cache]"},"pid":{"type":"\u0005","value":81},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"82","Fields":{"executable":{"type":"\u0007","value":"[kworker/1:1H-kblockd]"},"pid":{"type":"\u0005","value":82},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"83","Fields":{"executable":{"type":"\u0007","value":"[ipv6_addrconf]"},"pid":{"type":"\u0005","value":83},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"84","Fields":{"executable":{"type":"\u0007","value":"[ceph-msgr]"},"pid":{"type":"\u0005","value":84},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"9","Fields":{"executable":{"type":"\u0007","value":"[mm_percpu_wq]"},"pid":{"type":"\u0005","value":9},"state":{"type":"\u0007","value":""}}},{"Resource":"processes","ID":"","Fields":{"list":{"type":"\u0019\u001bprocess","value":[{"Name":"process","ID":"1"},{"Name":"process","ID":"2"},{"Name":"process","ID":"3"},{"Name":"process","ID":"4"},{"Name":"process","ID":"6"},{"Name":"process","ID":"9"},{"Name":"process","ID":"10"},{"Name":"process","ID":"11"},{"Name":"process","ID":"12"},{"Name":"process","ID":"13"},{"Name":"process","ID":"14"},{"Name":"process","ID":"15"},{"Name":"process","ID":"16"},{"Name":"process","ID":"17"},{"Name":"process","ID":"18"},{"Name":"process","ID":"20"},{"Name":"process","ID":"21"},{"Name":"process","ID":"22"},{"Name":"process","ID":"23"},{"Name":"process","ID":"24"},{"Name":"process","ID":"25"},{"Name":"process","ID":"26"},{"Name":"process","ID":"27"},{"Name":"process","ID":"41"},{"Name":"process","ID":"53"},{"Name":"process","ID":"54"},{"Name":"process","ID":"55"},{"Name":"process","ID":"56"},{"Name":"process","ID":"57"},{"Name":"process","ID":"58"},{"Name":"process","ID":"59"},{"Name":"process","ID":"60"},{"Name":"process","ID":"61"},{"Name":"process","ID":"63"},{"Name":"process","ID":"64"},{"Name":"process","ID":"65"},{"Name":"process","ID":"66"},{"Name":"process","ID":"67"},{"Name":"process","ID":"68"},{"Name":"process","ID":"69"},{"Name":"process","ID":"70"},{"Name":"process","ID":"72"},{"Name":"process","ID":"74"},{"Name":"process","ID":"75"},{"Name":"process","ID":"76"},{"Name":"process","ID":"77"},{"Name":"process","ID":"78"},{"Name":"process","ID":"81"},{"Name":"process","ID":"82"},{"Name":"process","ID":"83"},{"Name":"process","ID":"84"},{"Name":"process","ID":"221"},{"Name":"process","ID":"222"},{"Name":"process","ID":"224"},{"Name":"process","ID":"232"},{"Name":"process","ID":"292"},{"Name":"process","ID":"293"},{"Name":"process","ID":"341"},{"Name":"process","ID":"380"},{"Name":"process","ID":"386"},{"Name":"process","ID":"387"},{"Name":"process","ID":"393"},{"Name":"process","ID":"394"},{"Name":"process","ID":"434"},{"Name":"process","ID":"435"},{"Name":"process","ID":"436"},{"Name":"process","ID":"437"},{"Name":"process","ID":"438"},{"Name":"process","ID":"439"},{"Name":"process","ID":"440"},{"Name":"process","ID":"441"},{"Name":"process","ID":"1011"},{"Name":"process","ID":"1116"},{"Name":"process","ID":"1122"},{"Name":"process","ID":"1628"},{"Name":"process","ID":"1638"},{"Name":"process","ID":"1670"},{"Name":"process","ID":"1702"},{"Name":"process","ID":"1708"},{"Name":"process","ID":"1723"},{"Name":"process","ID":"1743"},{"Name":"process","ID":"1754"},{"Name":"process","ID":"1803"},{"Name":"process","ID":"1823"},{"Name":"process","ID":"1850"},{"Name":"process","ID":"1871"},{"Name":"process","ID":"1886"},{"Name":"process","ID":"1921"},{"Name":"process","ID":"1936"},{"Name":"process","ID":"1953"},{"Name":"process","ID":"3166"},{"Name":"process","ID":"3186"},{"Name":"process","ID":"3208"},{"Name":"process","ID":"3228"},{"Name":"process","ID":"3242"},{"Name":"process","ID":"3264"},{"Name":"process","ID":"3391"},{"Name":"process","ID":"3411"},{"Name":"process","ID":"3438"},{"Name":"process","ID":"3459"},{"Name":"process","ID":"3529"},{"Name":"process","ID":"3551"},{"Name":"process","ID":"11504"},{"Name":"process","ID":"16206"},{"Name":"process","ID":"16211"},{"Name":"process","ID":"16220"},{"Name":"process","ID":"16229"},{"Name":"process","ID":"16233"},{"Name":"process","ID":"16251"},{"Name":"process","ID":"16314"},{"Name":"process","ID":"16317"},{"Name":"process","ID":"55460"},{"Name":"process","ID":"57503"},{"Name":"process","ID":"57741"},{"Name":"process","ID":"57742"},{"Name":"process","ID":"61098"},{"Name":"process","ID":"61100"},{"Name":"process","ID":"61104"},{"Name":"process","ID":"61111"},{"Name":"process","ID":"61113"},{"Name":"process","ID":"61116"},{"Name":"process","ID":"61117"},{"Name":"process","ID":"61118"},{"Name":"process","ID":"61188"}]}}},{"Resource":"user","ID":"user/0/root","Fields":{"gid":{"type":"\u0005","value":0},"name":{"type":"\u0007","value":"root"},"uid":{"type":"\u0005","value":0}}}]}]} \ No newline at end of file diff --git a/providers-sdk/v1/testutils/testutils.go b/providers-sdk/v1/testutils/testutils.go index 553e151f8d..f9cd82109d 100644 --- a/providers-sdk/v1/testutils/testutils.go +++ b/providers-sdk/v1/testutils/testutils.go @@ -16,21 +16,21 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/logger" - "go.mondoo.com/cnquery/v9/mql" - "go.mondoo.com/cnquery/v9/mqlc" - "go.mondoo.com/cnquery/v9/providers" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/lr" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/lr/docs" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/resources" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/testutils/mockprovider" - networkconf "go.mondoo.com/cnquery/v9/providers/network/config" - networkprovider "go.mondoo.com/cnquery/v9/providers/network/provider" - osconf "go.mondoo.com/cnquery/v9/providers/os/config" - osprovider "go.mondoo.com/cnquery/v9/providers/os/provider" + "go.mondoo.com/cnquery/v10" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/logger" + "go.mondoo.com/cnquery/v10/mql" + "go.mondoo.com/cnquery/v10/mqlc" + "go.mondoo.com/cnquery/v10/providers" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/lr" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/lr/docs" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/resources" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/testutils/mockprovider" + networkconf "go.mondoo.com/cnquery/v10/providers/network/config" + networkprovider "go.mondoo.com/cnquery/v10/providers/network/provider" + osconf "go.mondoo.com/cnquery/v10/providers/os/config" + osprovider "go.mondoo.com/cnquery/v10/providers/os/provider" "sigs.k8s.io/yaml" ) diff --git a/providers-sdk/v1/upstream/gql/client.go b/providers-sdk/v1/upstream/gql/client.go index f03a0d317c..bcbeeb802a 100644 --- a/providers-sdk/v1/upstream/gql/client.go +++ b/providers-sdk/v1/upstream/gql/client.go @@ -7,7 +7,7 @@ import ( "encoding/json" "net/http" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream" mondoogql "go.mondoo.com/mondoo-go" "go.mondoo.com/mondoo-go/option" ) diff --git a/providers-sdk/v1/upstream/gql/conversion.go b/providers-sdk/v1/upstream/gql/conversion.go index bd69971749..7a17fefde7 100644 --- a/providers-sdk/v1/upstream/gql/conversion.go +++ b/providers-sdk/v1/upstream/gql/conversion.go @@ -3,7 +3,7 @@ package gql -import "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream/mvd" +import "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream/mvd" func ConvertToMvdVulnReport(vulnReport *VulnReport) *mvd.VulnReport { if vulnReport == nil { diff --git a/providers-sdk/v1/upstream/health/errors.go b/providers-sdk/v1/upstream/health/errors.go index e8705eb4d2..9a65a3b935 100644 --- a/providers-sdk/v1/upstream/health/errors.go +++ b/providers-sdk/v1/upstream/health/errors.go @@ -7,8 +7,8 @@ import ( "context" "fmt" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/cli/config" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream" + "go.mondoo.com/cnquery/v10/cli/config" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream" "go.mondoo.com/ranger-rpc" "runtime/debug" ) diff --git a/providers-sdk/v1/upstream/health/health.proto b/providers-sdk/v1/upstream/health/health.proto index bf85dc0fbf..553cca8da1 100644 --- a/providers-sdk/v1/upstream/health/health.proto +++ b/providers-sdk/v1/upstream/health/health.proto @@ -19,7 +19,7 @@ syntax = "proto3"; package mondoo.cnquery.health.v1; -option go_package = "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream/health"; +option go_package = "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream/health"; service Health { rpc Check(HealthCheckRequest) returns (HealthCheckResponse); diff --git a/providers-sdk/v1/upstream/mvd/cvss/cvss.proto b/providers-sdk/v1/upstream/mvd/cvss/cvss.proto index e83184b78a..5f35ac5979 100644 --- a/providers-sdk/v1/upstream/mvd/cvss/cvss.proto +++ b/providers-sdk/v1/upstream/mvd/cvss/cvss.proto @@ -6,7 +6,7 @@ syntax = "proto3"; package mondoo.mvd.cvss.v1; option go_package = - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream/mvd/cvss"; + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream/mvd/cvss"; message Cvss { string vector = 1; diff --git a/providers-sdk/v1/upstream/mvd/mvd.go b/providers-sdk/v1/upstream/mvd/mvd.go index 4dfded1e6a..e4ab2d0afb 100644 --- a/providers-sdk/v1/upstream/mvd/mvd.go +++ b/providers-sdk/v1/upstream/mvd/mvd.go @@ -3,7 +3,7 @@ package mvd -import "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" +import "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" //go:generate protoc --proto_path=../../../../:../:. --go_out=. --go_opt=paths=source_relative --rangerrpc_out=. mvd.proto diff --git a/providers-sdk/v1/upstream/mvd/mvd.pb.go b/providers-sdk/v1/upstream/mvd/mvd.pb.go index 6250d1286f..b40e8bfbd7 100644 --- a/providers-sdk/v1/upstream/mvd/mvd.pb.go +++ b/providers-sdk/v1/upstream/mvd/mvd.pb.go @@ -10,7 +10,7 @@ package mvd import ( - cvss "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream/mvd/cvss" + cvss "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream/mvd/cvss" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" diff --git a/providers-sdk/v1/upstream/mvd/mvd.proto b/providers-sdk/v1/upstream/mvd/mvd.proto index ccb3738149..b4e911ed6b 100644 --- a/providers-sdk/v1/upstream/mvd/mvd.proto +++ b/providers-sdk/v1/upstream/mvd/mvd.proto @@ -8,7 +8,7 @@ package mondoo.mvd.v1; import "providers-sdk/v1/upstream/mvd/cvss/cvss.proto"; option go_package = - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream/mvd"; + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream/mvd"; message Platform { string name = 1; diff --git a/providers-sdk/v1/upstream/sts.go b/providers-sdk/v1/upstream/sts.go index d07a78b2b5..1a95d48bb5 100644 --- a/providers-sdk/v1/upstream/sts.go +++ b/providers-sdk/v1/upstream/sts.go @@ -11,7 +11,7 @@ import ( "net/url" "time" - "go.mondoo.com/cnquery/v9/providers/os/connection/ssh/signers" + "go.mondoo.com/cnquery/v10/providers/os/connection/ssh/signers" "go.mondoo.com/ranger-rpc" "golang.org/x/crypto/ssh" ) diff --git a/providers-sdk/v1/upstream/upstream.go b/providers-sdk/v1/upstream/upstream.go index 256265bba5..dd46f89f26 100644 --- a/providers-sdk/v1/upstream/upstream.go +++ b/providers-sdk/v1/upstream/upstream.go @@ -9,7 +9,7 @@ import ( "net/url" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/utils/multierr" + "go.mondoo.com/cnquery/v10/utils/multierr" "go.mondoo.com/ranger-rpc" guard_cert_auth "go.mondoo.com/ranger-rpc/plugins/authentication/cert" "go.mondoo.com/ranger-rpc/plugins/rangerguard/crypto" diff --git a/providers-sdk/v1/upstream/upstream.proto b/providers-sdk/v1/upstream/upstream.proto index 9366c8136d..21f8b43f95 100644 --- a/providers-sdk/v1/upstream/upstream.proto +++ b/providers-sdk/v1/upstream/upstream.proto @@ -4,7 +4,7 @@ syntax = "proto3"; package mondoo.cnquery.upstream.v1; -option go_package = "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream"; +option go_package = "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream"; message UpstreamConfig { string asset_mrn = 1; diff --git a/providers-sdk/v1/util/configure/configure.go b/providers-sdk/v1/util/configure/configure.go index 8bf961af88..48b13a27eb 100644 --- a/providers-sdk/v1/util/configure/configure.go +++ b/providers-sdk/v1/util/configure/configure.go @@ -16,7 +16,7 @@ import ( "github.com/rs/zerolog" "github.com/rs/zerolog/log" "github.com/spf13/cobra" - "go.mondoo.com/cnquery/v9/logger" + "go.mondoo.com/cnquery/v10/logger" "sigs.k8s.io/yaml" ) @@ -74,8 +74,8 @@ func genBuiltinGo(conf ProvidersConf) ([]byte, error) { for _, provider := range conf.Builtin { // imports cannot contain dashes trimProvider := strings.Replace(provider, "-", "", -1) - imports += fmt.Sprintf("\t%sconf \"go.mondoo.com/cnquery/v9/providers/%s/config\"\n", trimProvider, provider) - imports += fmt.Sprintf("\t%s \"go.mondoo.com/cnquery/v9/providers/%s/provider\"\n", trimProvider, provider) + imports += fmt.Sprintf("\t%sconf \"go.mondoo.com/cnquery/v10/providers/%s/config\"\n", trimProvider, provider) + imports += fmt.Sprintf("\t%s \"go.mondoo.com/cnquery/v10/providers/%s/provider\"\n", trimProvider, provider) infos += fmt.Sprintf( "//go:embed %s.resources.json\n"+ "var %sInfo []byte\n", @@ -108,8 +108,8 @@ package providers import ( _ "embed" - // osconf "go.mondoo.com/cnquery/v9/providers/os/config" - // os "go.mondoo.com/cnquery/v9/providers/os/provider" + // osconf "go.mondoo.com/cnquery/v10/providers/os/config" + // os "go.mondoo.com/cnquery/v10/providers/os/provider" %s) // //go:embed os/resources/os.resources.json @@ -156,8 +156,8 @@ func buildProviders(providers []string) { } var ( - reBuiltinReplace = regexp.MustCompile(`replace go.mondoo.com/cnquery/v9/providers/.* => ./providers/.*`) - reBuiltinDep = regexp.MustCompile(`go.mondoo.com/cnquery/v9/providers/.*`) + reBuiltinReplace = regexp.MustCompile(`replace go.mondoo.com/cnquery/v10/providers/.* => ./providers/.*`) + reBuiltinDep = regexp.MustCompile(`go.mondoo.com/cnquery/v10/providers/.*`) ) func rewireDependencies(providers []string) { @@ -183,12 +183,12 @@ func rewireDependencies(providers []string) { } } // we don't care about the specific version for dev - deps += "\n\tgo.mondoo.com/cnquery/v9/providers/" + provider + " v0.0.0" - replace += "\nreplace go.mondoo.com/cnquery/v9/providers/" + provider + " => ./providers/" + provider + deps += "\n\tgo.mondoo.com/cnquery/v10/providers/" + provider + " v0.0.0" + replace += "\nreplace go.mondoo.com/cnquery/v10/providers/" + provider + " => ./providers/" + provider } if deps != "" { raws = strings.Replace(raws, "require (", "require ("+deps, 1) - raws = strings.Replace(raws, "module go.mondoo.com/cnquery/v9", "module go.mondoo.com/cnquery/v9\n"+replace, 1) + raws = strings.Replace(raws, "module go.mondoo.com/cnquery/v10", "module go.mondoo.com/cnquery/v10\n"+replace, 1) } err = os.WriteFile("go.mod", []byte(raws), 0o644) diff --git a/providers-sdk/v1/util/defaults/defaults.go b/providers-sdk/v1/util/defaults/defaults.go index 9052f0cf34..7a3e707a2a 100644 --- a/providers-sdk/v1/util/defaults/defaults.go +++ b/providers-sdk/v1/util/defaults/defaults.go @@ -17,8 +17,8 @@ import ( "github.com/rs/zerolog" "github.com/rs/zerolog/log" "github.com/spf13/cobra" - "go.mondoo.com/cnquery/v9/logger" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/logger" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" ) var rootCmd = &cobra.Command{ @@ -87,7 +87,7 @@ const template = `// Copyright (c) Mondoo, Inc. package providers -import "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" +import "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" // DefaultProviders are useful when working in air-gapped environments // to tell users what providers are used for common connections, when there diff --git a/providers-sdk/v1/util/version/version.go b/providers-sdk/v1/util/version/version.go index 37ba4fa5fb..e0f9f05e74 100644 --- a/providers-sdk/v1/util/version/version.go +++ b/providers-sdk/v1/util/version/version.go @@ -7,7 +7,7 @@ import ( "encoding/json" "errors" "fmt" - "go.mondoo.com/cnquery/v9/utils/stringx" + "go.mondoo.com/cnquery/v10/utils/stringx" "go/format" "os" "os/exec" @@ -25,9 +25,9 @@ import ( "github.com/rs/zerolog" "github.com/rs/zerolog/log" "github.com/spf13/cobra" - "go.mondoo.com/cnquery/v9/cli/components" - "go.mondoo.com/cnquery/v9/logger" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/cli/components" + "go.mondoo.com/cnquery/v10/logger" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" "golang.org/x/mod/modfile" ) diff --git a/providers-sdk/v1/vault/awsparameterstore/parameterstore.go b/providers-sdk/v1/vault/awsparameterstore/parameterstore.go index 9640ce4c6b..d995cc00a6 100644 --- a/providers-sdk/v1/vault/awsparameterstore/parameterstore.go +++ b/providers-sdk/v1/vault/awsparameterstore/parameterstore.go @@ -11,7 +11,7 @@ import ( "github.com/aws/aws-sdk-go-v2/service/ssm" "github.com/aws/aws-sdk-go/aws/arn" "github.com/cockroachdb/errors" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" ) var notImplemented = errors.New("not implemented") diff --git a/providers-sdk/v1/vault/awsparameterstore/parameterstore_test.go b/providers-sdk/v1/vault/awsparameterstore/parameterstore_test.go index c379df2b2a..1f868611c3 100644 --- a/providers-sdk/v1/vault/awsparameterstore/parameterstore_test.go +++ b/providers-sdk/v1/vault/awsparameterstore/parameterstore_test.go @@ -14,7 +14,7 @@ import ( "github.com/aws/aws-sdk-go-v2/config" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" ) func TestAwsParameterStore(t *testing.T) { diff --git a/providers-sdk/v1/vault/awssecretsmanager/secretsmanager.go b/providers-sdk/v1/vault/awssecretsmanager/secretsmanager.go index 37d0a15443..36aaeef61e 100644 --- a/providers-sdk/v1/vault/awssecretsmanager/secretsmanager.go +++ b/providers-sdk/v1/vault/awssecretsmanager/secretsmanager.go @@ -10,7 +10,7 @@ import ( "github.com/aws/aws-sdk-go-v2/service/secretsmanager" "github.com/aws/aws-sdk-go/aws/arn" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" ) type Option func(*Vault) diff --git a/providers-sdk/v1/vault/awssecretsmanager/secretsmanager_test.go b/providers-sdk/v1/vault/awssecretsmanager/secretsmanager_test.go index d9a80848c0..a48ad60050 100644 --- a/providers-sdk/v1/vault/awssecretsmanager/secretsmanager_test.go +++ b/providers-sdk/v1/vault/awssecretsmanager/secretsmanager_test.go @@ -13,7 +13,7 @@ import ( "github.com/aws/aws-sdk-go-v2/config" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" ) func TestAwsSecretsManager(t *testing.T) { diff --git a/providers-sdk/v1/vault/cache/cached_vault.go b/providers-sdk/v1/vault/cache/cached_vault.go index b9fadc5b90..06e319b2d8 100644 --- a/providers-sdk/v1/vault/cache/cached_vault.go +++ b/providers-sdk/v1/vault/cache/cached_vault.go @@ -6,7 +6,7 @@ package cache import ( "context" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" ) type cachedVault struct { diff --git a/providers-sdk/v1/vault/config/vaultconfigstore.go b/providers-sdk/v1/vault/config/vaultconfigstore.go index 128f0dd9ec..64218f4b8e 100644 --- a/providers-sdk/v1/vault/config/vaultconfigstore.go +++ b/providers-sdk/v1/vault/config/vaultconfigstore.go @@ -10,14 +10,14 @@ import ( "github.com/aws/aws-sdk-go-v2/config" "github.com/cockroachdb/errors" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault/awsparameterstore" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault/awssecretsmanager" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault/gcpberglas" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault/gcpsecretmanager" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault/hashivault" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault/inmemory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault/keyring" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault/awsparameterstore" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault/awssecretsmanager" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault/gcpberglas" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault/gcpsecretmanager" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault/hashivault" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault/inmemory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault/keyring" ) func New(vCfg *vault.VaultConfiguration) (vault.Vault, error) { diff --git a/providers-sdk/v1/vault/config/vaultconfigstore_test.go b/providers-sdk/v1/vault/config/vaultconfigstore_test.go index d02cfde6f6..24a667ac9b 100644 --- a/providers-sdk/v1/vault/config/vaultconfigstore_test.go +++ b/providers-sdk/v1/vault/config/vaultconfigstore_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" ) func TestVaultConfiguration(t *testing.T) { diff --git a/providers-sdk/v1/vault/credentials_resolver/credentials_resolver.go b/providers-sdk/v1/vault/credentials_resolver/credentials_resolver.go index 6dbc55a131..74eb214a41 100644 --- a/providers-sdk/v1/vault/credentials_resolver/credentials_resolver.go +++ b/providers-sdk/v1/vault/credentials_resolver/credentials_resolver.go @@ -8,8 +8,8 @@ import ( "errors" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault/cache" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault/cache" ) type resolver struct { diff --git a/providers-sdk/v1/vault/gcpberglas/berglas.go b/providers-sdk/v1/vault/gcpberglas/berglas.go index abf9308cc7..9c505a687e 100644 --- a/providers-sdk/v1/vault/gcpberglas/berglas.go +++ b/providers-sdk/v1/vault/gcpberglas/berglas.go @@ -10,8 +10,8 @@ import ( "strings" berglas "github.com/GoogleCloudPlatform/berglas/pkg/berglas" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" - "go.mondoo.com/cnquery/v9/utils/multierr" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/utils/multierr" ) type storageType string diff --git a/providers-sdk/v1/vault/gcpberglas/berglas_test.go b/providers-sdk/v1/vault/gcpberglas/berglas_test.go index 839f7509ea..8e282419f1 100644 --- a/providers-sdk/v1/vault/gcpberglas/berglas_test.go +++ b/providers-sdk/v1/vault/gcpberglas/berglas_test.go @@ -13,7 +13,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" ) func TestGcpBerglas(t *testing.T) { diff --git a/providers-sdk/v1/vault/gcpsecretmanager/secretmanager.go b/providers-sdk/v1/vault/gcpsecretmanager/secretmanager.go index b25a6b8e48..766818e961 100644 --- a/providers-sdk/v1/vault/gcpsecretmanager/secretmanager.go +++ b/providers-sdk/v1/vault/gcpsecretmanager/secretmanager.go @@ -10,8 +10,8 @@ import ( "strings" secretmanager "cloud.google.com/go/secretmanager/apiv1" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" - "go.mondoo.com/cnquery/v9/utils/multierr" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/utils/multierr" secretmanagerpb "google.golang.org/genproto/googleapis/cloud/secretmanager/v1" ) diff --git a/providers-sdk/v1/vault/gcpsecretmanager/secretmanager_test.go b/providers-sdk/v1/vault/gcpsecretmanager/secretmanager_test.go index 5f6f7d1ad8..fc360f045d 100644 --- a/providers-sdk/v1/vault/gcpsecretmanager/secretmanager_test.go +++ b/providers-sdk/v1/vault/gcpsecretmanager/secretmanager_test.go @@ -13,7 +13,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" ) func TestGcpSecretmanager(t *testing.T) { diff --git a/providers-sdk/v1/vault/hashivault/hashivault.go b/providers-sdk/v1/vault/hashivault/hashivault.go index 0adfe8b2b8..f525ad72d9 100644 --- a/providers-sdk/v1/vault/hashivault/hashivault.go +++ b/providers-sdk/v1/vault/hashivault/hashivault.go @@ -12,7 +12,7 @@ import ( "github.com/hashicorp/vault/api" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" ) var notImplemented = errors.New("not implemented") diff --git a/providers-sdk/v1/vault/hashivault/hashivault_test.go b/providers-sdk/v1/vault/hashivault/hashivault_test.go index 69cf273084..bf3faf4d51 100644 --- a/providers-sdk/v1/vault/hashivault/hashivault_test.go +++ b/providers-sdk/v1/vault/hashivault/hashivault_test.go @@ -14,7 +14,7 @@ import ( "github.com/hashicorp/vault/api" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" ) func TestHashiVault(t *testing.T) { diff --git a/providers-sdk/v1/vault/inmemory/inmemory.go b/providers-sdk/v1/vault/inmemory/inmemory.go index 85b29fd3eb..0a8cba1640 100644 --- a/providers-sdk/v1/vault/inmemory/inmemory.go +++ b/providers-sdk/v1/vault/inmemory/inmemory.go @@ -7,7 +7,7 @@ import ( "context" "errors" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" ) type Option func(*inmemoryVault) diff --git a/providers-sdk/v1/vault/inmemory/inmemory_test.go b/providers-sdk/v1/vault/inmemory/inmemory_test.go index 96a87c64d6..1ed0801225 100644 --- a/providers-sdk/v1/vault/inmemory/inmemory_test.go +++ b/providers-sdk/v1/vault/inmemory/inmemory_test.go @@ -10,7 +10,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" ) func TestVault(t *testing.T) { diff --git a/providers-sdk/v1/vault/keyring/keyring.go b/providers-sdk/v1/vault/keyring/keyring.go index 29e09a8797..67cd460978 100644 --- a/providers-sdk/v1/vault/keyring/keyring.go +++ b/providers-sdk/v1/vault/keyring/keyring.go @@ -9,7 +9,7 @@ import ( "github.com/99designs/keyring" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" ) var notImplemented = errors.New("not implemented") diff --git a/providers-sdk/v1/vault/keyring/keyring_test.go b/providers-sdk/v1/vault/keyring/keyring_test.go index b85ca1b8e3..d6c7aa7a5a 100644 --- a/providers-sdk/v1/vault/keyring/keyring_test.go +++ b/providers-sdk/v1/vault/keyring/keyring_test.go @@ -10,7 +10,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" ) func TestEncryptedFile(t *testing.T) { diff --git a/providers-sdk/v1/vault/mock/mock_vault.go b/providers-sdk/v1/vault/mock/mock_vault.go index ffe171a44c..61affc1ed5 100644 --- a/providers-sdk/v1/vault/mock/mock_vault.go +++ b/providers-sdk/v1/vault/mock/mock_vault.go @@ -8,7 +8,7 @@ import ( "github.com/cockroachdb/errors" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" ) var notImplemented = errors.New("not implemented") diff --git a/providers-sdk/v1/vault/multivault/multivault.go b/providers-sdk/v1/vault/multivault/multivault.go index 73fc21c07f..9eed9c3252 100644 --- a/providers-sdk/v1/vault/multivault/multivault.go +++ b/providers-sdk/v1/vault/multivault/multivault.go @@ -7,7 +7,7 @@ import ( "context" "errors" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" "go.mondoo.com/ranger-rpc/codes" "go.mondoo.com/ranger-rpc/status" ) diff --git a/providers-sdk/v1/vault/multivault/multivault_test.go b/providers-sdk/v1/vault/multivault/multivault_test.go index b720cbee89..0bc0e76144 100644 --- a/providers-sdk/v1/vault/multivault/multivault_test.go +++ b/providers-sdk/v1/vault/multivault/multivault_test.go @@ -9,8 +9,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault/inmemory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault/inmemory" ) func TestMultiVault(t *testing.T) { diff --git a/providers-sdk/v1/vault/vault.proto b/providers-sdk/v1/vault/vault.proto index e56b9b4439..f8af7b8018 100644 --- a/providers-sdk/v1/vault/vault.proto +++ b/providers-sdk/v1/vault/vault.proto @@ -4,7 +4,7 @@ syntax = "proto3"; package cnquery.providers.v1; -option go_package = "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault"; +option go_package = "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault"; message SecretID { string key = 1; diff --git a/providers/arista/config/config.go b/providers/arista/config/config.go index 13e2fe95bf..52787c2a22 100644 --- a/providers/arista/config/config.go +++ b/providers/arista/config/config.go @@ -4,8 +4,8 @@ package config import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/arista/provider" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/arista/provider" ) var Config = plugin.Provider{ diff --git a/providers/arista/connection/connection.go b/providers/arista/connection/connection.go index 700fb51b4a..f3b38b6b8c 100644 --- a/providers/arista/connection/connection.go +++ b/providers/arista/connection/connection.go @@ -7,8 +7,8 @@ import ( "errors" "github.com/aristanetworks/goeapi" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" ) type AristaConnection struct { diff --git a/providers/arista/gen/main.go b/providers/arista/gen/main.go index 1535add2e1..3a804ec938 100644 --- a/providers/arista/gen/main.go +++ b/providers/arista/gen/main.go @@ -4,8 +4,8 @@ package main import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin/gen" - "go.mondoo.com/cnquery/v9/providers/arista/config" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin/gen" + "go.mondoo.com/cnquery/v10/providers/arista/config" ) func main() { diff --git a/providers/arista/go.mod b/providers/arista/go.mod index c0b7828d66..11f53e14c5 100644 --- a/providers/arista/go.mod +++ b/providers/arista/go.mod @@ -1,6 +1,6 @@ -module go.mondoo.com/cnquery/v9/providers/arista +module go.mondoo.com/cnquery/v10/providers/arista -replace go.mondoo.com/cnquery/v9 => ../.. +replace go.mondoo.com/cnquery/v10 => ../.. go 1.21 @@ -9,7 +9,7 @@ toolchain go1.21.3 require ( github.com/aristanetworks/goeapi v1.0.0 github.com/stretchr/testify v1.8.4 - go.mondoo.com/cnquery/v9 v9.14.0 + go.mondoo.com/cnquery/v10 v10.0.0 ) require ( diff --git a/providers/arista/main.go b/providers/arista/main.go index 46de2b887f..10a6fa3c07 100644 --- a/providers/arista/main.go +++ b/providers/arista/main.go @@ -6,8 +6,8 @@ package main import ( "os" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/arista/provider" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/arista/provider" ) func main() { diff --git a/providers/arista/provider/provider.go b/providers/arista/provider/provider.go index 55b449c017..b50b62eddc 100644 --- a/providers/arista/provider/provider.go +++ b/providers/arista/provider/provider.go @@ -9,14 +9,14 @@ import ( "strconv" "strings" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" - "go.mondoo.com/cnquery/v9/providers/arista/connection" - "go.mondoo.com/cnquery/v9/providers/arista/resources" - "go.mondoo.com/cnquery/v9/providers/arista/resources/eos" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers/arista/connection" + "go.mondoo.com/cnquery/v10/providers/arista/resources" + "go.mondoo.com/cnquery/v10/providers/arista/resources/eos" ) const ( diff --git a/providers/arista/resources/arista.lr b/providers/arista/resources/arista.lr index 42ab64eb51..25c26b5cc0 100644 --- a/providers/arista/resources/arista.lr +++ b/providers/arista/resources/arista.lr @@ -2,7 +2,7 @@ // SPDX-License-Identifier: BUSL-1.1 option provider = "go.mondoo.com/cnquery/providers/arista" -option go_package = "go.mondoo.com/cnquery/v9/providers/arista/resources" +option go_package = "go.mondoo.com/cnquery/v10/providers/arista/resources" // Arista EOS resource arista.eos { diff --git a/providers/arista/resources/arista.lr.go b/providers/arista/resources/arista.lr.go index 3ef4e51648..4bf121d476 100644 --- a/providers/arista/resources/arista.lr.go +++ b/providers/arista/resources/arista.lr.go @@ -8,9 +8,9 @@ package resources import ( "errors" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/types" ) var resourceFactories map[string]plugin.ResourceFactory diff --git a/providers/arista/resources/arista_eos.go b/providers/arista/resources/arista_eos.go index bad8ec9a55..b867aefe1d 100644 --- a/providers/arista/resources/arista_eos.go +++ b/providers/arista/resources/arista_eos.go @@ -7,12 +7,12 @@ import ( "regexp" "strings" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/arista/connection" - "go.mondoo.com/cnquery/v9/providers/arista/resources/eos" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/arista/connection" + "go.mondoo.com/cnquery/v10/providers/arista/resources/eos" + "go.mondoo.com/cnquery/v10/types" ) func aristaClient(runtime *plugin.Runtime) *eos.Eos { diff --git a/providers/assets.go b/providers/assets.go index 19763efa18..e1198e1efc 100644 --- a/providers/assets.go +++ b/providers/assets.go @@ -6,11 +6,11 @@ package providers import ( "github.com/cockroachdb/errors" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/cli/config" - "go.mondoo.com/cnquery/v9/logger" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - pp "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream" + "go.mondoo.com/cnquery/v10/cli/config" + "go.mondoo.com/cnquery/v10/logger" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + pp "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream" ) func ProcessAssetCandidates(runtime *Runtime, connectRes *pp.ConnectRes, upstreamConfig *upstream.UpstreamConfig, platformID string) ([]*inventory.Asset, error) { diff --git a/providers/atlassian/config/config.go b/providers/atlassian/config/config.go index 50b5083558..a29a363cf7 100644 --- a/providers/atlassian/config/config.go +++ b/providers/atlassian/config/config.go @@ -4,8 +4,8 @@ package config import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/atlassian/provider" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/atlassian/provider" ) var Config = plugin.Provider{ diff --git a/providers/atlassian/connection/admin/connection.go b/providers/atlassian/connection/admin/connection.go index fecf21dc2d..018360858d 100644 --- a/providers/atlassian/connection/admin/connection.go +++ b/providers/atlassian/connection/admin/connection.go @@ -9,8 +9,8 @@ import ( "os" "github.com/ctreminiom/go-atlassian/admin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/atlassian/connection/shared" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/atlassian/connection/shared" ) const ( diff --git a/providers/atlassian/connection/admin/platform.go b/providers/atlassian/connection/admin/platform.go index 9f1fd9379c..a22ce65906 100644 --- a/providers/atlassian/connection/admin/platform.go +++ b/providers/atlassian/connection/admin/platform.go @@ -4,7 +4,7 @@ package admin import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" ) func (a *AdminConnection) PlatformInfo() *inventory.Platform { diff --git a/providers/atlassian/connection/confluence/connection.go b/providers/atlassian/connection/confluence/connection.go index 15e434a945..25eab96ac8 100644 --- a/providers/atlassian/connection/confluence/connection.go +++ b/providers/atlassian/connection/confluence/connection.go @@ -9,8 +9,8 @@ import ( "os" "github.com/ctreminiom/go-atlassian/confluence" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/atlassian/connection/shared" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/atlassian/connection/shared" ) const ( diff --git a/providers/atlassian/connection/confluence/platform.go b/providers/atlassian/connection/confluence/platform.go index 8004b74432..807dec9911 100644 --- a/providers/atlassian/connection/confluence/platform.go +++ b/providers/atlassian/connection/confluence/platform.go @@ -6,7 +6,7 @@ package confluence import ( "strings" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" ) func (a *ConfluenceConnection) PlatformInfo() *inventory.Platform { diff --git a/providers/atlassian/connection/connection.go b/providers/atlassian/connection/connection.go index d7b423cd52..e7e9c915a5 100644 --- a/providers/atlassian/connection/connection.go +++ b/providers/atlassian/connection/connection.go @@ -5,12 +5,12 @@ package connection import ( "github.com/pkg/errors" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/atlassian/connection/admin" - "go.mondoo.com/cnquery/v9/providers/atlassian/connection/confluence" - "go.mondoo.com/cnquery/v9/providers/atlassian/connection/jira" - "go.mondoo.com/cnquery/v9/providers/atlassian/connection/scim" - "go.mondoo.com/cnquery/v9/providers/atlassian/connection/shared" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/atlassian/connection/admin" + "go.mondoo.com/cnquery/v10/providers/atlassian/connection/confluence" + "go.mondoo.com/cnquery/v10/providers/atlassian/connection/jira" + "go.mondoo.com/cnquery/v10/providers/atlassian/connection/scim" + "go.mondoo.com/cnquery/v10/providers/atlassian/connection/shared" ) const ( diff --git a/providers/atlassian/connection/jira/connection.go b/providers/atlassian/connection/jira/connection.go index 72559785e4..0dc40e0758 100644 --- a/providers/atlassian/connection/jira/connection.go +++ b/providers/atlassian/connection/jira/connection.go @@ -9,8 +9,8 @@ import ( "os" v2 "github.com/ctreminiom/go-atlassian/jira/v2" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/atlassian/connection/shared" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/atlassian/connection/shared" ) const ( diff --git a/providers/atlassian/connection/jira/platform.go b/providers/atlassian/connection/jira/platform.go index bd46dc827e..71f2541335 100644 --- a/providers/atlassian/connection/jira/platform.go +++ b/providers/atlassian/connection/jira/platform.go @@ -6,7 +6,7 @@ package jira import ( "strings" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" ) func (a *JiraConnection) PlatformInfo() *inventory.Platform { diff --git a/providers/atlassian/connection/scim/connection.go b/providers/atlassian/connection/scim/connection.go index dfe80bce1e..bb6d1bfb4f 100644 --- a/providers/atlassian/connection/scim/connection.go +++ b/providers/atlassian/connection/scim/connection.go @@ -10,8 +10,8 @@ import ( "os" "github.com/ctreminiom/go-atlassian/admin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/atlassian/connection/shared" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/atlassian/connection/shared" ) const ( diff --git a/providers/atlassian/connection/scim/platform.go b/providers/atlassian/connection/scim/platform.go index 343a19fa87..f70c8c1dee 100644 --- a/providers/atlassian/connection/scim/platform.go +++ b/providers/atlassian/connection/scim/platform.go @@ -4,7 +4,7 @@ package scim import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" ) func (a *ScimConnection) PlatformInfo() *inventory.Platform { diff --git a/providers/atlassian/connection/shared/shared.go b/providers/atlassian/connection/shared/shared.go index 1c8945f336..874bfbe8d9 100644 --- a/providers/atlassian/connection/shared/shared.go +++ b/providers/atlassian/connection/shared/shared.go @@ -4,7 +4,7 @@ package shared import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" ) type ConnectionType string diff --git a/providers/atlassian/gen/main.go b/providers/atlassian/gen/main.go index 706d378668..f85b1faf7f 100644 --- a/providers/atlassian/gen/main.go +++ b/providers/atlassian/gen/main.go @@ -4,8 +4,8 @@ package main import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin/gen" - "go.mondoo.com/cnquery/v9/providers/atlassian/config" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin/gen" + "go.mondoo.com/cnquery/v10/providers/atlassian/config" ) func main() { diff --git a/providers/atlassian/go.mod b/providers/atlassian/go.mod index 050681b73d..4568529e09 100644 --- a/providers/atlassian/go.mod +++ b/providers/atlassian/go.mod @@ -1,6 +1,6 @@ -module go.mondoo.com/cnquery/v9/providers/atlassian +module go.mondoo.com/cnquery/v10/providers/atlassian -replace go.mondoo.com/cnquery/v9 => ../.. +replace go.mondoo.com/cnquery/v10 => ../.. go 1.21 @@ -9,7 +9,7 @@ toolchain go1.21.3 require ( github.com/ctreminiom/go-atlassian v1.5.1 github.com/pkg/errors v0.9.1 - go.mondoo.com/cnquery/v9 v9.14.0 + go.mondoo.com/cnquery/v10 v10.0.0 ) require ( diff --git a/providers/atlassian/main.go b/providers/atlassian/main.go index 73912139f1..d8b3034946 100644 --- a/providers/atlassian/main.go +++ b/providers/atlassian/main.go @@ -6,8 +6,8 @@ package main import ( "os" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/atlassian/provider" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/atlassian/provider" ) func main() { diff --git a/providers/atlassian/provider/provider.go b/providers/atlassian/provider/provider.go index 90f5e2fb82..23e0c3c1b0 100644 --- a/providers/atlassian/provider/provider.go +++ b/providers/atlassian/provider/provider.go @@ -7,13 +7,13 @@ import ( "errors" "strconv" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream" - "go.mondoo.com/cnquery/v9/providers/atlassian/connection" - "go.mondoo.com/cnquery/v9/providers/atlassian/connection/shared" - "go.mondoo.com/cnquery/v9/providers/atlassian/resources" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream" + "go.mondoo.com/cnquery/v10/providers/atlassian/connection" + "go.mondoo.com/cnquery/v10/providers/atlassian/connection/shared" + "go.mondoo.com/cnquery/v10/providers/atlassian/resources" ) const ( diff --git a/providers/atlassian/resources/atlassian.lr.go b/providers/atlassian/resources/atlassian.lr.go index ac77cff973..2d43b5d011 100644 --- a/providers/atlassian/resources/atlassian.lr.go +++ b/providers/atlassian/resources/atlassian.lr.go @@ -9,9 +9,9 @@ import ( "errors" "time" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/types" ) var resourceFactories map[string]plugin.ResourceFactory diff --git a/providers/atlassian/resources/atlassian_admin.go b/providers/atlassian/resources/atlassian_admin.go index 22dfc839ac..aed7fe8b69 100644 --- a/providers/atlassian/resources/atlassian_admin.go +++ b/providers/atlassian/resources/atlassian_admin.go @@ -6,13 +6,13 @@ package resources import ( "context" "errors" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/types" "time" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/atlassian/connection/admin" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/atlassian/connection/admin" ) func initAtlassianAdminOrganization(runtime *plugin.Runtime, args map[string]*llx.RawData) (map[string]*llx.RawData, plugin.Resource, error) { diff --git a/providers/atlassian/resources/atlassian_confluence.go b/providers/atlassian/resources/atlassian_confluence.go index c39d8e08cc..b8b00369ce 100644 --- a/providers/atlassian/resources/atlassian_confluence.go +++ b/providers/atlassian/resources/atlassian_confluence.go @@ -7,8 +7,8 @@ import ( "context" "errors" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers/atlassian/connection/confluence" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers/atlassian/connection/confluence" ) func (a *mqlAtlassianConfluence) id() (string, error) { diff --git a/providers/atlassian/resources/atlassian_jira.go b/providers/atlassian/resources/atlassian_jira.go index f99e399609..801caa4096 100644 --- a/providers/atlassian/resources/atlassian_jira.go +++ b/providers/atlassian/resources/atlassian_jira.go @@ -8,8 +8,8 @@ import ( "errors" "fmt" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers/atlassian/connection/jira" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers/atlassian/connection/jira" ) func (a *mqlAtlassianJira) id() (string, error) { diff --git a/providers/atlassian/resources/atlassian_scim.go b/providers/atlassian/resources/atlassian_scim.go index 3adaef02eb..3a57220eb5 100644 --- a/providers/atlassian/resources/atlassian_scim.go +++ b/providers/atlassian/resources/atlassian_scim.go @@ -7,8 +7,8 @@ import ( "context" "errors" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers/atlassian/connection/scim" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers/atlassian/connection/scim" ) func (a *mqlAtlassianScim) id() (string, error) { diff --git a/providers/aws/config/config.go b/providers/aws/config/config.go index 55434f3e74..55a716d4da 100644 --- a/providers/aws/config/config.go +++ b/providers/aws/config/config.go @@ -4,10 +4,10 @@ package config import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/aws/connection/awsec2ebsconn" - "go.mondoo.com/cnquery/v9/providers/aws/provider" - "go.mondoo.com/cnquery/v9/providers/aws/resources" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/aws/connection/awsec2ebsconn" + "go.mondoo.com/cnquery/v10/providers/aws/provider" + "go.mondoo.com/cnquery/v10/providers/aws/resources" ) var Config = plugin.Provider{ diff --git a/providers/aws/connection/awsec2ebsconn/destroy.go b/providers/aws/connection/awsec2ebsconn/destroy.go index fe1ac067a3..05191a0e4b 100644 --- a/providers/aws/connection/awsec2ebsconn/destroy.go +++ b/providers/aws/connection/awsec2ebsconn/destroy.go @@ -11,7 +11,7 @@ import ( "github.com/aws/aws-sdk-go-v2/service/ec2/types" "github.com/aws/aws-sdk-go/aws" "github.com/rs/zerolog/log" - awsec2ebstypes "go.mondoo.com/cnquery/v9/providers/aws/connection/awsec2ebsconn/types" + awsec2ebstypes "go.mondoo.com/cnquery/v10/providers/aws/connection/awsec2ebsconn/types" ) func (c *AwsEbsConnection) DetachVolumeFromInstance(ctx context.Context, volume *awsec2ebstypes.VolumeInfo) error { diff --git a/providers/aws/connection/awsec2ebsconn/provider.go b/providers/aws/connection/awsec2ebsconn/provider.go index 4e14a0611a..2090c4854c 100644 --- a/providers/aws/connection/awsec2ebsconn/provider.go +++ b/providers/aws/connection/awsec2ebsconn/provider.go @@ -16,15 +16,15 @@ import ( "github.com/cockroachdb/errors" "github.com/rs/zerolog/log" "github.com/spf13/afero" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - awsec2ebstypes "go.mondoo.com/cnquery/v9/providers/aws/connection/awsec2ebsconn/types" - "go.mondoo.com/cnquery/v9/providers/os/connection/fs" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/connection/snapshot" - "go.mondoo.com/cnquery/v9/providers/os/detector" - "go.mondoo.com/cnquery/v9/providers/os/id/awsec2" - "go.mondoo.com/cnquery/v9/providers/os/id/ids" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + awsec2ebstypes "go.mondoo.com/cnquery/v10/providers/aws/connection/awsec2ebsconn/types" + "go.mondoo.com/cnquery/v10/providers/os/connection/fs" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/snapshot" + "go.mondoo.com/cnquery/v10/providers/os/detector" + "go.mondoo.com/cnquery/v10/providers/os/id/awsec2" + "go.mondoo.com/cnquery/v10/providers/os/id/ids" ) const ( diff --git a/providers/aws/connection/awsec2ebsconn/setup.go b/providers/aws/connection/awsec2ebsconn/setup.go index b1eb2546e2..4d98014388 100644 --- a/providers/aws/connection/awsec2ebsconn/setup.go +++ b/providers/aws/connection/awsec2ebsconn/setup.go @@ -15,7 +15,7 @@ import ( "github.com/aws/smithy-go" "github.com/cockroachdb/errors" "github.com/rs/zerolog/log" - awsec2ebstypes "go.mondoo.com/cnquery/v9/providers/aws/connection/awsec2ebsconn/types" + awsec2ebstypes "go.mondoo.com/cnquery/v10/providers/aws/connection/awsec2ebsconn/types" ) func (c *AwsEbsConnection) Validate(ctx context.Context) (*types.Instance, *awsec2ebstypes.VolumeInfo, *awsec2ebstypes.SnapshotId, error) { diff --git a/providers/aws/connection/connection.go b/providers/aws/connection/connection.go index 988e015823..9fbfae1277 100644 --- a/providers/aws/connection/connection.go +++ b/providers/aws/connection/connection.go @@ -15,8 +15,8 @@ import ( "github.com/aws/aws-sdk-go-v2/service/sts" "github.com/rs/zerolog/log" "github.com/spf13/afero" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) type AwsConnection struct { diff --git a/providers/aws/connection/platform.go b/providers/aws/connection/platform.go index 3e27d36c4b..a956b00b0f 100644 --- a/providers/aws/connection/platform.go +++ b/providers/aws/connection/platform.go @@ -3,7 +3,7 @@ package connection -import "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" +import "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" func (a *AwsConnection) PlatformInfo() *inventory.Platform { return GetPlatformForObject(a.PlatformOverride) diff --git a/providers/aws/gen/main.go b/providers/aws/gen/main.go index c940da12f7..f3b790ac84 100644 --- a/providers/aws/gen/main.go +++ b/providers/aws/gen/main.go @@ -4,8 +4,8 @@ package main import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin/gen" - "go.mondoo.com/cnquery/v9/providers/aws/config" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin/gen" + "go.mondoo.com/cnquery/v10/providers/aws/config" ) func main() { diff --git a/providers/aws/go.mod b/providers/aws/go.mod index 87a1bcec6c..7f512dcecd 100644 --- a/providers/aws/go.mod +++ b/providers/aws/go.mod @@ -1,6 +1,6 @@ -module go.mondoo.com/cnquery/v9/providers/aws +module go.mondoo.com/cnquery/v10/providers/aws -replace go.mondoo.com/cnquery/v9 => ../.. +replace go.mondoo.com/cnquery/v10 => ../.. go 1.21 @@ -59,7 +59,7 @@ require ( github.com/rs/zerolog v1.31.0 github.com/spf13/afero v1.11.0 github.com/stretchr/testify v1.8.4 - go.mondoo.com/cnquery/v9 v9.14.0 + go.mondoo.com/cnquery/v10 v10.0.0 k8s.io/client-go v0.29.0 ) diff --git a/providers/aws/main.go b/providers/aws/main.go index 5886b47f0e..15f7aa350c 100644 --- a/providers/aws/main.go +++ b/providers/aws/main.go @@ -6,8 +6,8 @@ package main import ( "os" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/aws/provider" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/aws/provider" ) func main() { diff --git a/providers/aws/provider/provider.go b/providers/aws/provider/provider.go index 9fa5dfe4db..284af0a057 100644 --- a/providers/aws/provider/provider.go +++ b/providers/aws/provider/provider.go @@ -8,14 +8,14 @@ import ( "strconv" "strings" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream" - "go.mondoo.com/cnquery/v9/providers/aws/connection" - "go.mondoo.com/cnquery/v9/providers/aws/connection/awsec2ebsconn" - "go.mondoo.com/cnquery/v9/providers/aws/resources" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream" + "go.mondoo.com/cnquery/v10/providers/aws/connection" + "go.mondoo.com/cnquery/v10/providers/aws/connection/awsec2ebsconn" + "go.mondoo.com/cnquery/v10/providers/aws/resources" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) const ( diff --git a/providers/aws/resources/aws.lr b/providers/aws/resources/aws.lr index dfd8507a08..cadbcba4f0 100644 --- a/providers/aws/resources/aws.lr +++ b/providers/aws/resources/aws.lr @@ -5,7 +5,7 @@ import "../../network/resources/network.lr" option provider = "go.mondoo.com/cnquery/providers/aws" -option go_package = "go.mondoo.com/cnquery/v9/providers/aws/resources" +option go_package = "go.mondoo.com/cnquery/v10/providers/aws/resources" // AWS resource aws @defaults("account.id") { diff --git a/providers/aws/resources/aws.lr.go b/providers/aws/resources/aws.lr.go index 328ad01d09..39c1fc05cf 100644 --- a/providers/aws/resources/aws.lr.go +++ b/providers/aws/resources/aws.lr.go @@ -9,9 +9,9 @@ import ( "errors" "time" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/types" ) var resourceFactories map[string]plugin.ResourceFactory diff --git a/providers/aws/resources/aws_accessanalyzer.go b/providers/aws/resources/aws_accessanalyzer.go index 1b5babb0e5..1f1e806574 100644 --- a/providers/aws/resources/aws_accessanalyzer.go +++ b/providers/aws/resources/aws_accessanalyzer.go @@ -10,10 +10,10 @@ import ( aatypes "github.com/aws/aws-sdk-go-v2/service/accessanalyzer/types" "github.com/aws/aws-sdk-go/aws" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/jobpool" - "go.mondoo.com/cnquery/v9/providers/aws/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/jobpool" + "go.mondoo.com/cnquery/v10/providers/aws/connection" + "go.mondoo.com/cnquery/v10/types" ) func (a *mqlAwsAccessanalyzerAnalyzer) id() (string, error) { diff --git a/providers/aws/resources/aws_account.go b/providers/aws/resources/aws_account.go index d51a689aec..425cf10603 100644 --- a/providers/aws/resources/aws_account.go +++ b/providers/aws/resources/aws_account.go @@ -9,8 +9,8 @@ import ( "github.com/aws/aws-sdk-go-v2/service/iam" "github.com/aws/aws-sdk-go-v2/service/organizations" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers/aws/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers/aws/connection" ) func (a *mqlAwsAccount) id() (string, error) { diff --git a/providers/aws/resources/aws_acm.go b/providers/aws/resources/aws_acm.go index 62ff1e25c7..3d00d6d1ab 100644 --- a/providers/aws/resources/aws_acm.go +++ b/providers/aws/resources/aws_acm.go @@ -11,12 +11,12 @@ import ( acmtypes "github.com/aws/aws-sdk-go-v2/service/acm/types" "github.com/aws/aws-sdk-go/aws" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/jobpool" - "go.mondoo.com/cnquery/v9/providers/aws/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/jobpool" + "go.mondoo.com/cnquery/v10/providers/aws/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/types" ) func (a *mqlAwsAcm) id() (string, error) { diff --git a/providers/aws/resources/aws_apigateway.go b/providers/aws/resources/aws_apigateway.go index b370f7438e..dd6bad150b 100644 --- a/providers/aws/resources/aws_apigateway.go +++ b/providers/aws/resources/aws_apigateway.go @@ -10,13 +10,13 @@ import ( "github.com/aws/aws-sdk-go-v2/service/apigateway" "github.com/cockroachdb/errors" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/jobpool" - "go.mondoo.com/cnquery/v9/providers/aws/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/jobpool" + "go.mondoo.com/cnquery/v10/providers/aws/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/types" ) func (a *mqlAwsApigateway) id() (string, error) { diff --git a/providers/aws/resources/aws_applicationautoscaling.go b/providers/aws/resources/aws_applicationautoscaling.go index 8ee2604958..f7e2847c93 100644 --- a/providers/aws/resources/aws_applicationautoscaling.go +++ b/providers/aws/resources/aws_applicationautoscaling.go @@ -12,12 +12,12 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/cockroachdb/errors" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/types" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/jobpool" - "go.mondoo.com/cnquery/v9/providers/aws/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/jobpool" + "go.mondoo.com/cnquery/v10/providers/aws/connection" ) func (a *mqlAwsApplicationAutoscaling) id() (string, error) { diff --git a/providers/aws/resources/aws_autoscaling.go b/providers/aws/resources/aws_autoscaling.go index 23b93a133c..de57f828f4 100644 --- a/providers/aws/resources/aws_autoscaling.go +++ b/providers/aws/resources/aws_autoscaling.go @@ -10,11 +10,11 @@ import ( ec2types "github.com/aws/aws-sdk-go-v2/service/autoscaling/types" "github.com/aws/aws-sdk-go/aws" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/jobpool" - "go.mondoo.com/cnquery/v9/providers/aws/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/jobpool" + "go.mondoo.com/cnquery/v10/providers/aws/connection" + "go.mondoo.com/cnquery/v10/types" ) func (a *mqlAwsAutoscaling) id() (string, error) { diff --git a/providers/aws/resources/aws_backups.go b/providers/aws/resources/aws_backups.go index c06e8e7b09..a8e6500d4c 100644 --- a/providers/aws/resources/aws_backups.go +++ b/providers/aws/resources/aws_backups.go @@ -11,11 +11,11 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/arn" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/jobpool" - "go.mondoo.com/cnquery/v9/providers/aws/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/jobpool" + "go.mondoo.com/cnquery/v10/providers/aws/connection" + "go.mondoo.com/cnquery/v10/types" ) func (a *mqlAwsBackup) id() (string, error) { diff --git a/providers/aws/resources/aws_cloudfront.go b/providers/aws/resources/aws_cloudfront.go index cabee7c164..4e2b4721d5 100644 --- a/providers/aws/resources/aws_cloudfront.go +++ b/providers/aws/resources/aws_cloudfront.go @@ -10,10 +10,10 @@ import ( "github.com/aws/aws-sdk-go-v2/service/cloudfront" "github.com/cockroachdb/errors" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/aws/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/aws/connection" + "go.mondoo.com/cnquery/v10/types" ) func (a *mqlAwsCloudfront) id() (string, error) { diff --git a/providers/aws/resources/aws_cloudtrail.go b/providers/aws/resources/aws_cloudtrail.go index 0bc0d76acc..6b87484ccc 100644 --- a/providers/aws/resources/aws_cloudtrail.go +++ b/providers/aws/resources/aws_cloudtrail.go @@ -10,11 +10,11 @@ import ( "github.com/aws/aws-sdk-go-v2/service/cloudtrail" "github.com/cockroachdb/errors" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/jobpool" - "go.mondoo.com/cnquery/v9/providers/aws/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/jobpool" + "go.mondoo.com/cnquery/v10/providers/aws/connection" ) func (a *mqlAwsCloudtrail) id() (string, error) { diff --git a/providers/aws/resources/aws_cloudwatch.go b/providers/aws/resources/aws_cloudwatch.go index e52024c23c..f4c7912fd7 100644 --- a/providers/aws/resources/aws_cloudwatch.go +++ b/providers/aws/resources/aws_cloudwatch.go @@ -17,13 +17,13 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/cockroachdb/errors" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/jobpool" - "go.mondoo.com/cnquery/v9/providers/aws/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/jobpool" + "go.mondoo.com/cnquery/v10/providers/aws/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/types" ) func (a *mqlAwsCloudwatch) id() (string, error) { diff --git a/providers/aws/resources/aws_codebuild.go b/providers/aws/resources/aws_codebuild.go index 400190c2c9..3c28aae5c7 100644 --- a/providers/aws/resources/aws_codebuild.go +++ b/providers/aws/resources/aws_codebuild.go @@ -12,12 +12,12 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/jobpool" - "go.mondoo.com/cnquery/v9/providers/aws/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/jobpool" + "go.mondoo.com/cnquery/v10/providers/aws/connection" + "go.mondoo.com/cnquery/v10/types" ) func (a *mqlAwsCodebuild) id() (string, error) { diff --git a/providers/aws/resources/aws_config.go b/providers/aws/resources/aws_config.go index 63c3116d45..c41d4edea9 100644 --- a/providers/aws/resources/aws_config.go +++ b/providers/aws/resources/aws_config.go @@ -8,11 +8,11 @@ import ( "github.com/aws/aws-sdk-go-v2/service/configservice" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/jobpool" - "go.mondoo.com/cnquery/v9/providers/aws/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/jobpool" + "go.mondoo.com/cnquery/v10/providers/aws/connection" + "go.mondoo.com/cnquery/v10/types" ) func (a *mqlAwsConfig) id() (string, error) { diff --git a/providers/aws/resources/aws_dms.go b/providers/aws/resources/aws_dms.go index 2c11215ec9..97172fd2c4 100644 --- a/providers/aws/resources/aws_dms.go +++ b/providers/aws/resources/aws_dms.go @@ -9,9 +9,9 @@ import ( "github.com/aws/aws-sdk-go-v2/service/databasemigrationservice" "github.com/aws/aws-sdk-go-v2/service/databasemigrationservice/types" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/jobpool" - "go.mondoo.com/cnquery/v9/providers/aws/connection" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/jobpool" + "go.mondoo.com/cnquery/v10/providers/aws/connection" ) func (a *mqlAwsDms) id() (string, error) { diff --git a/providers/aws/resources/aws_dynamodb.go b/providers/aws/resources/aws_dynamodb.go index 86942d54aa..a4ce12cdd6 100644 --- a/providers/aws/resources/aws_dynamodb.go +++ b/providers/aws/resources/aws_dynamodb.go @@ -12,13 +12,13 @@ import ( "github.com/cockroachdb/errors" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/jobpool" - "go.mondoo.com/cnquery/v9/providers/aws/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/jobpool" + "go.mondoo.com/cnquery/v10/providers/aws/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/types" ) func (a *mqlAwsDynamodb) id() (string, error) { diff --git a/providers/aws/resources/aws_ec2.go b/providers/aws/resources/aws_ec2.go index 9e28384dc5..5e89d719e2 100644 --- a/providers/aws/resources/aws_ec2.go +++ b/providers/aws/resources/aws_ec2.go @@ -20,12 +20,12 @@ import ( "github.com/aws/smithy-go" "github.com/cockroachdb/errors" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/jobpool" - "go.mondoo.com/cnquery/v9/providers/aws/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/jobpool" + "go.mondoo.com/cnquery/v10/providers/aws/connection" + "go.mondoo.com/cnquery/v10/types" ) func (e *mqlAwsEc2) id() (string, error) { diff --git a/providers/aws/resources/aws_ecr.go b/providers/aws/resources/aws_ecr.go index 442f2f1d25..0a3dba6d95 100644 --- a/providers/aws/resources/aws_ecr.go +++ b/providers/aws/resources/aws_ecr.go @@ -12,13 +12,13 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/cockroachdb/errors" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/jobpool" - "go.mondoo.com/cnquery/v9/providers/aws/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/jobpool" + "go.mondoo.com/cnquery/v10/providers/aws/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/types" ) func (a *mqlAwsEcr) id() (string, error) { diff --git a/providers/aws/resources/aws_ecs.go b/providers/aws/resources/aws_ecs.go index 23d902268f..904c397417 100644 --- a/providers/aws/resources/aws_ecs.go +++ b/providers/aws/resources/aws_ecs.go @@ -17,14 +17,14 @@ import ( "github.com/cockroachdb/errors" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/jobpool" - "go.mondoo.com/cnquery/v9/providers/aws/connection" - - "go.mondoo.com/cnquery/v9/types" - "go.mondoo.com/cnquery/v9/utils/stringx" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/jobpool" + "go.mondoo.com/cnquery/v10/providers/aws/connection" + + "go.mondoo.com/cnquery/v10/types" + "go.mondoo.com/cnquery/v10/utils/stringx" ) func (a *mqlAwsEcs) id() (string, error) { diff --git a/providers/aws/resources/aws_efs.go b/providers/aws/resources/aws_efs.go index ded219302a..2e1c426304 100644 --- a/providers/aws/resources/aws_efs.go +++ b/providers/aws/resources/aws_efs.go @@ -12,12 +12,12 @@ import ( "github.com/aws/smithy-go/transport/http" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/jobpool" - "go.mondoo.com/cnquery/v9/providers/aws/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/jobpool" + "go.mondoo.com/cnquery/v10/providers/aws/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/types" ) func (a *mqlAwsEfsFilesystem) id() (string, error) { diff --git a/providers/aws/resources/aws_eks.go b/providers/aws/resources/aws_eks.go index db38b30d0e..d8b8712c10 100644 --- a/providers/aws/resources/aws_eks.go +++ b/providers/aws/resources/aws_eks.go @@ -9,12 +9,12 @@ import ( "github.com/aws/aws-sdk-go-v2/service/eks" "github.com/aws/aws-sdk-go/aws" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/jobpool" - "go.mondoo.com/cnquery/v9/providers/aws/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/jobpool" + "go.mondoo.com/cnquery/v10/providers/aws/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/types" ) func (a *mqlAwsEks) id() (string, error) { diff --git a/providers/aws/resources/aws_elasticache.go b/providers/aws/resources/aws_elasticache.go index 567a419444..c4ec6ea4cb 100644 --- a/providers/aws/resources/aws_elasticache.go +++ b/providers/aws/resources/aws_elasticache.go @@ -11,12 +11,12 @@ import ( ecstypes "github.com/aws/aws-sdk-go-v2/service/elasticache/types" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/jobpool" - "go.mondoo.com/cnquery/v9/providers/aws/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/jobpool" + "go.mondoo.com/cnquery/v10/providers/aws/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/types" ) func (a *mqlAwsElasticache) id() (string, error) { diff --git a/providers/aws/resources/aws_elb.go b/providers/aws/resources/aws_elb.go index 15ea123548..6f772ae0be 100644 --- a/providers/aws/resources/aws_elb.go +++ b/providers/aws/resources/aws_elb.go @@ -11,11 +11,11 @@ import ( "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing" "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/jobpool" - "go.mondoo.com/cnquery/v9/providers/aws/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/jobpool" + "go.mondoo.com/cnquery/v10/providers/aws/connection" ) func (a *mqlAwsElb) id() (string, error) { diff --git a/providers/aws/resources/aws_emr.go b/providers/aws/resources/aws_emr.go index 2ef96ffee4..c7300ed468 100644 --- a/providers/aws/resources/aws_emr.go +++ b/providers/aws/resources/aws_emr.go @@ -9,12 +9,12 @@ import ( "github.com/aws/aws-sdk-go-v2/service/emr" emrtypes "github.com/aws/aws-sdk-go-v2/service/emr/types" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/jobpool" - "go.mondoo.com/cnquery/v9/providers/aws/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/jobpool" + "go.mondoo.com/cnquery/v10/providers/aws/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/types" ) func (a *mqlAwsEmr) id() (string, error) { diff --git a/providers/aws/resources/aws_es.go b/providers/aws/resources/aws_es.go index 0cdefca4c3..48b9a4e6c2 100644 --- a/providers/aws/resources/aws_es.go +++ b/providers/aws/resources/aws_es.go @@ -10,12 +10,12 @@ import ( "github.com/aws/aws-sdk-go-v2/service/elasticsearchservice" "github.com/aws/smithy-go/transport/http" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/jobpool" - "go.mondoo.com/cnquery/v9/providers/aws/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/jobpool" + "go.mondoo.com/cnquery/v10/providers/aws/connection" + "go.mondoo.com/cnquery/v10/types" ) func (a *mqlAwsEs) id() (string, error) { diff --git a/providers/aws/resources/aws_guardduty.go b/providers/aws/resources/aws_guardduty.go index 1f16cc6840..50447a7088 100644 --- a/providers/aws/resources/aws_guardduty.go +++ b/providers/aws/resources/aws_guardduty.go @@ -11,11 +11,11 @@ import ( "github.com/aws/aws-sdk-go-v2/service/guardduty/types" "github.com/aws/aws-sdk-go/aws" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/jobpool" - "go.mondoo.com/cnquery/v9/providers/aws/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/jobpool" + "go.mondoo.com/cnquery/v10/providers/aws/connection" ) func (a *mqlAwsGuardduty) id() (string, error) { diff --git a/providers/aws/resources/aws_iam.go b/providers/aws/resources/aws_iam.go index 971b01ed1e..a4d4d169d5 100644 --- a/providers/aws/resources/aws_iam.go +++ b/providers/aws/resources/aws_iam.go @@ -18,13 +18,13 @@ import ( "github.com/aws/smithy-go" "github.com/cockroachdb/errors" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/aws/connection" - "go.mondoo.com/cnquery/v9/providers/aws/resources/awsiam" - "go.mondoo.com/cnquery/v9/providers/aws/resources/awspolicy" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/aws/connection" + "go.mondoo.com/cnquery/v10/providers/aws/resources/awsiam" + "go.mondoo.com/cnquery/v10/providers/aws/resources/awspolicy" + "go.mondoo.com/cnquery/v10/types" ) func (a *mqlAwsIam) id() (string, error) { diff --git a/providers/aws/resources/aws_kms.go b/providers/aws/resources/aws_kms.go index 8f8c9f2ae5..16843c7591 100644 --- a/providers/aws/resources/aws_kms.go +++ b/providers/aws/resources/aws_kms.go @@ -10,11 +10,11 @@ import ( "github.com/aws/aws-sdk-go-v2/service/kms" "github.com/aws/aws-sdk-go/aws/arn" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/jobpool" - "go.mondoo.com/cnquery/v9/providers/aws/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/jobpool" + "go.mondoo.com/cnquery/v10/providers/aws/connection" ) func (a *mqlAwsKms) id() (string, error) { diff --git a/providers/aws/resources/aws_lambda.go b/providers/aws/resources/aws_lambda.go index 889eba47ed..9811110939 100644 --- a/providers/aws/resources/aws_lambda.go +++ b/providers/aws/resources/aws_lambda.go @@ -11,14 +11,14 @@ import ( "github.com/aws/smithy-go/transport/http" "github.com/cockroachdb/errors" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/jobpool" - "go.mondoo.com/cnquery/v9/providers/aws/connection" - "go.mondoo.com/cnquery/v9/providers/aws/resources/awspolicy" - - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/jobpool" + "go.mondoo.com/cnquery/v10/providers/aws/connection" + "go.mondoo.com/cnquery/v10/providers/aws/resources/awspolicy" + + "go.mondoo.com/cnquery/v10/types" ) func (a *mqlAwsLambda) id() (string, error) { diff --git a/providers/aws/resources/aws_rds.go b/providers/aws/resources/aws_rds.go index 9375498fbf..291740fd2e 100644 --- a/providers/aws/resources/aws_rds.go +++ b/providers/aws/resources/aws_rds.go @@ -12,13 +12,13 @@ import ( rdstypes "github.com/aws/aws-sdk-go-v2/service/rds/types" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/jobpool" - "go.mondoo.com/cnquery/v9/providers/aws/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/jobpool" + "go.mondoo.com/cnquery/v10/providers/aws/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/types" ) func (a *mqlAwsRds) id() (string, error) { diff --git a/providers/aws/resources/aws_redshift.go b/providers/aws/resources/aws_redshift.go index fa20d45a35..eea5f583aa 100644 --- a/providers/aws/resources/aws_redshift.go +++ b/providers/aws/resources/aws_redshift.go @@ -12,13 +12,13 @@ import ( redshifttypes "github.com/aws/aws-sdk-go-v2/service/redshift/types" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/jobpool" - "go.mondoo.com/cnquery/v9/providers/aws/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/jobpool" + "go.mondoo.com/cnquery/v10/providers/aws/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/types" ) func (a *mqlAwsRedshift) id() (string, error) { diff --git a/providers/aws/resources/aws_s3.go b/providers/aws/resources/aws_s3.go index c298e49ed6..8af0c1eb18 100644 --- a/providers/aws/resources/aws_s3.go +++ b/providers/aws/resources/aws_s3.go @@ -20,12 +20,12 @@ import ( "github.com/aws/smithy-go" "github.com/aws/smithy-go/transport/http" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/aws/connection" - "go.mondoo.com/cnquery/v9/providers/aws/resources/awspolicy" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/aws/connection" + "go.mondoo.com/cnquery/v10/providers/aws/resources/awspolicy" + "go.mondoo.com/cnquery/v10/types" ) func (a *mqlAwsS3control) id() (string, error) { diff --git a/providers/aws/resources/aws_sagemaker.go b/providers/aws/resources/aws_sagemaker.go index 3ac34a9ce9..be7fc9964a 100644 --- a/providers/aws/resources/aws_sagemaker.go +++ b/providers/aws/resources/aws_sagemaker.go @@ -11,13 +11,13 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/smithy-go/transport/http" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/jobpool" - "go.mondoo.com/cnquery/v9/providers/aws/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/jobpool" + "go.mondoo.com/cnquery/v10/providers/aws/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/types" ) func (a *mqlAwsSagemaker) id() (string, error) { diff --git a/providers/aws/resources/aws_secretsmanager.go b/providers/aws/resources/aws_secretsmanager.go index 219e49f360..e3f6a93979 100644 --- a/providers/aws/resources/aws_secretsmanager.go +++ b/providers/aws/resources/aws_secretsmanager.go @@ -11,12 +11,12 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/jobpool" - "go.mondoo.com/cnquery/v9/providers/aws/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/jobpool" + "go.mondoo.com/cnquery/v10/providers/aws/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/types" ) func (a *mqlAwsSecretsmanager) id() (string, error) { diff --git a/providers/aws/resources/aws_securityhub.go b/providers/aws/resources/aws_securityhub.go index 7634135434..5488d9e676 100644 --- a/providers/aws/resources/aws_securityhub.go +++ b/providers/aws/resources/aws_securityhub.go @@ -10,9 +10,9 @@ import ( "github.com/aws/aws-sdk-go-v2/service/securityhub" "github.com/aws/aws-sdk-go-v2/service/securityhub/types" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/jobpool" - "go.mondoo.com/cnquery/v9/providers/aws/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/jobpool" + "go.mondoo.com/cnquery/v10/providers/aws/connection" ) func (a *mqlAwsSecurityhub) id() (string, error) { diff --git a/providers/aws/resources/aws_sns.go b/providers/aws/resources/aws_sns.go index 0397f266a6..e03aa2fbab 100644 --- a/providers/aws/resources/aws_sns.go +++ b/providers/aws/resources/aws_sns.go @@ -12,11 +12,11 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/smithy-go/transport/http" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/jobpool" - "go.mondoo.com/cnquery/v9/providers/aws/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/jobpool" + "go.mondoo.com/cnquery/v10/providers/aws/connection" ) func (a *mqlAwsSns) id() (string, error) { diff --git a/providers/aws/resources/aws_ssm.go b/providers/aws/resources/aws_ssm.go index dd3e74d04c..7ebd78e1d4 100644 --- a/providers/aws/resources/aws_ssm.go +++ b/providers/aws/resources/aws_ssm.go @@ -15,11 +15,11 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/cockroachdb/errors" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/jobpool" - "go.mondoo.com/cnquery/v9/providers/aws/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/jobpool" + "go.mondoo.com/cnquery/v10/providers/aws/connection" ) func (e *mqlAwsSsm) id() (string, error) { diff --git a/providers/aws/resources/aws_vpc.go b/providers/aws/resources/aws_vpc.go index b1f6deedbd..84413eb49a 100644 --- a/providers/aws/resources/aws_vpc.go +++ b/providers/aws/resources/aws_vpc.go @@ -13,12 +13,12 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/jobpool" - "go.mondoo.com/cnquery/v9/providers/aws/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/jobpool" + "go.mondoo.com/cnquery/v10/providers/aws/connection" + "go.mondoo.com/cnquery/v10/types" ) func (a *mqlAwsVpc) id() (string, error) { diff --git a/providers/aws/resources/aws_waf.go b/providers/aws/resources/aws_waf.go index a9cbe5bcd7..34eaf1efbf 100644 --- a/providers/aws/resources/aws_waf.go +++ b/providers/aws/resources/aws_waf.go @@ -13,11 +13,11 @@ import ( "github.com/rs/zerolog/log" //"github.com/aws/aws-sdk-go/aws" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/aws/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/aws/connection" + "go.mondoo.com/cnquery/v10/types" ) func (a *mqlAwsWaf) id() (string, error) { diff --git a/providers/aws/resources/discovery.go b/providers/aws/resources/discovery.go index ff984f4e25..492879653c 100644 --- a/providers/aws/resources/discovery.go +++ b/providers/aws/resources/discovery.go @@ -6,11 +6,11 @@ package resources import ( "github.com/aws/aws-sdk-go/aws/arn" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/aws/connection" - "go.mondoo.com/cnquery/v9/utils/stringx" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/aws/connection" + "go.mondoo.com/cnquery/v10/utils/stringx" ) // Discovery Flags diff --git a/providers/aws/resources/discovery_conversion.go b/providers/aws/resources/discovery_conversion.go index 6835bb2012..99e8dfaa24 100644 --- a/providers/aws/resources/discovery_conversion.go +++ b/providers/aws/resources/discovery_conversion.go @@ -12,14 +12,14 @@ import ( "github.com/aws/aws-sdk-go/aws/arn" "github.com/cockroachdb/errors" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" - "go.mondoo.com/cnquery/v9/providers/aws/connection" - "go.mondoo.com/cnquery/v9/providers/aws/connection/awsec2ebsconn" - awsec2ebstypes "go.mondoo.com/cnquery/v9/providers/aws/connection/awsec2ebsconn/types" - "go.mondoo.com/cnquery/v9/providers/os/id/awsec2" - "go.mondoo.com/cnquery/v9/providers/os/id/containerid" - "go.mondoo.com/cnquery/v9/providers/os/id/ids" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers/aws/connection" + "go.mondoo.com/cnquery/v10/providers/aws/connection/awsec2ebsconn" + awsec2ebstypes "go.mondoo.com/cnquery/v10/providers/aws/connection/awsec2ebsconn/types" + "go.mondoo.com/cnquery/v10/providers/os/id/awsec2" + "go.mondoo.com/cnquery/v10/providers/os/id/containerid" + "go.mondoo.com/cnquery/v10/providers/os/id/ids" ) type mqlObject struct { diff --git a/providers/aws/resources/discovery_test.go b/providers/aws/resources/discovery_test.go index 653da34053..83bee0b2a4 100644 --- a/providers/aws/resources/discovery_test.go +++ b/providers/aws/resources/discovery_test.go @@ -7,9 +7,9 @@ import ( "testing" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/aws/connection" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/aws/connection" ) func TestFilters(t *testing.T) { diff --git a/providers/aws/resources/shared.go b/providers/aws/resources/shared.go index dd31a56d3c..2c75cbbdcb 100644 --- a/providers/aws/resources/shared.go +++ b/providers/aws/resources/shared.go @@ -13,12 +13,12 @@ import ( "github.com/aws/aws-sdk-go-v2/aws/arn" "github.com/aws/smithy-go/transport/http" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/network/resources/certificates" - "go.mondoo.com/cnquery/v9/providers/aws/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/network/resources/certificates" + "go.mondoo.com/cnquery/v10/providers/aws/connection" + "go.mondoo.com/cnquery/v10/types" "k8s.io/client-go/util/cert" ) diff --git a/providers/azure/config/config.go b/providers/azure/config/config.go index 6affaee7ec..b2228f31fe 100644 --- a/providers/azure/config/config.go +++ b/providers/azure/config/config.go @@ -4,10 +4,10 @@ package config import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/azure/connection/azureinstancesnapshot" - "go.mondoo.com/cnquery/v9/providers/azure/provider" - "go.mondoo.com/cnquery/v9/providers/azure/resources" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/azure/connection/azureinstancesnapshot" + "go.mondoo.com/cnquery/v10/providers/azure/provider" + "go.mondoo.com/cnquery/v10/providers/azure/resources" ) var Config = plugin.Provider{ diff --git a/providers/azure/connection/auth/auth.go b/providers/azure/connection/auth/auth.go index 1aa7639f51..a0dd2b2ace 100644 --- a/providers/azure/connection/auth/auth.go +++ b/providers/azure/connection/auth/auth.go @@ -10,7 +10,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/pkg/errors" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" ) func GetTokenCredential(credential *vault.Credential, tenantId, clientId string) (azcore.TokenCredential, error) { diff --git a/providers/azure/connection/azureinstancesnapshot/lun.go b/providers/azure/connection/azureinstancesnapshot/lun.go index 417bb5a275..78fbe72a9c 100644 --- a/providers/azure/connection/azureinstancesnapshot/lun.go +++ b/providers/azure/connection/azureinstancesnapshot/lun.go @@ -11,7 +11,7 @@ import ( "github.com/cockroachdb/errors" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers/os/connection/local" + "go.mondoo.com/cnquery/v10/providers/os/connection/local" ) type deviceInfo struct { diff --git a/providers/azure/connection/azureinstancesnapshot/provider.go b/providers/azure/connection/azureinstancesnapshot/provider.go index ef3c6d5e02..8654f91f91 100644 --- a/providers/azure/connection/azureinstancesnapshot/provider.go +++ b/providers/azure/connection/azureinstancesnapshot/provider.go @@ -11,17 +11,17 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/cockroachdb/errors" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/mrn" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" - "go.mondoo.com/cnquery/v9/providers/azure/connection/auth" - "go.mondoo.com/cnquery/v9/providers/azure/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/connection/fs" - "go.mondoo.com/cnquery/v9/providers/os/connection/local" - "go.mondoo.com/cnquery/v9/providers/os/connection/snapshot" - "go.mondoo.com/cnquery/v9/providers/os/detector" - "go.mondoo.com/cnquery/v9/providers/os/id/azcompute" - "go.mondoo.com/cnquery/v9/providers/os/id/ids" + "go.mondoo.com/cnquery/v10/mrn" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers/azure/connection/auth" + "go.mondoo.com/cnquery/v10/providers/azure/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/fs" + "go.mondoo.com/cnquery/v10/providers/os/connection/local" + "go.mondoo.com/cnquery/v10/providers/os/connection/snapshot" + "go.mondoo.com/cnquery/v10/providers/os/detector" + "go.mondoo.com/cnquery/v10/providers/os/id/azcompute" + "go.mondoo.com/cnquery/v10/providers/os/id/ids" ) const ( diff --git a/providers/azure/connection/azureinstancesnapshot/provider_test.go b/providers/azure/connection/azureinstancesnapshot/provider_test.go index 9a452f74f6..f4f11f3436 100644 --- a/providers/azure/connection/azureinstancesnapshot/provider_test.go +++ b/providers/azure/connection/azureinstancesnapshot/provider_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" ) func TestParseTarget(t *testing.T) { diff --git a/providers/azure/connection/connection.go b/providers/azure/connection/connection.go index 8528ec184e..ded0ebbba5 100644 --- a/providers/azure/connection/connection.go +++ b/providers/azure/connection/connection.go @@ -7,10 +7,10 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/pkg/errors" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" - "go.mondoo.com/cnquery/v9/providers/azure/connection/auth" - "go.mondoo.com/cnquery/v9/providers/azure/connection/shared" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers/azure/connection/auth" + "go.mondoo.com/cnquery/v10/providers/azure/connection/shared" ) const ( diff --git a/providers/azure/connection/shared/shared.go b/providers/azure/connection/shared/shared.go index b267c6df6b..0af57bd2e4 100644 --- a/providers/azure/connection/shared/shared.go +++ b/providers/azure/connection/shared/shared.go @@ -4,7 +4,7 @@ package shared import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" ) type ConnectionType string diff --git a/providers/azure/gen/main.go b/providers/azure/gen/main.go index 1837507f91..7cc5f70ff0 100644 --- a/providers/azure/gen/main.go +++ b/providers/azure/gen/main.go @@ -4,8 +4,8 @@ package main import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin/gen" - "go.mondoo.com/cnquery/v9/providers/azure/config" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin/gen" + "go.mondoo.com/cnquery/v10/providers/azure/config" ) func main() { diff --git a/providers/azure/go.mod b/providers/azure/go.mod index 066fdf3c3a..c6bd1a1fb2 100644 --- a/providers/azure/go.mod +++ b/providers/azure/go.mod @@ -1,6 +1,6 @@ -module go.mondoo.com/cnquery/v9/providers/azure +module go.mondoo.com/cnquery/v10/providers/azure -replace go.mondoo.com/cnquery/v9 => ../.. +replace go.mondoo.com/cnquery/v10 => ../.. go 1.21 @@ -36,7 +36,7 @@ require ( github.com/pkg/errors v0.9.1 github.com/rs/zerolog v1.31.0 github.com/stretchr/testify v1.8.4 - go.mondoo.com/cnquery/v9 v9.14.0 + go.mondoo.com/cnquery/v10 v10.0.0 ) require ( diff --git a/providers/azure/main.go b/providers/azure/main.go index 4aa34a4c95..bc74934342 100644 --- a/providers/azure/main.go +++ b/providers/azure/main.go @@ -6,8 +6,8 @@ package main import ( "os" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/azure/provider" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/azure/provider" ) func main() { diff --git a/providers/azure/provider/provider.go b/providers/azure/provider/provider.go index f6940b549a..78cde9b016 100644 --- a/providers/azure/provider/provider.go +++ b/providers/azure/provider/provider.go @@ -8,15 +8,15 @@ import ( "strconv" "strings" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" - "go.mondoo.com/cnquery/v9/providers/azure/connection" - "go.mondoo.com/cnquery/v9/providers/azure/connection/azureinstancesnapshot" - "go.mondoo.com/cnquery/v9/providers/azure/connection/shared" - "go.mondoo.com/cnquery/v9/providers/azure/resources" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers/azure/connection" + "go.mondoo.com/cnquery/v10/providers/azure/connection/azureinstancesnapshot" + "go.mondoo.com/cnquery/v10/providers/azure/connection/shared" + "go.mondoo.com/cnquery/v10/providers/azure/resources" ) const ( diff --git a/providers/azure/resources/advisor.go b/providers/azure/resources/advisor.go index 7fda7445bc..a1a0d40b1e 100644 --- a/providers/azure/resources/advisor.go +++ b/providers/azure/resources/advisor.go @@ -19,11 +19,11 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" advisor "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/advisor/armadvisor" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/azure/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/azure/connection" + "go.mondoo.com/cnquery/v10/types" ) func initAzureSubscriptionAdvisorService(runtime *plugin.Runtime, args map[string]*llx.RawData) (map[string]*llx.RawData, plugin.Resource, error) { diff --git a/providers/azure/resources/aks.go b/providers/azure/resources/aks.go index 074b90ce8f..c565d91c11 100644 --- a/providers/azure/resources/aks.go +++ b/providers/azure/resources/aks.go @@ -9,11 +9,11 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" clusters "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v2" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/azure/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/azure/connection" + "go.mondoo.com/cnquery/v10/types" ) func (a *mqlAzureSubscriptionAksService) id() (string, error) { diff --git a/providers/azure/resources/authorization.go b/providers/azure/resources/authorization.go index 629211b989..8e06f07988 100644 --- a/providers/azure/resources/authorization.go +++ b/providers/azure/resources/authorization.go @@ -8,11 +8,11 @@ import ( "fmt" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/azure/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/azure/connection" + "go.mondoo.com/cnquery/v10/types" authorization "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v2" ) diff --git a/providers/azure/resources/azure.lr b/providers/azure/resources/azure.lr index c51f749174..23624fafb0 100644 --- a/providers/azure/resources/azure.lr +++ b/providers/azure/resources/azure.lr @@ -2,7 +2,7 @@ // SPDX-License-Identifier: BUSL-1.1 option provider = "go.mondoo.com/cnquery/providers/azure" -option go_package = "go.mondoo.com/cnquery/v9/providers/azure/resources" +option go_package = "go.mondoo.com/cnquery/v10/providers/azure/resources" // Azure resource azure { diff --git a/providers/azure/resources/azure.lr.go b/providers/azure/resources/azure.lr.go index 005c92fdd0..659a7c452a 100644 --- a/providers/azure/resources/azure.lr.go +++ b/providers/azure/resources/azure.lr.go @@ -9,9 +9,9 @@ import ( "errors" "time" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/types" ) var resourceFactories map[string]plugin.ResourceFactory diff --git a/providers/azure/resources/cloud_defender.go b/providers/azure/resources/cloud_defender.go index 98598f68a6..c6e5488016 100644 --- a/providers/azure/resources/cloud_defender.go +++ b/providers/azure/resources/cloud_defender.go @@ -14,11 +14,11 @@ import ( "strings" "time" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/azure/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/azure/connection" + "go.mondoo.com/cnquery/v10/types" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" diff --git a/providers/azure/resources/compute.go b/providers/azure/resources/compute.go index 747829e1f8..8e6cc6fd1e 100644 --- a/providers/azure/resources/compute.go +++ b/providers/azure/resources/compute.go @@ -11,11 +11,11 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" compute "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute" network "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/azure/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/azure/connection" + "go.mondoo.com/cnquery/v10/types" ) func (a *mqlAzureSubscriptionComputeService) id() (string, error) { diff --git a/providers/azure/resources/cosmosdb.go b/providers/azure/resources/cosmosdb.go index fb0b801920..4f1256c622 100644 --- a/providers/azure/resources/cosmosdb.go +++ b/providers/azure/resources/cosmosdb.go @@ -6,11 +6,11 @@ package resources import ( "context" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/azure/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/azure/connection" + "go.mondoo.com/cnquery/v10/types" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" cosmosdb "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos" diff --git a/providers/azure/resources/discovery.go b/providers/azure/resources/discovery.go index 771ea4624d..fa831913bd 100644 --- a/providers/azure/resources/discovery.go +++ b/providers/azure/resources/discovery.go @@ -8,11 +8,11 @@ import ( "fmt" "strings" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/azure/connection" - "go.mondoo.com/cnquery/v9/utils/stringx" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/azure/connection" + "go.mondoo.com/cnquery/v10/utils/stringx" subscriptions "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armsubscriptions" ) diff --git a/providers/azure/resources/keyvault.go b/providers/azure/resources/keyvault.go index eb81c62dd1..1af3aa3d6b 100644 --- a/providers/azure/resources/keyvault.go +++ b/providers/azure/resources/keyvault.go @@ -10,11 +10,11 @@ import ( "fmt" "regexp" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/azure/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/azure/connection" + "go.mondoo.com/cnquery/v10/types" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/Azure/azure-sdk-for-go/sdk/keyvault/azcertificates" diff --git a/providers/azure/resources/mariadb.go b/providers/azure/resources/mariadb.go index f138fc6817..a7e72f3c49 100644 --- a/providers/azure/resources/mariadb.go +++ b/providers/azure/resources/mariadb.go @@ -7,11 +7,11 @@ import ( "context" "errors" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/azure/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/azure/connection" + "go.mondoo.com/cnquery/v10/types" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" mariadb "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mariadb/armmariadb" diff --git a/providers/azure/resources/monitor.go b/providers/azure/resources/monitor.go index 110288bff5..50c5f012b7 100644 --- a/providers/azure/resources/monitor.go +++ b/providers/azure/resources/monitor.go @@ -7,11 +7,11 @@ import ( "context" "errors" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/azure/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/azure/connection" + "go.mondoo.com/cnquery/v10/types" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" appinsights "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights" diff --git a/providers/azure/resources/mysql.go b/providers/azure/resources/mysql.go index 06d3e9d5ae..b9def60731 100644 --- a/providers/azure/resources/mysql.go +++ b/providers/azure/resources/mysql.go @@ -8,11 +8,11 @@ import ( "errors" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/azure/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/azure/connection" + "go.mondoo.com/cnquery/v10/types" mysql "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mysql/armmysql" diff --git a/providers/azure/resources/network.go b/providers/azure/resources/network.go index b8aaf6625b..8dcff0ba0d 100644 --- a/providers/azure/resources/network.go +++ b/providers/azure/resources/network.go @@ -10,12 +10,12 @@ import ( "strings" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/azure/connection" - "go.mondoo.com/cnquery/v9/types" - "go.mondoo.com/cnquery/v9/utils/stringx" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/azure/connection" + "go.mondoo.com/cnquery/v10/types" + "go.mondoo.com/cnquery/v10/utils/stringx" network "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" ) diff --git a/providers/azure/resources/postgresql.go b/providers/azure/resources/postgresql.go index 90cc13bb43..52a2d1a2f4 100644 --- a/providers/azure/resources/postgresql.go +++ b/providers/azure/resources/postgresql.go @@ -8,11 +8,11 @@ import ( "encoding/json" "errors" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/azure/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/azure/connection" + "go.mondoo.com/cnquery/v10/types" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" postgresql "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresql/armpostgresql" diff --git a/providers/azure/resources/resource_groups.go b/providers/azure/resources/resource_groups.go index 31b22b4a0f..6036c42c31 100644 --- a/providers/azure/resources/resource_groups.go +++ b/providers/azure/resources/resource_groups.go @@ -7,10 +7,10 @@ import ( "context" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/azure/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/azure/connection" + "go.mondoo.com/cnquery/v10/types" azureres "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources" ) diff --git a/providers/azure/resources/resources.go b/providers/azure/resources/resources.go index 1a19b64556..12443d174d 100644 --- a/providers/azure/resources/resources.go +++ b/providers/azure/resources/resources.go @@ -7,10 +7,10 @@ import ( "context" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/azure/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/azure/connection" + "go.mondoo.com/cnquery/v10/types" azureres "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources" ) diff --git a/providers/azure/resources/shared.go b/providers/azure/resources/shared.go index 0df4e84f96..2bd82266a1 100644 --- a/providers/azure/resources/shared.go +++ b/providers/azure/resources/shared.go @@ -6,8 +6,8 @@ package resources import ( "strings" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/azure/connection" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/azure/connection" ) type assetIdentifier struct { diff --git a/providers/azure/resources/sql.go b/providers/azure/resources/sql.go index 9affd42440..6cca270a24 100644 --- a/providers/azure/resources/sql.go +++ b/providers/azure/resources/sql.go @@ -8,11 +8,11 @@ import ( "errors" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/azure/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/azure/connection" + "go.mondoo.com/cnquery/v10/types" sql "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) diff --git a/providers/azure/resources/storage.go b/providers/azure/resources/storage.go index d80f435470..2af5593a66 100644 --- a/providers/azure/resources/storage.go +++ b/providers/azure/resources/storage.go @@ -10,11 +10,11 @@ import ( "net/url" "strings" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/azure/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/azure/connection" + "go.mondoo.com/cnquery/v10/types" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" table "github.com/Azure/azure-sdk-for-go/sdk/data/aztables" diff --git a/providers/azure/resources/subscription.go b/providers/azure/resources/subscription.go index 20261bc442..9c7829f981 100644 --- a/providers/azure/resources/subscription.go +++ b/providers/azure/resources/subscription.go @@ -8,11 +8,11 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" subscriptions "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armsubscriptions" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/azure/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/azure/connection" + "go.mondoo.com/cnquery/v10/types" ) // TODO: we need to make this NOT go through init, this is heavy on the API diff --git a/providers/azure/resources/web.go b/providers/azure/resources/web.go index c32675d40f..27632b99c1 100644 --- a/providers/azure/resources/web.go +++ b/providers/azure/resources/web.go @@ -14,11 +14,11 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/azure/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/azure/connection" + "go.mondoo.com/cnquery/v10/types" web "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice" ) diff --git a/providers/builtin.go b/providers/builtin.go index 7280a91c7a..b9714687c4 100644 --- a/providers/builtin.go +++ b/providers/builtin.go @@ -13,8 +13,8 @@ package providers import ( _ "embed" - coreconf "go.mondoo.com/cnquery/v9/providers/core/config" - core "go.mondoo.com/cnquery/v9/providers/core/provider" + coreconf "go.mondoo.com/cnquery/v10/providers/core/config" + core "go.mondoo.com/cnquery/v10/providers/core/provider" ) //go:embed core/resources/core.resources.json diff --git a/providers/builtin_dev.go b/providers/builtin_dev.go index 16de569017..c0b85bf3b4 100644 --- a/providers/builtin_dev.go +++ b/providers/builtin_dev.go @@ -8,8 +8,8 @@ package providers import ( _ "embed" - // osconf "go.mondoo.com/cnquery/v9/providers/os/config" - // os "go.mondoo.com/cnquery/v9/providers/os/provider" + // osconf "go.mondoo.com/cnquery/v10/providers/os/config" + // os "go.mondoo.com/cnquery/v10/providers/os/provider" ) // //go:embed os/resources/os.resources.json diff --git a/providers/coordinator.go b/providers/coordinator.go index 68611403ae..47adb33bd5 100644 --- a/providers/coordinator.go +++ b/providers/coordinator.go @@ -15,11 +15,11 @@ import ( "github.com/muesli/termenv" "github.com/rs/zerolog" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - pp "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/resources" - coreconf "go.mondoo.com/cnquery/v9/providers/core/config" - "go.mondoo.com/cnquery/v9/providers/core/resources/versions/semver" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + pp "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/resources" + coreconf "go.mondoo.com/cnquery/v10/providers/core/config" + "go.mondoo.com/cnquery/v10/providers/core/resources/versions/semver" "google.golang.org/grpc/status" ) diff --git a/providers/core/config/config.go b/providers/core/config/config.go index b902245157..c4dad5f696 100644 --- a/providers/core/config/config.go +++ b/providers/core/config/config.go @@ -3,7 +3,7 @@ package config -import "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" +import "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" var Config = plugin.Provider{ Name: "core", diff --git a/providers/core/gen/main.go b/providers/core/gen/main.go index 867162c5c2..97339dee77 100644 --- a/providers/core/gen/main.go +++ b/providers/core/gen/main.go @@ -4,8 +4,8 @@ package main import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin/gen" - "go.mondoo.com/cnquery/v9/providers/core/config" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin/gen" + "go.mondoo.com/cnquery/v10/providers/core/config" ) func main() { diff --git a/providers/core/main.go b/providers/core/main.go index 91cdacd2ec..11aa5ddeaf 100644 --- a/providers/core/main.go +++ b/providers/core/main.go @@ -6,8 +6,8 @@ package main import ( "os" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/core/provider" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/core/provider" ) func main() { diff --git a/providers/core/provider/provider.go b/providers/core/provider/provider.go index 916f853ac0..3938d26681 100644 --- a/providers/core/provider/provider.go +++ b/providers/core/provider/provider.go @@ -8,11 +8,11 @@ import ( "strconv" "strings" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream" - "go.mondoo.com/cnquery/v9/providers/core/resources" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream" + "go.mondoo.com/cnquery/v10/providers/core/resources" + "go.mondoo.com/cnquery/v10/types" ) const defaultConnection uint32 = 1 diff --git a/providers/core/resources/asset_eol.go b/providers/core/resources/asset_eol.go index 77323d4454..09270aabbd 100644 --- a/providers/core/resources/asset_eol.go +++ b/providers/core/resources/asset_eol.go @@ -7,11 +7,11 @@ import ( "context" "errors" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/resources" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream/mvd" - "go.mondoo.com/cnquery/v9/utils/multierr" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/resources" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream/mvd" + "go.mondoo.com/cnquery/v10/utils/multierr" "time" ) diff --git a/providers/core/resources/core.lr b/providers/core/resources/core.lr index 21d89ffa49..6ceecf4369 100644 --- a/providers/core/resources/core.lr +++ b/providers/core/resources/core.lr @@ -2,7 +2,7 @@ // SPDX-License-Identifier: BUSL-1.1 option provider = "go.mondoo.com/cnquery/providers/core" -option go_package = "go.mondoo.com/cnquery/v9/providers/core/resources" +option go_package = "go.mondoo.com/cnquery/v10/providers/core/resources" // Contextual information about MQL runtime and environment mondoo @defaults("version") { diff --git a/providers/core/resources/core.lr.go b/providers/core/resources/core.lr.go index 40f40a9dd4..557daf05cf 100644 --- a/providers/core/resources/core.lr.go +++ b/providers/core/resources/core.lr.go @@ -9,9 +9,9 @@ import ( "errors" "time" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/types" ) var resourceFactories map[string]plugin.ResourceFactory diff --git a/providers/core/resources/core.resources.json b/providers/core/resources/core.resources.json index 0a6ed36117..7bde036186 100644 --- a/providers/core/resources/core.resources.json +++ b/providers/core/resources/core.resources.json @@ -1 +1 @@ -{"resources":{"asset":{"id":"asset","name":"asset","fields":{"arch":{"name":"arch","type":"\u0007","is_mandatory":true,"title":"Architecture this OS is running on","provider":"go.mondoo.com/cnquery/v9/providers/core"},"build":{"name":"build","type":"\u0007","is_mandatory":true,"title":"Build version of the platform (optional)","provider":"go.mondoo.com/cnquery/v9/providers/core"},"eol":{"name":"eol","type":"\u001basset.eol","title":"Information about the assets platform end-of-life.","is_implicit_resource":true,"provider":"go.mondoo.com/cnquery/v9/providers/core"},"family":{"name":"family","type":"\u0019\u0007","is_mandatory":true,"title":"List of platform families that this platform belongs to","provider":"go.mondoo.com/cnquery/v9/providers/core"},"fqdn":{"name":"fqdn","type":"\u0007","is_mandatory":true,"title":"Fully qualified domain name (optional)","provider":"go.mondoo.com/cnquery/v9/providers/core"},"ids":{"name":"ids","type":"\u0019\u0007","is_mandatory":true,"title":"All identifiers for this asset","provider":"go.mondoo.com/cnquery/v9/providers/core"},"kind":{"name":"kind","type":"\u0007","is_mandatory":true,"title":"Kind of platform, for example:","desc":"api, baremetal, vm, vm-image, container, container-image, network, ...","provider":"go.mondoo.com/cnquery/v9/providers/core"},"labels":{"name":"labels","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Optional platform information","provider":"go.mondoo.com/cnquery/v9/providers/core"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Human readable name of the asset","provider":"go.mondoo.com/cnquery/v9/providers/core"},"platform":{"name":"platform","type":"\u0007","is_mandatory":true,"title":"Platform for this asset (redhat, windows, k8s-pod)","provider":"go.mondoo.com/cnquery/v9/providers/core"},"runtime":{"name":"runtime","type":"\u0007","is_mandatory":true,"title":"Runtime is the specific kind of the platform. Examples include:","desc":"docker-container, podman-container, aws-ec2-instance, ...","provider":"go.mondoo.com/cnquery/v9/providers/core"},"title":{"name":"title","type":"\u0007","is_mandatory":true,"title":"Human-readable title of the platform (e.g., \"Red Hat 8, Container\")","provider":"go.mondoo.com/cnquery/v9/providers/core"},"version":{"name":"version","type":"\u0007","is_mandatory":true,"title":"Version of the platform","provider":"go.mondoo.com/cnquery/v9/providers/core"}},"title":"General asset information","min_mondoo_version":"6.13.0","defaults":"name platform version","provider":"go.mondoo.com/cnquery/v9/providers/core"},"asset.eol":{"id":"asset.eol","name":"asset.eol","fields":{"date":{"name":"date","type":"\t","is_mandatory":true,"title":"End-of-Life date","provider":"go.mondoo.com/cnquery/v9/providers/core"},"docsUrl":{"name":"docsUrl","type":"\u0007","is_mandatory":true,"title":"Documentation URL","provider":"go.mondoo.com/cnquery/v9/providers/core"},"productUrl":{"name":"productUrl","type":"\u0007","is_mandatory":true,"title":"Product URL","provider":"go.mondoo.com/cnquery/v9/providers/core"}},"title":"Information about the assets platform end-of-life.","min_mondoo_version":"latest","defaults":"date","provider":"go.mondoo.com/cnquery/v9/providers/core"},"cpe":{"id":"cpe","name":"cpe","fields":{"edition":{"name":"edition","type":"\u0007","title":"Edition of the CPE","provider":"go.mondoo.com/cnquery/v9/providers/core"},"language":{"name":"language","type":"\u0007","title":"Language of the CPE","provider":"go.mondoo.com/cnquery/v9/providers/core"},"other":{"name":"other","type":"\u0007","title":"Other of the CPE","provider":"go.mondoo.com/cnquery/v9/providers/core"},"part":{"name":"part","type":"\u0007","title":"Part of the CPE","provider":"go.mondoo.com/cnquery/v9/providers/core"},"product":{"name":"product","type":"\u0007","title":"Product of the CPE","provider":"go.mondoo.com/cnquery/v9/providers/core"},"swEdition":{"name":"swEdition","type":"\u0007","title":"Software edition of the CPE","provider":"go.mondoo.com/cnquery/v9/providers/core"},"targetHw":{"name":"targetHw","type":"\u0007","title":"Target hardware of the CPE","provider":"go.mondoo.com/cnquery/v9/providers/core"},"targetSw":{"name":"targetSw","type":"\u0007","title":"Target software of the CPE","provider":"go.mondoo.com/cnquery/v9/providers/core"},"update":{"name":"update","type":"\u0007","title":"Update of the CPE","provider":"go.mondoo.com/cnquery/v9/providers/core"},"uri":{"name":"uri","type":"\u0007","is_mandatory":true,"title":"URI binding of the CPE","provider":"go.mondoo.com/cnquery/v9/providers/core"},"vendor":{"name":"vendor","type":"\u0007","title":"Vendor of the CPE","provider":"go.mondoo.com/cnquery/v9/providers/core"},"version":{"name":"version","type":"\u0007","title":"Version of the CPE","provider":"go.mondoo.com/cnquery/v9/providers/core"}},"init":{"args":[{"name":"uri","type":"\u0007"}]},"title":"Common Platform Enumeration (CPE) identifiers","min_mondoo_version":"latest","defaults":"uri","provider":"go.mondoo.com/cnquery/v9/providers/core"},"mondoo":{"id":"mondoo","name":"mondoo","fields":{"arch":{"name":"arch","type":"\u0007","title":"Architecture of this client (e.g., linux-amd64)","min_mondoo_version":"latest","provider":"go.mondoo.com/cnquery/v9/providers/core"},"build":{"name":"build","type":"\u0007","title":"Build of the client (e.g., production, development)","provider":"go.mondoo.com/cnquery/v9/providers/core"},"capabilities":{"name":"capabilities","type":"\u0019\u0007","title":"Connection capabilities","provider":"go.mondoo.com/cnquery/v9/providers/core"},"jobEnvironment":{"name":"jobEnvironment","type":"\n","title":"Agent execution environment","provider":"go.mondoo.com/cnquery/v9/providers/core"},"version":{"name":"version","type":"\u0007","title":"Version of the client running on the asset","provider":"go.mondoo.com/cnquery/v9/providers/core"}},"title":"Contextual information about MQL runtime and environment","min_mondoo_version":"5.15.0","defaults":"version","provider":"go.mondoo.com/cnquery/v9/providers/core"},"parse":{"id":"parse","name":"parse","title":"Provides common parsers (json, ini, certs, etc)","min_mondoo_version":"5.15.0","provider":"go.mondoo.com/cnquery/v9/providers/core"},"regex":{"id":"regex","name":"regex","fields":{"creditCard":{"name":"creditCard","type":"\u0008","title":"Matches credit card numbers","provider":"go.mondoo.com/cnquery/v9/providers/core"},"email":{"name":"email","type":"\u0008","title":"Matches email addresses","provider":"go.mondoo.com/cnquery/v9/providers/core"},"emoji":{"name":"emoji","type":"\u0008","title":"Matches emojis","provider":"go.mondoo.com/cnquery/v9/providers/core"},"ipv4":{"name":"ipv4","type":"\u0008","title":"Matches IPv4 addresses","provider":"go.mondoo.com/cnquery/v9/providers/core"},"ipv6":{"name":"ipv6","type":"\u0008","title":"Matches IPv6 addresses","provider":"go.mondoo.com/cnquery/v9/providers/core"},"mac":{"name":"mac","type":"\u0008","title":"Matches MAC addresses","provider":"go.mondoo.com/cnquery/v9/providers/core"},"semver":{"name":"semver","type":"\u0008","title":"Matches semantic version numbers","provider":"go.mondoo.com/cnquery/v9/providers/core"},"url":{"name":"url","type":"\u0008","title":"Matches URL addresses (HTTP/HTTPS)","provider":"go.mondoo.com/cnquery/v9/providers/core"},"uuid":{"name":"uuid","type":"\u0008","title":"Matches hyphen-deliminated UUIDs","provider":"go.mondoo.com/cnquery/v9/providers/core"}},"title":"Built-in regular expression functions","min_mondoo_version":"5.15.0","provider":"go.mondoo.com/cnquery/v9/providers/core"},"time":{"id":"time","name":"time","fields":{"day":{"name":"day","type":"\t","title":"One day, used for durations","provider":"go.mondoo.com/cnquery/v9/providers/core"},"hour":{"name":"hour","type":"\t","title":"One hour, used for durations","provider":"go.mondoo.com/cnquery/v9/providers/core"},"minute":{"name":"minute","type":"\t","title":"One minute, used for durations","provider":"go.mondoo.com/cnquery/v9/providers/core"},"now":{"name":"now","type":"\t","title":"The current time on the local system","provider":"go.mondoo.com/cnquery/v9/providers/core"},"second":{"name":"second","type":"\t","title":"One second, used for durations","provider":"go.mondoo.com/cnquery/v9/providers/core"},"today":{"name":"today","type":"\t","title":"The current day starting at midnight","provider":"go.mondoo.com/cnquery/v9/providers/core"},"tomorrow":{"name":"tomorrow","type":"\t","title":"The next day starting at midnight","provider":"go.mondoo.com/cnquery/v9/providers/core"}},"title":"Date and time functions","min_mondoo_version":"5.15.0","provider":"go.mondoo.com/cnquery/v9/providers/core"},"uuid":{"id":"uuid","name":"uuid","fields":{"urn":{"name":"urn","type":"\u0007","title":"URN returns the RFC 2141 URN form of uuid","provider":"go.mondoo.com/cnquery/v9/providers/core"},"value":{"name":"value","type":"\u0007","is_mandatory":true,"title":"Canonical string representation xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","provider":"go.mondoo.com/cnquery/v9/providers/core"},"variant":{"name":"variant","type":"\u0007","title":"Variant encoded in UUID","provider":"go.mondoo.com/cnquery/v9/providers/core"},"version":{"name":"version","type":"\u0005","title":"Version of UUID","provider":"go.mondoo.com/cnquery/v9/providers/core"}},"init":{"args":[{"name":"value","type":"\u0007"}]},"title":"UUIDs based on RFC 4122 and DCE 1.1","min_mondoo_version":"5.15.0","defaults":"value","provider":"go.mondoo.com/cnquery/v9/providers/core"}}} \ No newline at end of file +{"resources":{"asset":{"id":"asset","name":"asset","fields":{"arch":{"name":"arch","type":"\u0007","is_mandatory":true,"title":"Architecture this OS is running on","provider":"go.mondoo.com/cnquery/providers/core"},"build":{"name":"build","type":"\u0007","is_mandatory":true,"title":"Build version of the platform (optional)","provider":"go.mondoo.com/cnquery/providers/core"},"eol":{"name":"eol","type":"\u001basset.eol","title":"Information about the assets platform end-of-life.","is_implicit_resource":true,"provider":"go.mondoo.com/cnquery/providers/core"},"family":{"name":"family","type":"\u0019\u0007","is_mandatory":true,"title":"List of platform families that this platform belongs to","provider":"go.mondoo.com/cnquery/providers/core"},"fqdn":{"name":"fqdn","type":"\u0007","is_mandatory":true,"title":"Fully qualified domain name (optional)","provider":"go.mondoo.com/cnquery/providers/core"},"ids":{"name":"ids","type":"\u0019\u0007","is_mandatory":true,"title":"All identifiers for this asset","provider":"go.mondoo.com/cnquery/providers/core"},"kind":{"name":"kind","type":"\u0007","is_mandatory":true,"title":"Kind of platform, for example:","desc":"api, baremetal, vm, vm-image, container, container-image, network, ...","provider":"go.mondoo.com/cnquery/providers/core"},"labels":{"name":"labels","type":"\u001a\u0007\u0007","is_mandatory":true,"title":"Optional platform information","provider":"go.mondoo.com/cnquery/providers/core"},"name":{"name":"name","type":"\u0007","is_mandatory":true,"title":"Human readable name of the asset","provider":"go.mondoo.com/cnquery/providers/core"},"platform":{"name":"platform","type":"\u0007","is_mandatory":true,"title":"Platform for this asset (redhat, windows, k8s-pod)","provider":"go.mondoo.com/cnquery/providers/core"},"runtime":{"name":"runtime","type":"\u0007","is_mandatory":true,"title":"Runtime is the specific kind of the platform. Examples include:","desc":"docker-container, podman-container, aws-ec2-instance, ...","provider":"go.mondoo.com/cnquery/providers/core"},"title":{"name":"title","type":"\u0007","is_mandatory":true,"title":"Human-readable title of the platform (e.g., \"Red Hat 8, Container\")","provider":"go.mondoo.com/cnquery/providers/core"},"version":{"name":"version","type":"\u0007","is_mandatory":true,"title":"Version of the platform","provider":"go.mondoo.com/cnquery/providers/core"}},"title":"General asset information","min_mondoo_version":"6.13.0","defaults":"name platform version","provider":"go.mondoo.com/cnquery/providers/core"},"asset.eol":{"id":"asset.eol","name":"asset.eol","fields":{"date":{"name":"date","type":"\t","is_mandatory":true,"title":"End-of-Life date","provider":"go.mondoo.com/cnquery/providers/core"},"docsUrl":{"name":"docsUrl","type":"\u0007","is_mandatory":true,"title":"Documentation URL","provider":"go.mondoo.com/cnquery/providers/core"},"productUrl":{"name":"productUrl","type":"\u0007","is_mandatory":true,"title":"Product URL","provider":"go.mondoo.com/cnquery/providers/core"}},"title":"Information about the assets platform end-of-life.","min_mondoo_version":"latest","defaults":"date","provider":"go.mondoo.com/cnquery/providers/core"},"cpe":{"id":"cpe","name":"cpe","fields":{"edition":{"name":"edition","type":"\u0007","title":"Edition of the CPE","provider":"go.mondoo.com/cnquery/providers/core"},"language":{"name":"language","type":"\u0007","title":"Language of the CPE","provider":"go.mondoo.com/cnquery/providers/core"},"other":{"name":"other","type":"\u0007","title":"Other of the CPE","provider":"go.mondoo.com/cnquery/providers/core"},"part":{"name":"part","type":"\u0007","title":"Part of the CPE","provider":"go.mondoo.com/cnquery/providers/core"},"product":{"name":"product","type":"\u0007","title":"Product of the CPE","provider":"go.mondoo.com/cnquery/providers/core"},"swEdition":{"name":"swEdition","type":"\u0007","title":"Software edition of the CPE","provider":"go.mondoo.com/cnquery/providers/core"},"targetHw":{"name":"targetHw","type":"\u0007","title":"Target hardware of the CPE","provider":"go.mondoo.com/cnquery/providers/core"},"targetSw":{"name":"targetSw","type":"\u0007","title":"Target software of the CPE","provider":"go.mondoo.com/cnquery/providers/core"},"update":{"name":"update","type":"\u0007","title":"Update of the CPE","provider":"go.mondoo.com/cnquery/providers/core"},"uri":{"name":"uri","type":"\u0007","is_mandatory":true,"title":"URI binding of the CPE","provider":"go.mondoo.com/cnquery/providers/core"},"vendor":{"name":"vendor","type":"\u0007","title":"Vendor of the CPE","provider":"go.mondoo.com/cnquery/providers/core"},"version":{"name":"version","type":"\u0007","title":"Version of the CPE","provider":"go.mondoo.com/cnquery/providers/core"}},"init":{"args":[{"name":"uri","type":"\u0007"}]},"title":"Common Platform Enumeration (CPE) identifiers","min_mondoo_version":"latest","defaults":"uri","provider":"go.mondoo.com/cnquery/providers/core"},"mondoo":{"id":"mondoo","name":"mondoo","fields":{"arch":{"name":"arch","type":"\u0007","title":"Architecture of this client (e.g., linux-amd64)","min_mondoo_version":"latest","provider":"go.mondoo.com/cnquery/providers/core"},"build":{"name":"build","type":"\u0007","title":"Build of the client (e.g., production, development)","provider":"go.mondoo.com/cnquery/providers/core"},"capabilities":{"name":"capabilities","type":"\u0019\u0007","title":"Connection capabilities","provider":"go.mondoo.com/cnquery/providers/core"},"jobEnvironment":{"name":"jobEnvironment","type":"\n","title":"Agent execution environment","provider":"go.mondoo.com/cnquery/providers/core"},"version":{"name":"version","type":"\u0007","title":"Version of the client running on the asset","provider":"go.mondoo.com/cnquery/providers/core"}},"title":"Contextual information about MQL runtime and environment","min_mondoo_version":"5.15.0","defaults":"version","provider":"go.mondoo.com/cnquery/providers/core"},"parse":{"id":"parse","name":"parse","title":"Provides common parsers (json, ini, certs, etc)","min_mondoo_version":"5.15.0","provider":"go.mondoo.com/cnquery/providers/core"},"regex":{"id":"regex","name":"regex","fields":{"creditCard":{"name":"creditCard","type":"\u0008","title":"Matches credit card numbers","provider":"go.mondoo.com/cnquery/providers/core"},"email":{"name":"email","type":"\u0008","title":"Matches email addresses","provider":"go.mondoo.com/cnquery/providers/core"},"emoji":{"name":"emoji","type":"\u0008","title":"Matches emojis","provider":"go.mondoo.com/cnquery/providers/core"},"ipv4":{"name":"ipv4","type":"\u0008","title":"Matches IPv4 addresses","provider":"go.mondoo.com/cnquery/providers/core"},"ipv6":{"name":"ipv6","type":"\u0008","title":"Matches IPv6 addresses","provider":"go.mondoo.com/cnquery/providers/core"},"mac":{"name":"mac","type":"\u0008","title":"Matches MAC addresses","provider":"go.mondoo.com/cnquery/providers/core"},"semver":{"name":"semver","type":"\u0008","title":"Matches semantic version numbers","provider":"go.mondoo.com/cnquery/providers/core"},"url":{"name":"url","type":"\u0008","title":"Matches URL addresses (HTTP/HTTPS)","provider":"go.mondoo.com/cnquery/providers/core"},"uuid":{"name":"uuid","type":"\u0008","title":"Matches hyphen-deliminated UUIDs","provider":"go.mondoo.com/cnquery/providers/core"}},"title":"Built-in regular expression functions","min_mondoo_version":"5.15.0","provider":"go.mondoo.com/cnquery/providers/core"},"time":{"id":"time","name":"time","fields":{"day":{"name":"day","type":"\t","title":"One day, used for durations","provider":"go.mondoo.com/cnquery/providers/core"},"hour":{"name":"hour","type":"\t","title":"One hour, used for durations","provider":"go.mondoo.com/cnquery/providers/core"},"minute":{"name":"minute","type":"\t","title":"One minute, used for durations","provider":"go.mondoo.com/cnquery/providers/core"},"now":{"name":"now","type":"\t","title":"The current time on the local system","provider":"go.mondoo.com/cnquery/providers/core"},"second":{"name":"second","type":"\t","title":"One second, used for durations","provider":"go.mondoo.com/cnquery/providers/core"},"today":{"name":"today","type":"\t","title":"The current day starting at midnight","provider":"go.mondoo.com/cnquery/providers/core"},"tomorrow":{"name":"tomorrow","type":"\t","title":"The next day starting at midnight","provider":"go.mondoo.com/cnquery/providers/core"}},"title":"Date and time functions","min_mondoo_version":"5.15.0","provider":"go.mondoo.com/cnquery/providers/core"},"uuid":{"id":"uuid","name":"uuid","fields":{"urn":{"name":"urn","type":"\u0007","title":"URN returns the RFC 2141 URN form of uuid","provider":"go.mondoo.com/cnquery/providers/core"},"value":{"name":"value","type":"\u0007","is_mandatory":true,"title":"Canonical string representation xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","provider":"go.mondoo.com/cnquery/providers/core"},"variant":{"name":"variant","type":"\u0007","title":"Variant encoded in UUID","provider":"go.mondoo.com/cnquery/providers/core"},"version":{"name":"version","type":"\u0005","title":"Version of UUID","provider":"go.mondoo.com/cnquery/providers/core"}},"init":{"args":[{"name":"value","type":"\u0007"}]},"title":"UUIDs based on RFC 4122 and DCE 1.1","min_mondoo_version":"5.15.0","defaults":"value","provider":"go.mondoo.com/cnquery/providers/core"}}} \ No newline at end of file diff --git a/providers/core/resources/core_test.go b/providers/core/resources/core_test.go index 603d3709a1..157ef74e51 100644 --- a/providers/core/resources/core_test.go +++ b/providers/core/resources/core_test.go @@ -3,6 +3,6 @@ package resources_test -import "go.mondoo.com/cnquery/v9/providers-sdk/v1/testutils" +import "go.mondoo.com/cnquery/v10/providers-sdk/v1/testutils" var x = testutils.InitTester(testutils.LinuxMock()) diff --git a/providers/core/resources/cpe.go b/providers/core/resources/cpe.go index 713c724556..810b95ab92 100644 --- a/providers/core/resources/cpe.go +++ b/providers/core/resources/cpe.go @@ -6,8 +6,8 @@ package resources import ( "errors" "github.com/facebookincubator/nvdtools/wfn" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" ) func initCpe(runtime *plugin.Runtime, args map[string]*llx.RawData) (map[string]*llx.RawData, plugin.Resource, error) { diff --git a/providers/core/resources/mondoo.go b/providers/core/resources/mondoo.go index 584d417b85..9172f3a090 100644 --- a/providers/core/resources/mondoo.go +++ b/providers/core/resources/mondoo.go @@ -6,8 +6,8 @@ package resources import ( "runtime" - "go.mondoo.com/cnquery/v9" - "go.mondoo.com/cnquery/v9/cli/execruntime" + "go.mondoo.com/cnquery/v10" + "go.mondoo.com/cnquery/v10/cli/execruntime" ) func (m *mqlMondoo) version() (string, error) { diff --git a/providers/core/resources/mql_test.go b/providers/core/resources/mql_test.go index 0c01efe8db..eb46cb569e 100644 --- a/providers/core/resources/mql_test.go +++ b/providers/core/resources/mql_test.go @@ -9,8 +9,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/testutils" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/testutils" ) // Core Language constructs diff --git a/providers/core/resources/parse_test.go b/providers/core/resources/parse_test.go index f5e03934dd..e7e4ac8029 100644 --- a/providers/core/resources/parse_test.go +++ b/providers/core/resources/parse_test.go @@ -7,8 +7,8 @@ import ( "testing" "time" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/testutils" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/testutils" ) func TestParse_Date(t *testing.T) { diff --git a/providers/core/resources/regex.go b/providers/core/resources/regex.go index d1d15505f7..9088e57183 100644 --- a/providers/core/resources/regex.go +++ b/providers/core/resources/regex.go @@ -3,7 +3,7 @@ package resources -import "go.mondoo.com/cnquery/v9/providers/core/resources/regex" +import "go.mondoo.com/cnquery/v10/providers/core/resources/regex" func (p *mqlRegex) id() (string, error) { return "time", nil diff --git a/providers/core/resources/regex_test.go b/providers/core/resources/regex_test.go index 7792455e77..a0435faf9d 100644 --- a/providers/core/resources/regex_test.go +++ b/providers/core/resources/regex_test.go @@ -6,7 +6,7 @@ package resources_test import ( "testing" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/testutils" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/testutils" ) var emojiTestString = []rune("☀⛺➿🌀🎂👍🔒😀🙈🚵🛼🤌🤣🥳🧡🧿🩰🫖") diff --git a/providers/core/resources/time.go b/providers/core/resources/time.go index 7e6a9df624..7232fef8e5 100644 --- a/providers/core/resources/time.go +++ b/providers/core/resources/time.go @@ -6,7 +6,7 @@ package resources import ( "time" - "go.mondoo.com/cnquery/v9/llx" + "go.mondoo.com/cnquery/v10/llx" ) func (p *mqlTime) now() (*time.Time, error) { diff --git a/providers/core/resources/time_test.go b/providers/core/resources/time_test.go index 500fbec567..b6377d0853 100644 --- a/providers/core/resources/time_test.go +++ b/providers/core/resources/time_test.go @@ -9,8 +9,8 @@ import ( "time" "github.com/stretchr/testify/assert" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/testutils" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/testutils" ) func duration(i int64) *time.Time { diff --git a/providers/core/resources/time_unit_test.go b/providers/core/resources/time_unit_test.go index 58930ea84e..7cedcd5dd7 100644 --- a/providers/core/resources/time_unit_test.go +++ b/providers/core/resources/time_unit_test.go @@ -9,7 +9,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/llx" + "go.mondoo.com/cnquery/v10/llx" ) func TestTime_Conversions(t *testing.T) { diff --git a/providers/core/resources/uuid.go b/providers/core/resources/uuid.go index f279acf2ba..1917513479 100644 --- a/providers/core/resources/uuid.go +++ b/providers/core/resources/uuid.go @@ -7,8 +7,8 @@ import ( "errors" "github.com/google/uuid" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" ) func (u *mqlUuid) id() (string, error) { diff --git a/providers/core/resources/uuid_test.go b/providers/core/resources/uuid_test.go index c8f486e776..2a0dd7aa7c 100644 --- a/providers/core/resources/uuid_test.go +++ b/providers/core/resources/uuid_test.go @@ -6,7 +6,7 @@ package resources_test import ( "testing" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/testutils" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/testutils" ) func TestUUID(t *testing.T) { diff --git a/providers/core/resources/versions/apk/version_test.go b/providers/core/resources/versions/apk/version_test.go index d9aa7ae9d0..53af43e83b 100644 --- a/providers/core/resources/versions/apk/version_test.go +++ b/providers/core/resources/versions/apk/version_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/stretchr/testify/assert" - "go.mondoo.com/cnquery/v9/providers/core/resources/versions/apk" - "go.mondoo.com/cnquery/v9/providers/core/resources/versions/generic" + "go.mondoo.com/cnquery/v10/providers/core/resources/versions/apk" + "go.mondoo.com/cnquery/v10/providers/core/resources/versions/generic" ) const ( diff --git a/providers/core/resources/versions/generic/compare.go b/providers/core/resources/versions/generic/compare.go index 5a816b508d..8a519c7cb8 100644 --- a/providers/core/resources/versions/generic/compare.go +++ b/providers/core/resources/versions/generic/compare.go @@ -7,10 +7,10 @@ import ( "errors" "strings" - "go.mondoo.com/cnquery/v9/providers/core/resources/versions/apk" - "go.mondoo.com/cnquery/v9/providers/core/resources/versions/deb" - "go.mondoo.com/cnquery/v9/providers/core/resources/versions/rpm" - "go.mondoo.com/cnquery/v9/providers/core/resources/versions/semver" + "go.mondoo.com/cnquery/v10/providers/core/resources/versions/apk" + "go.mondoo.com/cnquery/v10/providers/core/resources/versions/deb" + "go.mondoo.com/cnquery/v10/providers/core/resources/versions/rpm" + "go.mondoo.com/cnquery/v10/providers/core/resources/versions/semver" ) func Compare(format, a, b string) (int, error) { diff --git a/providers/defaults.go b/providers/defaults.go index 727d6d0c26..b3384b4a59 100644 --- a/providers/defaults.go +++ b/providers/defaults.go @@ -5,7 +5,7 @@ package providers -import "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" +import "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" // DefaultProviders are useful when working in air-gapped environments // to tell users what providers are used for common connections, when there diff --git a/providers/defaults_shared.go b/providers/defaults_shared.go index 29ec602568..c1c55d433f 100644 --- a/providers/defaults_shared.go +++ b/providers/defaults_shared.go @@ -8,7 +8,7 @@ import ( ) const ( - DefaultOsID = "go.mondoo.com/cnquery/v9/providers/os" + DefaultOsID = "go.mondoo.com/cnquery/v10/providers/os" DeprecatedDefaultOsID = "go.mondoo.com/cnquery/providers/os" // temp to migrate v9 beta users ) diff --git a/providers/equinix/config/config.go b/providers/equinix/config/config.go index abfccce094..52ceb4adab 100644 --- a/providers/equinix/config/config.go +++ b/providers/equinix/config/config.go @@ -4,8 +4,8 @@ package config import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/equinix/provider" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/equinix/provider" ) var Config = plugin.Provider{ diff --git a/providers/equinix/connection/connection.go b/providers/equinix/connection/connection.go index 4ec4ccabdf..c8e0db8bc1 100644 --- a/providers/equinix/connection/connection.go +++ b/providers/equinix/connection/connection.go @@ -9,9 +9,9 @@ import ( "github.com/packethost/packngo" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" ) type ResourceType int diff --git a/providers/equinix/gen/main.go b/providers/equinix/gen/main.go index a0631c4982..69487128d5 100644 --- a/providers/equinix/gen/main.go +++ b/providers/equinix/gen/main.go @@ -4,8 +4,8 @@ package main import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin/gen" - "go.mondoo.com/cnquery/v9/providers/equinix/config" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin/gen" + "go.mondoo.com/cnquery/v10/providers/equinix/config" ) func main() { diff --git a/providers/equinix/go.mod b/providers/equinix/go.mod index 561783e2dc..57772584dd 100644 --- a/providers/equinix/go.mod +++ b/providers/equinix/go.mod @@ -1,6 +1,6 @@ -module go.mondoo.com/cnquery/v9/providers/equinix +module go.mondoo.com/cnquery/v10/providers/equinix -replace go.mondoo.com/cnquery/v9 => ../.. +replace go.mondoo.com/cnquery/v10 => ../.. go 1.21 @@ -9,7 +9,7 @@ toolchain go1.21.3 require ( github.com/packethost/packngo v0.31.0 github.com/rs/zerolog v1.31.0 - go.mondoo.com/cnquery/v9 v9.14.0 + go.mondoo.com/cnquery/v10 v10.0.0 ) require ( diff --git a/providers/equinix/main.go b/providers/equinix/main.go index d1181965c3..00ea8956de 100644 --- a/providers/equinix/main.go +++ b/providers/equinix/main.go @@ -6,8 +6,8 @@ package main import ( "os" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/equinix/provider" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/equinix/provider" ) func main() { diff --git a/providers/equinix/provider/provider.go b/providers/equinix/provider/provider.go index 38c2fee549..983e4b9325 100644 --- a/providers/equinix/provider/provider.go +++ b/providers/equinix/provider/provider.go @@ -9,13 +9,13 @@ import ( "strconv" "strings" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" - "go.mondoo.com/cnquery/v9/providers/equinix/connection" - "go.mondoo.com/cnquery/v9/providers/equinix/resources" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers/equinix/connection" + "go.mondoo.com/cnquery/v10/providers/equinix/resources" ) const ConnectionType = "equinix" diff --git a/providers/equinix/resources/equinix.lr b/providers/equinix/resources/equinix.lr index 746d328f99..4b54a5b654 100644 --- a/providers/equinix/resources/equinix.lr +++ b/providers/equinix/resources/equinix.lr @@ -2,7 +2,7 @@ // SPDX-License-Identifier: BUSL-1.1 option provider = "go.mondoo.com/cnquery/providers/equinix" -option go_package = "go.mondoo.com/cnquery/v9/providers/equinix/resources" +option go_package = "go.mondoo.com/cnquery/v10/providers/equinix/resources" // Equinix Metal project equinix.metal.project @defaults("name") { diff --git a/providers/equinix/resources/equinix.lr.go b/providers/equinix/resources/equinix.lr.go index 99e14145b7..5b11d00487 100644 --- a/providers/equinix/resources/equinix.lr.go +++ b/providers/equinix/resources/equinix.lr.go @@ -9,9 +9,9 @@ import ( "errors" "time" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/types" ) var resourceFactories map[string]plugin.ResourceFactory diff --git a/providers/equinix/resources/organization.go b/providers/equinix/resources/organization.go index 62adda5427..1a94018ae1 100644 --- a/providers/equinix/resources/organization.go +++ b/providers/equinix/resources/organization.go @@ -7,10 +7,10 @@ import ( "errors" "github.com/packethost/packngo" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/equinix/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/equinix/connection" ) func initEquinixMetalOrganization(runtime *plugin.Runtime, args map[string]*llx.RawData) (map[string]*llx.RawData, plugin.Resource, error) { diff --git a/providers/equinix/resources/project.go b/providers/equinix/resources/project.go index c79a7abdd4..7cdb1541b4 100644 --- a/providers/equinix/resources/project.go +++ b/providers/equinix/resources/project.go @@ -6,10 +6,10 @@ package resources import ( "errors" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/equinix/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/equinix/connection" ) func (r *mqlEquinixMetalProject) id() (string, error) { diff --git a/providers/equinix/resources/user.go b/providers/equinix/resources/user.go index f507e38f5b..70fc7d898a 100644 --- a/providers/equinix/resources/user.go +++ b/providers/equinix/resources/user.go @@ -5,8 +5,8 @@ package resources import ( "github.com/packethost/packngo" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" ) func (r *mqlEquinixMetalUser) id() (string, error) { diff --git a/providers/extensible_schema.go b/providers/extensible_schema.go index 7e161b8828..7b257c9812 100644 --- a/providers/extensible_schema.go +++ b/providers/extensible_schema.go @@ -7,7 +7,7 @@ import ( "sync" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/resources" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/resources" "golang.org/x/exp/slices" ) diff --git a/providers/extensible_schema_test.go b/providers/extensible_schema_test.go index 7c195f227a..cd50f39d33 100644 --- a/providers/extensible_schema_test.go +++ b/providers/extensible_schema_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/resources" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/resources" ) func TestExtensibleSchema(t *testing.T) { diff --git a/providers/gcp/config/config.go b/providers/gcp/config/config.go index a07f147954..496746e213 100644 --- a/providers/gcp/config/config.go +++ b/providers/gcp/config/config.go @@ -4,10 +4,10 @@ package config import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/gcp/connection/gcpinstancesnapshot" - "go.mondoo.com/cnquery/v9/providers/gcp/provider" - "go.mondoo.com/cnquery/v9/providers/gcp/resources" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/gcp/connection/gcpinstancesnapshot" + "go.mondoo.com/cnquery/v10/providers/gcp/provider" + "go.mondoo.com/cnquery/v10/providers/gcp/resources" ) var Config = plugin.Provider{ diff --git a/providers/gcp/connection/clients.go b/providers/gcp/connection/clients.go index 23797e8c92..0037b9b79e 100644 --- a/providers/gcp/connection/clients.go +++ b/providers/gcp/connection/clients.go @@ -10,7 +10,7 @@ import ( "github.com/hashicorp/go-cleanhttp" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" "golang.org/x/oauth2" googleoauth "golang.org/x/oauth2/google" "google.golang.org/api/option" diff --git a/providers/gcp/connection/connection.go b/providers/gcp/connection/connection.go index 0c10ed313a..4b9126e657 100644 --- a/providers/gcp/connection/connection.go +++ b/providers/gcp/connection/connection.go @@ -7,10 +7,10 @@ import ( "errors" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" - "go.mondoo.com/cnquery/v9/providers/gcp/connection/shared" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers/gcp/connection/shared" ) const ( diff --git a/providers/gcp/connection/connection_test.go b/providers/gcp/connection/connection_test.go index afee0a35f1..800071f606 100644 --- a/providers/gcp/connection/connection_test.go +++ b/providers/gcp/connection/connection_test.go @@ -10,7 +10,7 @@ import ( "testing" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" ) func TestGcpDiscovery(t *testing.T) { diff --git a/providers/gcp/connection/gcloud_config_test.go b/providers/gcp/connection/gcloud_config_test.go index 75acaf05c6..2bb01c2fdb 100644 --- a/providers/gcp/connection/gcloud_config_test.go +++ b/providers/gcp/connection/gcloud_config_test.go @@ -8,7 +8,7 @@ import ( "os" "testing" - "go.mondoo.com/cnquery/v9/providers/gcp/connection" + "go.mondoo.com/cnquery/v10/providers/gcp/connection" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/providers/gcp/connection/gcpinstancesnapshot/provider.go b/providers/gcp/connection/gcpinstancesnapshot/provider.go index 713a282271..6b943ebb37 100644 --- a/providers/gcp/connection/gcpinstancesnapshot/provider.go +++ b/providers/gcp/connection/gcpinstancesnapshot/provider.go @@ -9,14 +9,14 @@ import ( "github.com/cockroachdb/errors" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/mrn" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/gcp/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/connection/fs" - "go.mondoo.com/cnquery/v9/providers/os/connection/local" - "go.mondoo.com/cnquery/v9/providers/os/connection/snapshot" - "go.mondoo.com/cnquery/v9/providers/os/detector" - "go.mondoo.com/cnquery/v9/providers/os/id/gce" + "go.mondoo.com/cnquery/v10/mrn" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/gcp/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/fs" + "go.mondoo.com/cnquery/v10/providers/os/connection/local" + "go.mondoo.com/cnquery/v10/providers/os/connection/snapshot" + "go.mondoo.com/cnquery/v10/providers/os/detector" + "go.mondoo.com/cnquery/v10/providers/os/id/gce" "go.mondoo.com/ranger-rpc/codes" "go.mondoo.com/ranger-rpc/status" ) diff --git a/providers/gcp/connection/gcpinstancesnapshot/snapshot.go b/providers/gcp/connection/gcpinstancesnapshot/snapshot.go index 925b3cc659..bddd5bb5e0 100644 --- a/providers/gcp/connection/gcpinstancesnapshot/snapshot.go +++ b/providers/gcp/connection/gcpinstancesnapshot/snapshot.go @@ -12,7 +12,7 @@ import ( "time" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers/os/id/gce" + "go.mondoo.com/cnquery/v10/providers/os/id/gce" "go.mondoo.com/ranger-rpc/codes" "go.mondoo.com/ranger-rpc/status" googleoauth "golang.org/x/oauth2/google" diff --git a/providers/gcp/connection/platform.go b/providers/gcp/connection/platform.go index 9513ca755f..4f2fb86fe5 100644 --- a/providers/gcp/connection/platform.go +++ b/providers/gcp/connection/platform.go @@ -7,7 +7,7 @@ import ( "errors" "fmt" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" ) func NewOrganizationPlatformID(id string) string { diff --git a/providers/gcp/connection/shared/shared.go b/providers/gcp/connection/shared/shared.go index a7932e7a3e..528b5dc9c6 100644 --- a/providers/gcp/connection/shared/shared.go +++ b/providers/gcp/connection/shared/shared.go @@ -4,7 +4,7 @@ package shared import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" ) type ConnectionType string diff --git a/providers/gcp/gen/main.go b/providers/gcp/gen/main.go index 5a818baca7..2638c6f266 100644 --- a/providers/gcp/gen/main.go +++ b/providers/gcp/gen/main.go @@ -4,8 +4,8 @@ package main import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin/gen" - "go.mondoo.com/cnquery/v9/providers/gcp/config" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin/gen" + "go.mondoo.com/cnquery/v10/providers/gcp/config" ) func main() { diff --git a/providers/gcp/go.mod b/providers/gcp/go.mod index 2c36f4869f..9c242686de 100644 --- a/providers/gcp/go.mod +++ b/providers/gcp/go.mod @@ -1,6 +1,6 @@ -module go.mondoo.com/cnquery/v9/providers/gcp +module go.mondoo.com/cnquery/v10/providers/gcp -replace go.mondoo.com/cnquery/v9 => ../.. +replace go.mondoo.com/cnquery/v10 => ../.. go 1.21 @@ -27,7 +27,7 @@ require ( github.com/hashicorp/go-cleanhttp v0.5.2 github.com/rs/zerolog v1.31.0 github.com/stretchr/testify v1.8.4 - go.mondoo.com/cnquery/v9 v9.14.0 + go.mondoo.com/cnquery/v10 v10.0.0 go.mondoo.com/ranger-rpc v0.5.3 golang.org/x/oauth2 v0.16.0 google.golang.org/api v0.156.0 diff --git a/providers/gcp/main.go b/providers/gcp/main.go index 8facc96adc..228100da30 100644 --- a/providers/gcp/main.go +++ b/providers/gcp/main.go @@ -6,8 +6,8 @@ package main import ( "os" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/gcp/provider" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/gcp/provider" ) func main() { diff --git a/providers/gcp/provider/provider.go b/providers/gcp/provider/provider.go index 3df74e74a3..d16431d128 100644 --- a/providers/gcp/provider/provider.go +++ b/providers/gcp/provider/provider.go @@ -9,16 +9,16 @@ import ( "strconv" "strings" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" - - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream" - "go.mondoo.com/cnquery/v9/providers/gcp/connection" - "go.mondoo.com/cnquery/v9/providers/gcp/connection/gcpinstancesnapshot" - "go.mondoo.com/cnquery/v9/providers/gcp/connection/shared" - "go.mondoo.com/cnquery/v9/providers/gcp/resources" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" + + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream" + "go.mondoo.com/cnquery/v10/providers/gcp/connection" + "go.mondoo.com/cnquery/v10/providers/gcp/connection/gcpinstancesnapshot" + "go.mondoo.com/cnquery/v10/providers/gcp/connection/shared" + "go.mondoo.com/cnquery/v10/providers/gcp/resources" ) const ( diff --git a/providers/gcp/resources/access_approval.go b/providers/gcp/resources/access_approval.go index 7f004de584..76c158076a 100644 --- a/providers/gcp/resources/access_approval.go +++ b/providers/gcp/resources/access_approval.go @@ -7,11 +7,11 @@ import ( "context" "fmt" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/gcp/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/gcp/connection" + "go.mondoo.com/cnquery/v10/types" accessapproval "cloud.google.com/go/accessapproval/apiv1" accessapprovalpb "cloud.google.com/go/accessapproval/apiv1/accessapprovalpb" diff --git a/providers/gcp/resources/apikeys.go b/providers/gcp/resources/apikeys.go index 5b7ecc71c2..b58eacc3f8 100644 --- a/providers/gcp/resources/apikeys.go +++ b/providers/gcp/resources/apikeys.go @@ -7,11 +7,11 @@ import ( "context" "fmt" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/gcp/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/gcp/connection" + "go.mondoo.com/cnquery/v10/types" "google.golang.org/api/apikeys/v2" "google.golang.org/api/option" diff --git a/providers/gcp/resources/bigquery.go b/providers/gcp/resources/bigquery.go index 718bfff22b..b57a50ab0d 100644 --- a/providers/gcp/resources/bigquery.go +++ b/providers/gcp/resources/bigquery.go @@ -9,11 +9,11 @@ import ( "fmt" "time" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/gcp/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/gcp/connection" + "go.mondoo.com/cnquery/v10/types" "cloud.google.com/go/bigquery" "google.golang.org/api/iterator" diff --git a/providers/gcp/resources/cloud_functions.go b/providers/gcp/resources/cloud_functions.go index 1576ee4160..2139d204be 100644 --- a/providers/gcp/resources/cloud_functions.go +++ b/providers/gcp/resources/cloud_functions.go @@ -7,13 +7,13 @@ import ( "context" "fmt" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/gcp/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/gcp/connection" + "go.mondoo.com/cnquery/v10/types" functions "cloud.google.com/go/functions/apiv1" "cloud.google.com/go/functions/apiv1/functionspb" - "go.mondoo.com/cnquery/v9/llx" + "go.mondoo.com/cnquery/v10/llx" "google.golang.org/api/iterator" "google.golang.org/api/option" ) diff --git a/providers/gcp/resources/cloudrun.go b/providers/gcp/resources/cloudrun.go index 4c9ab06893..5376bc0899 100644 --- a/providers/gcp/resources/cloudrun.go +++ b/providers/gcp/resources/cloudrun.go @@ -8,16 +8,16 @@ import ( "fmt" "sync" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/gcp/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/gcp/connection" + "go.mondoo.com/cnquery/v10/types" "cloud.google.com/go/longrunning/autogen/longrunningpb" run "cloud.google.com/go/run/apiv2" runpb "cloud.google.com/go/run/apiv2/runpb" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" + "go.mondoo.com/cnquery/v10/llx" "google.golang.org/api/compute/v1" "google.golang.org/api/iterator" "google.golang.org/api/option" diff --git a/providers/gcp/resources/common.go b/providers/gcp/resources/common.go index 24a95a34bc..7c8892df4b 100644 --- a/providers/gcp/resources/common.go +++ b/providers/gcp/resources/common.go @@ -7,9 +7,9 @@ import ( "strings" "time" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/gcp/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/gcp/connection" "google.golang.org/protobuf/types/known/timestamppb" ) diff --git a/providers/gcp/resources/compute.go b/providers/gcp/resources/compute.go index 5665d6c5ba..b2d0bdb5d1 100644 --- a/providers/gcp/resources/compute.go +++ b/providers/gcp/resources/compute.go @@ -17,11 +17,11 @@ import ( computev1 "cloud.google.com/go/compute/apiv1" "cloud.google.com/go/compute/apiv1/computepb" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/gcp/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/gcp/connection" + "go.mondoo.com/cnquery/v10/types" "google.golang.org/api/cloudresourcemanager/v3" "google.golang.org/api/compute/v1" "google.golang.org/api/iam/v1" diff --git a/providers/gcp/resources/dataproc.go b/providers/gcp/resources/dataproc.go index f821e04e3f..57708eedc2 100644 --- a/providers/gcp/resources/dataproc.go +++ b/providers/gcp/resources/dataproc.go @@ -9,11 +9,11 @@ import ( "sync" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/gcp/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/gcp/connection" + "go.mondoo.com/cnquery/v10/types" "google.golang.org/api/compute/v1" dataproc "google.golang.org/api/dataproc/v1" "google.golang.org/api/option" diff --git a/providers/gcp/resources/discovery.go b/providers/gcp/resources/discovery.go index 544542479c..bfcc34d7f6 100644 --- a/providers/gcp/resources/discovery.go +++ b/providers/gcp/resources/discovery.go @@ -10,10 +10,10 @@ import ( "github.com/google/go-containerregistry/pkg/name" "github.com/google/go-containerregistry/pkg/v1/google" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/gcp/connection" - "go.mondoo.com/cnquery/v9/utils/stringx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/gcp/connection" + "go.mondoo.com/cnquery/v10/utils/stringx" "google.golang.org/api/cloudresourcemanager/v3" ) diff --git a/providers/gcp/resources/dns.go b/providers/gcp/resources/dns.go index 05f960d6f1..4c1c4ba159 100644 --- a/providers/gcp/resources/dns.go +++ b/providers/gcp/resources/dns.go @@ -8,11 +8,11 @@ import ( "strconv" "strings" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/gcp/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/gcp/connection" + "go.mondoo.com/cnquery/v10/types" "google.golang.org/api/dns/v1" "google.golang.org/api/option" diff --git a/providers/gcp/resources/essential_contacts.go b/providers/gcp/resources/essential_contacts.go index 64fcf00a07..e3f459e749 100644 --- a/providers/gcp/resources/essential_contacts.go +++ b/providers/gcp/resources/essential_contacts.go @@ -6,10 +6,10 @@ package resources import ( "context" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/gcp/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/gcp/connection" + "go.mondoo.com/cnquery/v10/types" "google.golang.org/api/essentialcontacts/v1" "google.golang.org/api/option" diff --git a/providers/gcp/resources/folder.go b/providers/gcp/resources/folder.go index 9d61b360c1..a14073fb3d 100644 --- a/providers/gcp/resources/folder.go +++ b/providers/gcp/resources/folder.go @@ -7,9 +7,9 @@ import ( "context" "fmt" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/gcp/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/gcp/connection" "google.golang.org/api/cloudresourcemanager/v3" "google.golang.org/api/compute/v1" "google.golang.org/api/iam/v1" diff --git a/providers/gcp/resources/gcp.lr b/providers/gcp/resources/gcp.lr index ea7d7917ba..3c3d1a97df 100644 --- a/providers/gcp/resources/gcp.lr +++ b/providers/gcp/resources/gcp.lr @@ -2,7 +2,7 @@ // SPDX-License-Identifier: BUSL-1.1 option provider = "go.mondoo.com/cnquery/providers/gcp" -option go_package = "go.mondoo.com/cnquery/v9/providers/gcp/resources" +option go_package = "go.mondoo.com/cnquery/v10/providers/gcp/resources" alias gcloud.organization = gcp.organization alias gcloud.project = gcp.project diff --git a/providers/gcp/resources/gcp.lr.go b/providers/gcp/resources/gcp.lr.go index 1b256b9d9b..acbf6c136d 100644 --- a/providers/gcp/resources/gcp.lr.go +++ b/providers/gcp/resources/gcp.lr.go @@ -9,9 +9,9 @@ import ( "errors" "time" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/types" ) var resourceFactories map[string]plugin.ResourceFactory diff --git a/providers/gcp/resources/gke.go b/providers/gcp/resources/gke.go index 0755de8575..96ca81afed 100644 --- a/providers/gcp/resources/gke.go +++ b/providers/gcp/resources/gke.go @@ -8,11 +8,11 @@ import ( "fmt" "strings" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/gcp/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/gcp/connection" + "go.mondoo.com/cnquery/v10/types" container "cloud.google.com/go/container/apiv1" "cloud.google.com/go/container/apiv1/containerpb" diff --git a/providers/gcp/resources/iam.go b/providers/gcp/resources/iam.go index 77f6dc11bd..c7b95db985 100644 --- a/providers/gcp/resources/iam.go +++ b/providers/gcp/resources/iam.go @@ -7,9 +7,9 @@ import ( "context" "fmt" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/gcp/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/gcp/connection" admin "cloud.google.com/go/iam/admin/apiv1" "google.golang.org/api/iterator" diff --git a/providers/gcp/resources/kms.go b/providers/gcp/resources/kms.go index 8f770a309f..6dfda1f89e 100644 --- a/providers/gcp/resources/kms.go +++ b/providers/gcp/resources/kms.go @@ -10,15 +10,15 @@ import ( "sync" "time" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/gcp/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/gcp/connection" + "go.mondoo.com/cnquery/v10/types" kms "cloud.google.com/go/kms/apiv1" "cloud.google.com/go/kms/apiv1/kmspb" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" + "go.mondoo.com/cnquery/v10/llx" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/genproto/googleapis/cloud/location" diff --git a/providers/gcp/resources/logging.go b/providers/gcp/resources/logging.go index a42569414f..069b9223d5 100644 --- a/providers/gcp/resources/logging.go +++ b/providers/gcp/resources/logging.go @@ -8,11 +8,11 @@ import ( "fmt" "strings" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/gcp/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/gcp/connection" + "go.mondoo.com/cnquery/v10/types" "cloud.google.com/go/logging/logadmin" "google.golang.org/api/iterator" diff --git a/providers/gcp/resources/monitoring.go b/providers/gcp/resources/monitoring.go index 0b18454378..5bb54435d4 100644 --- a/providers/gcp/resources/monitoring.go +++ b/providers/gcp/resources/monitoring.go @@ -7,15 +7,15 @@ import ( "context" "fmt" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/gcp/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/gcp/connection" + "go.mondoo.com/cnquery/v10/types" kms "cloud.google.com/go/kms/apiv1" monitoring "cloud.google.com/go/monitoring/apiv3/v2" monitoringpb "cloud.google.com/go/monitoring/apiv3/v2/monitoringpb" - "go.mondoo.com/cnquery/v9/llx" + "go.mondoo.com/cnquery/v10/llx" "google.golang.org/api/iterator" "google.golang.org/api/option" ) diff --git a/providers/gcp/resources/organization.go b/providers/gcp/resources/organization.go index a3b11d34da..cdaff2340c 100644 --- a/providers/gcp/resources/organization.go +++ b/providers/gcp/resources/organization.go @@ -8,11 +8,11 @@ import ( "errors" "strconv" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/gcp/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/gcp/connection" + "go.mondoo.com/cnquery/v10/types" "github.com/rs/zerolog/log" "google.golang.org/api/cloudresourcemanager/v3" diff --git a/providers/gcp/resources/project.go b/providers/gcp/resources/project.go index 40590c65dd..9dc952db2e 100644 --- a/providers/gcp/resources/project.go +++ b/providers/gcp/resources/project.go @@ -11,11 +11,11 @@ import ( "strings" "time" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/gcp/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/gcp/connection" + "go.mondoo.com/cnquery/v10/types" "google.golang.org/api/cloudresourcemanager/v3" "google.golang.org/api/compute/v1" diff --git a/providers/gcp/resources/pubsub.go b/providers/gcp/resources/pubsub.go index a8dd7c8f2e..d5f1a96abc 100644 --- a/providers/gcp/resources/pubsub.go +++ b/providers/gcp/resources/pubsub.go @@ -9,11 +9,11 @@ import ( "time" "cloud.google.com/go/pubsub" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/gcp/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/gcp/connection" + "go.mondoo.com/cnquery/v10/types" "google.golang.org/api/iterator" "google.golang.org/api/option" ) diff --git a/providers/gcp/resources/recommendations.go b/providers/gcp/resources/recommendations.go index d2898b9537..c8800bc61e 100644 --- a/providers/gcp/resources/recommendations.go +++ b/providers/gcp/resources/recommendations.go @@ -9,10 +9,10 @@ import ( "strings" "sync" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/gcp/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/gcp/connection" "google.golang.org/api/cloudresourcemanager/v1" diff --git a/providers/gcp/resources/services.go b/providers/gcp/resources/services.go index 3f1a64d5bc..29e748e710 100644 --- a/providers/gcp/resources/services.go +++ b/providers/gcp/resources/services.go @@ -7,9 +7,9 @@ import ( "context" "strings" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/gcp/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/gcp/connection" serviceusage "cloud.google.com/go/serviceusage/apiv1" "cloud.google.com/go/serviceusage/apiv1/serviceusagepb" diff --git a/providers/gcp/resources/sql.go b/providers/gcp/resources/sql.go index a82e9dca1f..ca15587289 100644 --- a/providers/gcp/resources/sql.go +++ b/providers/gcp/resources/sql.go @@ -7,11 +7,11 @@ import ( "context" "fmt" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/gcp/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/gcp/connection" + "go.mondoo.com/cnquery/v10/types" "google.golang.org/api/cloudresourcemanager/v1" "google.golang.org/api/iam/v1" diff --git a/providers/gcp/resources/storage.go b/providers/gcp/resources/storage.go index 394fb2b20d..c7686ce6c9 100644 --- a/providers/gcp/resources/storage.go +++ b/providers/gcp/resources/storage.go @@ -9,11 +9,11 @@ import ( "strconv" "time" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/gcp/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/gcp/connection" + "go.mondoo.com/cnquery/v10/types" "google.golang.org/api/cloudresourcemanager/v3" "google.golang.org/api/iam/v1" diff --git a/providers/github/config/config.go b/providers/github/config/config.go index 1f78bffe50..e3acbe41b1 100644 --- a/providers/github/config/config.go +++ b/providers/github/config/config.go @@ -4,8 +4,8 @@ package config import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/github/provider" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/github/provider" ) var Config = plugin.Provider{ diff --git a/providers/github/connection/connection.go b/providers/github/connection/connection.go index 8f91cda080..262f5726c8 100644 --- a/providers/github/connection/connection.go +++ b/providers/github/connection/connection.go @@ -11,8 +11,8 @@ import ( "github.com/cockroachdb/errors" "github.com/google/go-github/v57/github" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" "golang.org/x/oauth2" ) diff --git a/providers/github/connection/connection_test.go b/providers/github/connection/connection_test.go index 6943b3f39b..1004c7563e 100644 --- a/providers/github/connection/connection_test.go +++ b/providers/github/connection/connection_test.go @@ -13,7 +13,7 @@ import ( "github.com/google/go-github/v57/github" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" ) func TestGithub(t *testing.T) { diff --git a/providers/github/connection/platform.go b/providers/github/connection/platform.go index f3f2917d18..19f12bde4a 100644 --- a/providers/github/connection/platform.go +++ b/providers/github/connection/platform.go @@ -8,7 +8,7 @@ import ( "github.com/cockroachdb/errors" "github.com/google/go-github/v57/github" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" ) const ( diff --git a/providers/github/gen/main.go b/providers/github/gen/main.go index 8e4d487359..8052824c48 100644 --- a/providers/github/gen/main.go +++ b/providers/github/gen/main.go @@ -4,8 +4,8 @@ package main import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin/gen" - "go.mondoo.com/cnquery/v9/providers/github/config" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin/gen" + "go.mondoo.com/cnquery/v10/providers/github/config" ) func main() { diff --git a/providers/github/go.mod b/providers/github/go.mod index 7b50e2ad66..c833d58cf7 100644 --- a/providers/github/go.mod +++ b/providers/github/go.mod @@ -1,6 +1,6 @@ -module go.mondoo.com/cnquery/v9/providers/github +module go.mondoo.com/cnquery/v10/providers/github -replace go.mondoo.com/cnquery/v9 => ../.. +replace go.mondoo.com/cnquery/v10 => ../.. go 1.21 @@ -11,7 +11,7 @@ require ( github.com/google/go-github/v57 v57.0.0 github.com/rs/zerolog v1.31.0 github.com/stretchr/testify v1.8.4 - go.mondoo.com/cnquery/v9 v9.14.0 + go.mondoo.com/cnquery/v10 v10.0.0 go.mondoo.com/ranger-rpc v0.5.3 golang.org/x/oauth2 v0.16.0 sigs.k8s.io/yaml v1.4.0 diff --git a/providers/github/main.go b/providers/github/main.go index e3e805885f..2cf362646a 100644 --- a/providers/github/main.go +++ b/providers/github/main.go @@ -6,8 +6,8 @@ package main import ( "os" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/github/provider" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/github/provider" ) func main() { diff --git a/providers/github/provider/provider.go b/providers/github/provider/provider.go index 76fcdbe877..ece6fa3bb7 100644 --- a/providers/github/provider/provider.go +++ b/providers/github/provider/provider.go @@ -9,13 +9,13 @@ import ( "strconv" "strings" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" - "go.mondoo.com/cnquery/v9/providers/github/connection" - "go.mondoo.com/cnquery/v9/providers/github/resources" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers/github/connection" + "go.mondoo.com/cnquery/v10/providers/github/resources" ) const ConnectionType = "github" diff --git a/providers/github/resources/discovery.go b/providers/github/resources/discovery.go index cfc561eb00..74b1fa8156 100644 --- a/providers/github/resources/discovery.go +++ b/providers/github/resources/discovery.go @@ -4,11 +4,11 @@ package resources import ( - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/github/connection" - "go.mondoo.com/cnquery/v9/utils/stringx" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/github/connection" + "go.mondoo.com/cnquery/v10/utils/stringx" ) func Discover(runtime *plugin.Runtime, opts map[string]string) (*inventory.Inventory, error) { diff --git a/providers/github/resources/git.go b/providers/github/resources/git.go index ed6de6f630..86aaa4c332 100644 --- a/providers/github/resources/git.go +++ b/providers/github/resources/git.go @@ -5,8 +5,8 @@ package resources import ( "github.com/google/go-github/v57/github" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" ) func (g *mqlGitGpgSignature) id() (string, error) { diff --git a/providers/github/resources/github.lr b/providers/github/resources/github.lr index 1c8ecabb4d..55243fe909 100644 --- a/providers/github/resources/github.lr +++ b/providers/github/resources/github.lr @@ -2,7 +2,7 @@ // SPDX-License-Identifier: BUSL-1.1 option provider = "go.mondoo.com/cnquery/providers/github" -option go_package = "go.mondoo.com/cnquery/v9/providers/github/resources" +option go_package = "go.mondoo.com/cnquery/v10/providers/github/resources" // Git commit private git.commit @defaults("sha") { diff --git a/providers/github/resources/github.lr.go b/providers/github/resources/github.lr.go index 388fbe1bd5..88fe39dccd 100644 --- a/providers/github/resources/github.lr.go +++ b/providers/github/resources/github.lr.go @@ -9,9 +9,9 @@ import ( "errors" "time" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/types" ) var resourceFactories map[string]plugin.ResourceFactory diff --git a/providers/github/resources/github_org.go b/providers/github/resources/github_org.go index bedfc69f21..137867a06f 100644 --- a/providers/github/resources/github_org.go +++ b/providers/github/resources/github_org.go @@ -10,11 +10,11 @@ import ( "strings" "github.com/google/go-github/v57/github" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/github/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/github/connection" + "go.mondoo.com/cnquery/v10/types" ) func (g *mqlGithubOrganization) id() (string, error) { diff --git a/providers/github/resources/github_repo.go b/providers/github/resources/github_repo.go index 3ac7b0bb30..fd668a1eb0 100644 --- a/providers/github/resources/github_repo.go +++ b/providers/github/resources/github_repo.go @@ -11,11 +11,11 @@ import ( "github.com/google/go-github/v57/github" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/github/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/github/connection" + "go.mondoo.com/cnquery/v10/types" ) func newMqlGithubRepository(runtime *plugin.Runtime, repo *github.Repository) (*mqlGithubRepository, error) { diff --git a/providers/github/resources/github_team.go b/providers/github/resources/github_team.go index 2c0cc2299f..b0df06ca17 100644 --- a/providers/github/resources/github_team.go +++ b/providers/github/resources/github_team.go @@ -10,8 +10,8 @@ import ( "strings" "github.com/google/go-github/v57/github" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers/github/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers/github/connection" ) func (g *mqlGithubTeam) id() (string, error) { diff --git a/providers/github/resources/github_test.go b/providers/github/resources/github_test.go index 8749203b5b..26de979f2d 100644 --- a/providers/github/resources/github_test.go +++ b/providers/github/resources/github_test.go @@ -10,9 +10,9 @@ import ( "testing" "github.com/stretchr/testify/assert" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/testutils" - "go.mondoo.com/cnquery/v9/providers/github" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/testutils" + "go.mondoo.com/cnquery/v10/providers/github" ) var x = testutils.InitTester(GithubProvider(), github.Registry) diff --git a/providers/github/resources/github_user.go b/providers/github/resources/github_user.go index 023b823b71..27ec846a39 100644 --- a/providers/github/resources/github_user.go +++ b/providers/github/resources/github_user.go @@ -11,11 +11,11 @@ import ( "github.com/cockroachdb/errors" "github.com/google/go-github/v57/github" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/github/connection" - "go.mondoo.com/cnquery/v9/types" - "go.mondoo.com/cnquery/v9/utils/stringx" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/github/connection" + "go.mondoo.com/cnquery/v10/types" + "go.mondoo.com/cnquery/v10/utils/stringx" "go.mondoo.com/ranger-rpc" ) diff --git a/providers/github/resources/github_workflow.go b/providers/github/resources/github_workflow.go index 1dd2ce56f9..2b43de129b 100644 --- a/providers/github/resources/github_workflow.go +++ b/providers/github/resources/github_workflow.go @@ -10,8 +10,8 @@ import ( "strings" "github.com/google/go-github/v57/github" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/github/connection" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/github/connection" "sigs.k8s.io/yaml" ) diff --git a/providers/gitlab/config/config.go b/providers/gitlab/config/config.go index 3deb05eb1e..81c602e2f6 100644 --- a/providers/gitlab/config/config.go +++ b/providers/gitlab/config/config.go @@ -4,8 +4,8 @@ package config import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/gitlab/provider" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/gitlab/provider" ) var Config = plugin.Provider{ diff --git a/providers/gitlab/connection/connection.go b/providers/gitlab/connection/connection.go index 61790eb078..3e3edadf71 100644 --- a/providers/gitlab/connection/connection.go +++ b/providers/gitlab/connection/connection.go @@ -12,8 +12,8 @@ import ( "github.com/rs/zerolog/log" "github.com/xanzy/go-gitlab" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" ) type GitLabConnection struct { diff --git a/providers/gitlab/connection/connection_test.go b/providers/gitlab/connection/connection_test.go index c4075879ff..da07c8ffe2 100644 --- a/providers/gitlab/connection/connection_test.go +++ b/providers/gitlab/connection/connection_test.go @@ -12,7 +12,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" ) func TestGitlab(t *testing.T) { diff --git a/providers/gitlab/gen/main.go b/providers/gitlab/gen/main.go index 74d6880775..aa0793bff9 100644 --- a/providers/gitlab/gen/main.go +++ b/providers/gitlab/gen/main.go @@ -4,8 +4,8 @@ package main import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin/gen" - "go.mondoo.com/cnquery/v9/providers/gitlab/config" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin/gen" + "go.mondoo.com/cnquery/v10/providers/gitlab/config" ) func main() { diff --git a/providers/gitlab/go.mod b/providers/gitlab/go.mod index e350664af4..9539b9fc3e 100644 --- a/providers/gitlab/go.mod +++ b/providers/gitlab/go.mod @@ -1,6 +1,6 @@ -module go.mondoo.com/cnquery/v9/providers/gitlab +module go.mondoo.com/cnquery/v10/providers/gitlab -replace go.mondoo.com/cnquery/v9 => ../.. +replace go.mondoo.com/cnquery/v10 => ../.. go 1.21 @@ -8,7 +8,7 @@ require ( github.com/rs/zerolog v1.31.0 github.com/stretchr/testify v1.8.4 github.com/xanzy/go-gitlab v0.95.2 - go.mondoo.com/cnquery/v9 v9.14.0 + go.mondoo.com/cnquery/v10 v10.0.0 golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3 google.golang.org/protobuf v1.32.0 ) diff --git a/providers/gitlab/main.go b/providers/gitlab/main.go index e6a41b9857..ba651fa170 100644 --- a/providers/gitlab/main.go +++ b/providers/gitlab/main.go @@ -6,8 +6,8 @@ package main import ( "os" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/gitlab/provider" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/gitlab/provider" ) func main() { diff --git a/providers/gitlab/provider/discovery.go b/providers/gitlab/provider/discovery.go index b9aa8cb339..6ecfe97eae 100644 --- a/providers/gitlab/provider/discovery.go +++ b/providers/gitlab/provider/discovery.go @@ -9,9 +9,9 @@ import ( "github.com/rs/zerolog/log" "github.com/xanzy/go-gitlab" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" - "go.mondoo.com/cnquery/v9/providers/gitlab/connection" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers/gitlab/connection" "golang.org/x/exp/slices" "google.golang.org/protobuf/proto" ) diff --git a/providers/gitlab/provider/provider.go b/providers/gitlab/provider/provider.go index 525649111d..18e6bc0f3b 100644 --- a/providers/gitlab/provider/provider.go +++ b/providers/gitlab/provider/provider.go @@ -10,13 +10,13 @@ import ( "strings" "github.com/xanzy/go-gitlab" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" - "go.mondoo.com/cnquery/v9/providers/gitlab/connection" - "go.mondoo.com/cnquery/v9/providers/gitlab/resources" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers/gitlab/connection" + "go.mondoo.com/cnquery/v10/providers/gitlab/resources" ) const ( diff --git a/providers/gitlab/resources/gitlab.go b/providers/gitlab/resources/gitlab.go index 813f124328..8c2ebcc887 100644 --- a/providers/gitlab/resources/gitlab.go +++ b/providers/gitlab/resources/gitlab.go @@ -7,9 +7,9 @@ import ( "strconv" "github.com/xanzy/go-gitlab" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/gitlab/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/gitlab/connection" ) func (g *mqlGitlabGroup) id() (string, error) { diff --git a/providers/gitlab/resources/gitlab.lr b/providers/gitlab/resources/gitlab.lr index e8a73d62fb..b0f6befc78 100644 --- a/providers/gitlab/resources/gitlab.lr +++ b/providers/gitlab/resources/gitlab.lr @@ -2,7 +2,7 @@ // SPDX-License-Identifier: BUSL-1.1 option provider = "go.mondoo.com/cnquery/providers/gitlab" -option go_package = "go.mondoo.com/cnquery/v9/providers/gitlab/resources" +option go_package = "go.mondoo.com/cnquery/v10/providers/gitlab/resources" // GitLab group gitlab.group @defaults("name visibility webURL") { diff --git a/providers/gitlab/resources/gitlab.lr.go b/providers/gitlab/resources/gitlab.lr.go index 0f9964f610..1e09c9fcbe 100644 --- a/providers/gitlab/resources/gitlab.lr.go +++ b/providers/gitlab/resources/gitlab.lr.go @@ -9,9 +9,9 @@ import ( "errors" "time" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/types" ) var resourceFactories map[string]plugin.ResourceFactory diff --git a/providers/google-workspace/config/config.go b/providers/google-workspace/config/config.go index cf80cb81f9..1af0227933 100644 --- a/providers/google-workspace/config/config.go +++ b/providers/google-workspace/config/config.go @@ -4,8 +4,8 @@ package config import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/google-workspace/provider" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/google-workspace/provider" ) var Config = plugin.Provider{ diff --git a/providers/google-workspace/connection/connection.go b/providers/google-workspace/connection/connection.go index 948efdbee0..9fef896341 100644 --- a/providers/google-workspace/connection/connection.go +++ b/providers/google-workspace/connection/connection.go @@ -7,8 +7,8 @@ import ( "errors" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" ) type GoogleWorkspaceConnection struct { diff --git a/providers/google-workspace/connection/workspace.go b/providers/google-workspace/connection/workspace.go index 48d99bc503..711e6103b1 100644 --- a/providers/google-workspace/connection/workspace.go +++ b/providers/google-workspace/connection/workspace.go @@ -10,7 +10,7 @@ import ( "github.com/hashicorp/go-cleanhttp" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" "golang.org/x/oauth2" googleoauth "golang.org/x/oauth2/google" directory "google.golang.org/api/admin/directory/v1" diff --git a/providers/google-workspace/gen/main.go b/providers/google-workspace/gen/main.go index 3faffc8f9a..c92f5fb1e5 100644 --- a/providers/google-workspace/gen/main.go +++ b/providers/google-workspace/gen/main.go @@ -4,8 +4,8 @@ package main import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin/gen" - "go.mondoo.com/cnquery/v9/providers/google-workspace/config" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin/gen" + "go.mondoo.com/cnquery/v10/providers/google-workspace/config" ) func main() { diff --git a/providers/google-workspace/go.mod b/providers/google-workspace/go.mod index d8b6ad2871..36d9c3c252 100644 --- a/providers/google-workspace/go.mod +++ b/providers/google-workspace/go.mod @@ -1,6 +1,6 @@ -module go.mondoo.com/cnquery/v9/providers/google-workspace +module go.mondoo.com/cnquery/v10/providers/google-workspace -replace go.mondoo.com/cnquery/v9 => ../.. +replace go.mondoo.com/cnquery/v10 => ../.. go 1.21 @@ -8,7 +8,7 @@ require ( github.com/hashicorp/go-cleanhttp v0.5.2 github.com/rs/zerolog v1.31.0 github.com/stretchr/testify v1.8.4 - go.mondoo.com/cnquery/v9 v9.14.0 + go.mondoo.com/cnquery/v10 v10.0.0 golang.org/x/oauth2 v0.16.0 google.golang.org/api v0.156.0 ) diff --git a/providers/google-workspace/main.go b/providers/google-workspace/main.go index 0c4d6a4da3..180dba11b7 100644 --- a/providers/google-workspace/main.go +++ b/providers/google-workspace/main.go @@ -6,8 +6,8 @@ package main import ( "os" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/google-workspace/provider" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/google-workspace/provider" ) func main() { diff --git a/providers/google-workspace/provider/provider.go b/providers/google-workspace/provider/provider.go index a8f5e4724d..94324ddbf2 100644 --- a/providers/google-workspace/provider/provider.go +++ b/providers/google-workspace/provider/provider.go @@ -10,13 +10,13 @@ import ( "strings" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" - "go.mondoo.com/cnquery/v9/providers/google-workspace/connection" - "go.mondoo.com/cnquery/v9/providers/google-workspace/resources" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers/google-workspace/connection" + "go.mondoo.com/cnquery/v10/providers/google-workspace/resources" ) const ConnectionType = "google-workspace" diff --git a/providers/google-workspace/resources/connected_apps.go b/providers/google-workspace/resources/connected_apps.go index bd571f941a..a3f1576e51 100644 --- a/providers/google-workspace/resources/connected_apps.go +++ b/providers/google-workspace/resources/connected_apps.go @@ -4,10 +4,10 @@ package resources import ( - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/types" - "go.mondoo.com/cnquery/v9/utils/stringx" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/types" + "go.mondoo.com/cnquery/v10/utils/stringx" ) type connectedApp struct { diff --git a/providers/google-workspace/resources/domain.go b/providers/google-workspace/resources/domain.go index a5679b5d86..01c57ad7a5 100644 --- a/providers/google-workspace/resources/domain.go +++ b/providers/google-workspace/resources/domain.go @@ -6,9 +6,9 @@ package resources import ( "time" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/google-workspace/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/google-workspace/connection" directory "google.golang.org/api/admin/directory/v1" ) diff --git a/providers/google-workspace/resources/google-workspace.go b/providers/google-workspace/resources/google-workspace.go index 0f75883690..b80f8e5941 100644 --- a/providers/google-workspace/resources/google-workspace.go +++ b/providers/google-workspace/resources/google-workspace.go @@ -6,7 +6,7 @@ package resources import ( "context" - "go.mondoo.com/cnquery/v9/providers/google-workspace/connection" + "go.mondoo.com/cnquery/v10/providers/google-workspace/connection" directory "google.golang.org/api/admin/directory/v1" reports "google.golang.org/api/admin/reports/v1" cloudidentity "google.golang.org/api/cloudidentity/v1" diff --git a/providers/google-workspace/resources/google-workspace.lr b/providers/google-workspace/resources/google-workspace.lr index ab03d9edfa..192d482750 100644 --- a/providers/google-workspace/resources/google-workspace.lr +++ b/providers/google-workspace/resources/google-workspace.lr @@ -2,7 +2,7 @@ // SPDX-License-Identifier: BUSL-1.1 option provider = "go.mondoo.com/cnquery/providers/google-workspace" -option go_package = "go.mondoo.com/cnquery/v9/providers/google-workspace/resources" +option go_package = "go.mondoo.com/cnquery/v10/providers/google-workspace/resources" // Google Workspace googleworkspace { diff --git a/providers/google-workspace/resources/google-workspace.lr.go b/providers/google-workspace/resources/google-workspace.lr.go index fc6016f484..5875b4d694 100644 --- a/providers/google-workspace/resources/google-workspace.lr.go +++ b/providers/google-workspace/resources/google-workspace.lr.go @@ -9,9 +9,9 @@ import ( "errors" "time" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/types" ) var resourceFactories map[string]plugin.ResourceFactory diff --git a/providers/google-workspace/resources/googleworkspace_test.go b/providers/google-workspace/resources/googleworkspace_test.go index 76190b6245..416cbb68e6 100644 --- a/providers/google-workspace/resources/googleworkspace_test.go +++ b/providers/google-workspace/resources/googleworkspace_test.go @@ -10,8 +10,8 @@ import ( "testing" "github.com/stretchr/testify/assert" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/testutils" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/testutils" ) var x = testutils.InitTester(googleWorkspaceProvider(), Registry) diff --git a/providers/google-workspace/resources/group.go b/providers/google-workspace/resources/group.go index a230c29345..14ed9a10b7 100644 --- a/providers/google-workspace/resources/group.go +++ b/providers/google-workspace/resources/group.go @@ -7,13 +7,13 @@ import ( "context" "strings" - "go.mondoo.com/cnquery/v9/providers/google-workspace/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/providers/google-workspace/connection" + "go.mondoo.com/cnquery/v10/types" "google.golang.org/api/groupssettings/v1" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" directory "google.golang.org/api/admin/directory/v1" "google.golang.org/api/cloudidentity/v1" "google.golang.org/api/option" diff --git a/providers/google-workspace/resources/orgunit.go b/providers/google-workspace/resources/orgunit.go index 0f8eceb1a3..91c7087cdb 100644 --- a/providers/google-workspace/resources/orgunit.go +++ b/providers/google-workspace/resources/orgunit.go @@ -4,9 +4,9 @@ package resources import ( - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/google-workspace/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/google-workspace/connection" directory "google.golang.org/api/admin/directory/v1" ) diff --git a/providers/google-workspace/resources/reports.go b/providers/google-workspace/resources/reports.go index 9ae1eee794..e6103d8576 100644 --- a/providers/google-workspace/resources/reports.go +++ b/providers/google-workspace/resources/reports.go @@ -9,11 +9,11 @@ import ( "strings" "time" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/google-workspace/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/google-workspace/connection" + "go.mondoo.com/cnquery/v10/types" reports "google.golang.org/api/admin/reports/v1" ) diff --git a/providers/google-workspace/resources/role.go b/providers/google-workspace/resources/role.go index 2f3121eacd..4684d7ff7e 100644 --- a/providers/google-workspace/resources/role.go +++ b/providers/google-workspace/resources/role.go @@ -6,11 +6,11 @@ package resources import ( "strconv" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/google-workspace/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/google-workspace/connection" + "go.mondoo.com/cnquery/v10/types" directory "google.golang.org/api/admin/directory/v1" ) diff --git a/providers/google-workspace/resources/users.go b/providers/google-workspace/resources/users.go index 4379e3d660..7154190303 100644 --- a/providers/google-workspace/resources/users.go +++ b/providers/google-workspace/resources/users.go @@ -7,11 +7,11 @@ import ( "errors" "time" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/google-workspace/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/google-workspace/connection" + "go.mondoo.com/cnquery/v10/types" directory "google.golang.org/api/admin/directory/v1" ) diff --git a/providers/ipmi/config/config.go b/providers/ipmi/config/config.go index 56711483b7..b786231122 100644 --- a/providers/ipmi/config/config.go +++ b/providers/ipmi/config/config.go @@ -4,8 +4,8 @@ package config import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/ipmi/provider" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/ipmi/provider" ) var Config = plugin.Provider{ diff --git a/providers/ipmi/connection/connection.go b/providers/ipmi/connection/connection.go index d2328da317..8d699ab57b 100644 --- a/providers/ipmi/connection/connection.go +++ b/providers/ipmi/connection/connection.go @@ -7,9 +7,9 @@ import ( "errors" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" - impi_client "go.mondoo.com/cnquery/v9/providers/ipmi/connection/client" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" + impi_client "go.mondoo.com/cnquery/v10/providers/ipmi/connection/client" ) type IpmiConnection struct { diff --git a/providers/ipmi/gen/main.go b/providers/ipmi/gen/main.go index b272181a5a..784d0019b5 100644 --- a/providers/ipmi/gen/main.go +++ b/providers/ipmi/gen/main.go @@ -4,8 +4,8 @@ package main import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin/gen" - "go.mondoo.com/cnquery/v9/providers/ipmi/config" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin/gen" + "go.mondoo.com/cnquery/v10/providers/ipmi/config" ) func main() { diff --git a/providers/ipmi/go.mod b/providers/ipmi/go.mod index e284da6728..63a009818a 100644 --- a/providers/ipmi/go.mod +++ b/providers/ipmi/go.mod @@ -1,6 +1,6 @@ -module go.mondoo.com/cnquery/v9/providers/ipmi +module go.mondoo.com/cnquery/v10/providers/ipmi -replace go.mondoo.com/cnquery/v9 => ../.. +replace go.mondoo.com/cnquery/v10 => ../.. go 1.21 @@ -10,7 +10,7 @@ require ( github.com/rs/zerolog v1.31.0 github.com/stretchr/testify v1.8.4 github.com/vmware/goipmi v0.0.0-20181114221114-2333cd82d702 - go.mondoo.com/cnquery/v9 v9.14.0 + go.mondoo.com/cnquery/v10 v10.0.0 ) require ( diff --git a/providers/ipmi/main.go b/providers/ipmi/main.go index 3d4b39969f..b40e81f697 100644 --- a/providers/ipmi/main.go +++ b/providers/ipmi/main.go @@ -6,8 +6,8 @@ package main import ( "os" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/ipmi/provider" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/ipmi/provider" ) // This is the entry point for the IPMI provider. diff --git a/providers/ipmi/provider/provider.go b/providers/ipmi/provider/provider.go index 5451a93c00..63edf44b9c 100644 --- a/providers/ipmi/provider/provider.go +++ b/providers/ipmi/provider/provider.go @@ -9,14 +9,14 @@ import ( "strconv" "strings" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" - - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream" - "go.mondoo.com/cnquery/v9/providers/ipmi/connection" - "go.mondoo.com/cnquery/v9/providers/ipmi/resources" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" + + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream" + "go.mondoo.com/cnquery/v10/providers/ipmi/connection" + "go.mondoo.com/cnquery/v10/providers/ipmi/resources" ) const ConnectionType = "ipmi" diff --git a/providers/ipmi/resources/ipmi.go b/providers/ipmi/resources/ipmi.go index 22d13bf4ca..b06e66b98f 100644 --- a/providers/ipmi/resources/ipmi.go +++ b/providers/ipmi/resources/ipmi.go @@ -4,8 +4,8 @@ package resources import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/ipmi/connection" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/ipmi/connection" ) func (r *mqlIpmi) id() (string, error) { diff --git a/providers/ipmi/resources/ipmi.lr b/providers/ipmi/resources/ipmi.lr index 18fe480b97..7a36670cf5 100644 --- a/providers/ipmi/resources/ipmi.lr +++ b/providers/ipmi/resources/ipmi.lr @@ -2,7 +2,7 @@ // SPDX-License-Identifier: BUSL-1.1 option provider = "go.mondoo.com/cnquery/providers/ipmi" -option go_package = "go.mondoo.com/cnquery/v9/providers/ipmi/resources" +option go_package = "go.mondoo.com/cnquery/v10/providers/ipmi/resources" // Intelligent Platform Management Interface (IPMI) resource // diff --git a/providers/ipmi/resources/ipmi.lr.go b/providers/ipmi/resources/ipmi.lr.go index 88bd974896..d95a65e4d7 100644 --- a/providers/ipmi/resources/ipmi.lr.go +++ b/providers/ipmi/resources/ipmi.lr.go @@ -8,9 +8,9 @@ package resources import ( "errors" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/types" ) var resourceFactories map[string]plugin.ResourceFactory diff --git a/providers/k8s/config/config.go b/providers/k8s/config/config.go index 37c87f6930..18b38c7af9 100644 --- a/providers/k8s/config/config.go +++ b/providers/k8s/config/config.go @@ -4,9 +4,9 @@ package config import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/k8s/provider" - "go.mondoo.com/cnquery/v9/providers/k8s/resources" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/k8s/provider" + "go.mondoo.com/cnquery/v10/providers/k8s/resources" ) var Config = plugin.Provider{ diff --git a/providers/k8s/connection/admission/connection.go b/providers/k8s/connection/admission/connection.go index 7c2a639218..18de451884 100644 --- a/providers/k8s/connection/admission/connection.go +++ b/providers/k8s/connection/admission/connection.go @@ -9,9 +9,9 @@ import ( "fmt" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/k8s/connection/shared" - "go.mondoo.com/cnquery/v9/providers/k8s/connection/shared/resources" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/k8s/connection/shared" + "go.mondoo.com/cnquery/v10/providers/k8s/connection/shared/resources" admission "k8s.io/api/admission/v1" "k8s.io/apimachinery/pkg/version" ) diff --git a/providers/k8s/connection/admission/connection_test.go b/providers/k8s/connection/admission/connection_test.go index fe9c71c81f..093b5fabc6 100644 --- a/providers/k8s/connection/admission/connection_test.go +++ b/providers/k8s/connection/admission/connection_test.go @@ -10,7 +10,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" ) func TestAdmissionProvider(t *testing.T) { diff --git a/providers/k8s/connection/api/connection.go b/providers/k8s/connection/api/connection.go index e1fe3e8c35..51e2d92c4c 100644 --- a/providers/k8s/connection/api/connection.go +++ b/providers/k8s/connection/api/connection.go @@ -11,9 +11,9 @@ import ( "github.com/pkg/errors" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/k8s/connection/shared" - "go.mondoo.com/cnquery/v9/providers/k8s/connection/shared/resources" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/k8s/connection/shared" + "go.mondoo.com/cnquery/v10/providers/k8s/connection/shared/resources" admissionv1 "k8s.io/api/admission/v1" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/meta" diff --git a/providers/k8s/connection/manifest/connection.go b/providers/k8s/connection/manifest/connection.go index baf5cbbb19..7631c06043 100644 --- a/providers/k8s/connection/manifest/connection.go +++ b/providers/k8s/connection/manifest/connection.go @@ -10,9 +10,9 @@ import ( "path/filepath" "github.com/pkg/errors" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/k8s/connection/shared" - "go.mondoo.com/cnquery/v9/providers/k8s/connection/shared/resources" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/k8s/connection/shared" + "go.mondoo.com/cnquery/v10/providers/k8s/connection/shared/resources" admissionv1 "k8s.io/api/admission/v1" "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/version" diff --git a/providers/k8s/connection/manifest/connection_test.go b/providers/k8s/connection/manifest/connection_test.go index 0f278fe9f1..77f7e19f39 100644 --- a/providers/k8s/connection/manifest/connection_test.go +++ b/providers/k8s/connection/manifest/connection_test.go @@ -7,16 +7,16 @@ import ( "testing" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9" - "go.mondoo.com/cnquery/v9/providers" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/testutils" - k8s_conf "go.mondoo.com/cnquery/v9/providers/k8s/config" - "go.mondoo.com/cnquery/v9/providers/k8s/connection/manifest" - "go.mondoo.com/cnquery/v9/providers/k8s/connection/shared" - k8s_provider "go.mondoo.com/cnquery/v9/providers/k8s/provider" - "go.mondoo.com/cnquery/v9/providers/k8s/resources" + "go.mondoo.com/cnquery/v10" + "go.mondoo.com/cnquery/v10/providers" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/testutils" + k8s_conf "go.mondoo.com/cnquery/v10/providers/k8s/config" + "go.mondoo.com/cnquery/v10/providers/k8s/connection/manifest" + "go.mondoo.com/cnquery/v10/providers/k8s/connection/shared" + k8s_provider "go.mondoo.com/cnquery/v10/providers/k8s/provider" + "go.mondoo.com/cnquery/v10/providers/k8s/resources" ) func K8s() *providers.Runtime { diff --git a/providers/k8s/connection/shared/connection.go b/providers/k8s/connection/shared/connection.go index b689b9c7ad..87cfd981fd 100644 --- a/providers/k8s/connection/shared/connection.go +++ b/providers/k8s/connection/shared/connection.go @@ -7,8 +7,8 @@ import ( "fmt" "strings" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/k8s/connection/shared/resources" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/k8s/connection/shared/resources" admissionv1 "k8s.io/api/admission/v1" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" diff --git a/providers/k8s/connection/shared/manifest_parser.go b/providers/k8s/connection/shared/manifest_parser.go index faec6b5540..7289a4f47f 100644 --- a/providers/k8s/connection/shared/manifest_parser.go +++ b/providers/k8s/connection/shared/manifest_parser.go @@ -15,7 +15,7 @@ import ( "github.com/pkg/errors" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers/k8s/connection/shared/resources" + "go.mondoo.com/cnquery/v10/providers/k8s/connection/shared/resources" v1 "k8s.io/api/core/v1" apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" "k8s.io/apimachinery/pkg/api/meta" diff --git a/providers/k8s/connection/shared/resources/manifest_file_test.go b/providers/k8s/connection/shared/resources/manifest_file_test.go index eede758de9..bba41729f4 100644 --- a/providers/k8s/connection/shared/resources/manifest_file_test.go +++ b/providers/k8s/connection/shared/resources/manifest_file_test.go @@ -9,7 +9,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers/k8s/connection/shared/resources" + "go.mondoo.com/cnquery/v10/providers/k8s/connection/shared/resources" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" ) diff --git a/providers/k8s/gen/main.go b/providers/k8s/gen/main.go index cb825eac92..b5323cdae9 100644 --- a/providers/k8s/gen/main.go +++ b/providers/k8s/gen/main.go @@ -4,8 +4,8 @@ package main import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin/gen" - "go.mondoo.com/cnquery/v9/providers/k8s/config" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin/gen" + "go.mondoo.com/cnquery/v10/providers/k8s/config" ) func main() { diff --git a/providers/k8s/go.mod b/providers/k8s/go.mod index de9b4e3e8c..e986d40c34 100644 --- a/providers/k8s/go.mod +++ b/providers/k8s/go.mod @@ -1,6 +1,6 @@ -module go.mondoo.com/cnquery/v9/providers/k8s +module go.mondoo.com/cnquery/v10/providers/k8s -replace go.mondoo.com/cnquery/v9 => ../.. +replace go.mondoo.com/cnquery/v10 => ../.. go 1.21 @@ -14,7 +14,7 @@ require ( github.com/pkg/errors v0.9.1 github.com/rs/zerolog v1.31.0 github.com/stretchr/testify v1.8.4 - go.mondoo.com/cnquery/v9 v9.14.0 + go.mondoo.com/cnquery/v10 v10.0.0 // pin v0.28.4 k8s.io/api v0.28.4 // pin v0.28.4 diff --git a/providers/k8s/main.go b/providers/k8s/main.go index d453ce78fd..3f2a310044 100644 --- a/providers/k8s/main.go +++ b/providers/k8s/main.go @@ -6,8 +6,8 @@ package main import ( "os" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/k8s/provider" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/k8s/provider" ) func main() { diff --git a/providers/k8s/provider/detector.go b/providers/k8s/provider/detector.go index 973b56d49b..02f3c5974a 100644 --- a/providers/k8s/provider/detector.go +++ b/providers/k8s/provider/detector.go @@ -4,8 +4,8 @@ package provider import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/k8s/connection/shared" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/k8s/connection/shared" ) func (s *Service) detect(asset *inventory.Asset, conn shared.Connection) error { diff --git a/providers/k8s/provider/provider.go b/providers/k8s/provider/provider.go index 218c901a46..0bf06278a8 100644 --- a/providers/k8s/provider/provider.go +++ b/providers/k8s/provider/provider.go @@ -8,17 +8,17 @@ import ( "strconv" "strings" - "go.mondoo.com/cnquery/v9" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream" - "go.mondoo.com/cnquery/v9/providers/k8s/connection/admission" - "go.mondoo.com/cnquery/v9/providers/k8s/connection/api" - "go.mondoo.com/cnquery/v9/providers/k8s/connection/manifest" - "go.mondoo.com/cnquery/v9/providers/k8s/connection/shared" - connectionResources "go.mondoo.com/cnquery/v9/providers/k8s/connection/shared/resources" - "go.mondoo.com/cnquery/v9/providers/k8s/resources" + "go.mondoo.com/cnquery/v10" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream" + "go.mondoo.com/cnquery/v10/providers/k8s/connection/admission" + "go.mondoo.com/cnquery/v10/providers/k8s/connection/api" + "go.mondoo.com/cnquery/v10/providers/k8s/connection/manifest" + "go.mondoo.com/cnquery/v10/providers/k8s/connection/shared" + connectionResources "go.mondoo.com/cnquery/v10/providers/k8s/connection/shared/resources" + "go.mondoo.com/cnquery/v10/providers/k8s/resources" ) const ConnectionType = "k8s" diff --git a/providers/k8s/provider/provider_test.go b/providers/k8s/provider/provider_test.go index 1afe7dfa48..a590cac25c 100644 --- a/providers/k8s/provider/provider_test.go +++ b/providers/k8s/provider/provider_test.go @@ -8,10 +8,10 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/k8s/connection/shared" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/k8s/connection/shared" ) func newTestService(t *testing.T, path string) (*Service, *plugin.ConnectRes) { diff --git a/providers/k8s/resources/admission.go b/providers/k8s/resources/admission.go index 763407ca1a..c5367195b2 100644 --- a/providers/k8s/resources/admission.go +++ b/providers/k8s/resources/admission.go @@ -8,9 +8,9 @@ import ( "fmt" "sync" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/k8s/connection/shared/resources" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/k8s/connection/shared/resources" admissionv1 "k8s.io/api/admission/v1" ) diff --git a/providers/k8s/resources/apiresource.go b/providers/k8s/resources/apiresource.go index 7994af988f..19072c90da 100644 --- a/providers/k8s/resources/apiresource.go +++ b/providers/k8s/resources/apiresource.go @@ -6,9 +6,9 @@ package resources import ( "fmt" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/types" ) func (k *mqlK8s) apiResources() ([]interface{}, error) { diff --git a/providers/k8s/resources/clusterrole.go b/providers/k8s/resources/clusterrole.go index b570228729..d29cac7b81 100644 --- a/providers/k8s/resources/clusterrole.go +++ b/providers/k8s/resources/clusterrole.go @@ -7,10 +7,10 @@ import ( "errors" "sync" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/types" rbacv1 "k8s.io/api/rbac/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" diff --git a/providers/k8s/resources/clusterrolebinding.go b/providers/k8s/resources/clusterrolebinding.go index f10d127a9a..4259fbfe1b 100644 --- a/providers/k8s/resources/clusterrolebinding.go +++ b/providers/k8s/resources/clusterrolebinding.go @@ -7,10 +7,10 @@ import ( "errors" "sync" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/types" rbacv1 "k8s.io/api/rbac/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" diff --git a/providers/k8s/resources/common.go b/providers/k8s/resources/common.go index f1f27d00da..2cba1e4d73 100644 --- a/providers/k8s/resources/common.go +++ b/providers/k8s/resources/common.go @@ -9,9 +9,9 @@ import ( "strings" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/k8s/connection/shared" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/k8s/connection/shared" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" diff --git a/providers/k8s/resources/configmap.go b/providers/k8s/resources/configmap.go index 0540b57798..426460b4b2 100644 --- a/providers/k8s/resources/configmap.go +++ b/providers/k8s/resources/configmap.go @@ -7,10 +7,10 @@ import ( "errors" "sync" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/types" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" diff --git a/providers/k8s/resources/container.go b/providers/k8s/resources/container.go index 98227e225d..66edefbc49 100644 --- a/providers/k8s/resources/container.go +++ b/providers/k8s/resources/container.go @@ -6,11 +6,11 @@ package resources import ( "fmt" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/k8s/connection/shared/resources" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/k8s/connection/shared/resources" + "go.mondoo.com/cnquery/v10/types" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" diff --git a/providers/k8s/resources/container_utils.go b/providers/k8s/resources/container_utils.go index 7121f57438..326dd9eb27 100644 --- a/providers/k8s/resources/container_utils.go +++ b/providers/k8s/resources/container_utils.go @@ -6,9 +6,9 @@ package resources import ( "strings" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/types" v1 "k8s.io/api/core/v1" ) diff --git a/providers/k8s/resources/cronjob.go b/providers/k8s/resources/cronjob.go index d2870a6abd..7ad5e48b79 100644 --- a/providers/k8s/resources/cronjob.go +++ b/providers/k8s/resources/cronjob.go @@ -7,10 +7,10 @@ import ( "errors" "sync" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/k8s/connection/shared/resources" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/k8s/connection/shared/resources" batchv1 "k8s.io/api/batch/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" diff --git a/providers/k8s/resources/customresource.go b/providers/k8s/resources/customresource.go index 4841feefba..8dc3103a69 100644 --- a/providers/k8s/resources/customresource.go +++ b/providers/k8s/resources/customresource.go @@ -7,8 +7,8 @@ import ( "sync" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" diff --git a/providers/k8s/resources/daemonset.go b/providers/k8s/resources/daemonset.go index 8c83f7e56e..b4ef094abf 100644 --- a/providers/k8s/resources/daemonset.go +++ b/providers/k8s/resources/daemonset.go @@ -7,10 +7,10 @@ import ( "errors" "sync" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/k8s/connection/shared/resources" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/k8s/connection/shared/resources" appsv1 "k8s.io/api/apps/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" diff --git a/providers/k8s/resources/deployment.go b/providers/k8s/resources/deployment.go index e1e66b3623..cd1d9030dc 100644 --- a/providers/k8s/resources/deployment.go +++ b/providers/k8s/resources/deployment.go @@ -7,10 +7,10 @@ import ( "errors" "sync" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/k8s/connection/shared/resources" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/k8s/connection/shared/resources" appsv1 "k8s.io/api/apps/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" diff --git a/providers/k8s/resources/discovery.go b/providers/k8s/resources/discovery.go index 94389e0d16..a9dc16e50d 100644 --- a/providers/k8s/resources/discovery.go +++ b/providers/k8s/resources/discovery.go @@ -12,14 +12,14 @@ import ( "github.com/google/go-containerregistry/pkg/name" "github.com/pkg/errors" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/k8s/connection/shared" - "go.mondoo.com/cnquery/v9/providers/k8s/connection/shared/resources" - "go.mondoo.com/cnquery/v9/providers/os/resources/discovery/container_registry" - "go.mondoo.com/cnquery/v9/types" - "go.mondoo.com/cnquery/v9/utils/stringx" + "go.mondoo.com/cnquery/v10" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/k8s/connection/shared" + "go.mondoo.com/cnquery/v10/providers/k8s/connection/shared/resources" + "go.mondoo.com/cnquery/v10/providers/os/resources/discovery/container_registry" + "go.mondoo.com/cnquery/v10/types" + "go.mondoo.com/cnquery/v10/utils/stringx" admissionv1 "k8s.io/api/admission/v1" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/providers/k8s/resources/discovery_test.go b/providers/k8s/resources/discovery_test.go index 98bb3e26b2..12d65667dc 100644 --- a/providers/k8s/resources/discovery_test.go +++ b/providers/k8s/resources/discovery_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" ) func TestConvertImagesToAssets(t *testing.T) { diff --git a/providers/k8s/resources/ingress.go b/providers/k8s/resources/ingress.go index b7fc7947c1..0e0e56c29e 100644 --- a/providers/k8s/resources/ingress.go +++ b/providers/k8s/resources/ingress.go @@ -8,10 +8,10 @@ import ( "fmt" "sync" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/types" corev1 "k8s.io/api/core/v1" networkingv1 "k8s.io/api/networking/v1" diff --git a/providers/k8s/resources/job.go b/providers/k8s/resources/job.go index b68960141d..7692585f90 100644 --- a/providers/k8s/resources/job.go +++ b/providers/k8s/resources/job.go @@ -7,10 +7,10 @@ import ( "errors" "sync" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/k8s/connection/shared/resources" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/k8s/connection/shared/resources" batchv1 "k8s.io/api/batch/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" diff --git a/providers/k8s/resources/k8s.go b/providers/k8s/resources/k8s.go index f0a4e97308..cd6ac8176f 100644 --- a/providers/k8s/resources/k8s.go +++ b/providers/k8s/resources/k8s.go @@ -6,7 +6,7 @@ package resources import ( "sync" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" ) type mqlK8sInternal struct { diff --git a/providers/k8s/resources/k8s.lr b/providers/k8s/resources/k8s.lr index 282c435b11..3d095301d7 100644 --- a/providers/k8s/resources/k8s.lr +++ b/providers/k8s/resources/k8s.lr @@ -5,7 +5,7 @@ import "../../os/resources/os.lr" import "../../network/resources/network.lr" option provider = "go.mondoo.com/cnquery/providers/k8s" -option go_package = "go.mondoo.com/cnquery/v9/providers/k8s/resources" +option go_package = "go.mondoo.com/cnquery/v10/providers/k8s/resources" // Kubernetes cluster k8s { diff --git a/providers/k8s/resources/k8s.lr.go b/providers/k8s/resources/k8s.lr.go index dfba906a03..59819318fd 100644 --- a/providers/k8s/resources/k8s.lr.go +++ b/providers/k8s/resources/k8s.lr.go @@ -9,9 +9,9 @@ import ( "errors" "time" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/types" ) var resourceFactories map[string]plugin.ResourceFactory diff --git a/providers/k8s/resources/namespace.go b/providers/k8s/resources/namespace.go index 674f14bc4a..cb29de77f2 100644 --- a/providers/k8s/resources/namespace.go +++ b/providers/k8s/resources/namespace.go @@ -7,9 +7,9 @@ import ( "sync" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/meta" ) diff --git a/providers/k8s/resources/networkpolicy.go b/providers/k8s/resources/networkpolicy.go index a8cac778e2..8375190fa9 100644 --- a/providers/k8s/resources/networkpolicy.go +++ b/providers/k8s/resources/networkpolicy.go @@ -7,9 +7,9 @@ import ( "errors" "sync" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" networkingv1 "k8s.io/api/networking/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" diff --git a/providers/k8s/resources/node.go b/providers/k8s/resources/node.go index 55a0719b73..a20aefa401 100644 --- a/providers/k8s/resources/node.go +++ b/providers/k8s/resources/node.go @@ -7,10 +7,10 @@ import ( "errors" "sync" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/utils/multierr" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/utils/multierr" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" diff --git a/providers/k8s/resources/platform_ownership.go b/providers/k8s/resources/platform_ownership.go index 4c9feaf211..3f7bc73fe5 100644 --- a/providers/k8s/resources/platform_ownership.go +++ b/providers/k8s/resources/platform_ownership.go @@ -7,7 +7,7 @@ import ( "strings" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers/k8s/connection/shared" + "go.mondoo.com/cnquery/v10/providers/k8s/connection/shared" "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/runtime" ) diff --git a/providers/k8s/resources/pod.go b/providers/k8s/resources/pod.go index 669544cfda..ef0d7052eb 100644 --- a/providers/k8s/resources/pod.go +++ b/providers/k8s/resources/pod.go @@ -7,10 +7,10 @@ import ( "errors" "sync" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/k8s/connection/shared/resources" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/k8s/connection/shared/resources" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" diff --git a/providers/k8s/resources/podsecuritypolicy.go b/providers/k8s/resources/podsecuritypolicy.go index 9fd2606125..148409051b 100644 --- a/providers/k8s/resources/podsecuritypolicy.go +++ b/providers/k8s/resources/podsecuritypolicy.go @@ -7,8 +7,8 @@ import ( "errors" "sync" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" policyv1beta1 "k8s.io/api/policy/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" diff --git a/providers/k8s/resources/replicaset.go b/providers/k8s/resources/replicaset.go index 9cd7e20e5a..925269949d 100644 --- a/providers/k8s/resources/replicaset.go +++ b/providers/k8s/resources/replicaset.go @@ -7,10 +7,10 @@ import ( "errors" "sync" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/k8s/connection/shared/resources" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/k8s/connection/shared/resources" appsv1 "k8s.io/api/apps/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" diff --git a/providers/k8s/resources/resources_test.go b/providers/k8s/resources/resources_test.go index 97d5d7987f..bbf1a52a0b 100644 --- a/providers/k8s/resources/resources_test.go +++ b/providers/k8s/resources/resources_test.go @@ -11,12 +11,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/k8s/connection/manifest" - "go.mondoo.com/cnquery/v9/providers/k8s/connection/shared" - sharedres "go.mondoo.com/cnquery/v9/providers/k8s/connection/shared/resources" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/k8s/connection/manifest" + "go.mondoo.com/cnquery/v10/providers/k8s/connection/shared" + sharedres "go.mondoo.com/cnquery/v10/providers/k8s/connection/shared/resources" ) type K8sObjectKindTest struct { diff --git a/providers/k8s/resources/role.go b/providers/k8s/resources/role.go index 0bd3cef78c..08a176068a 100644 --- a/providers/k8s/resources/role.go +++ b/providers/k8s/resources/role.go @@ -7,10 +7,10 @@ import ( "errors" "sync" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/types" rbacv1 "k8s.io/api/rbac/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" diff --git a/providers/k8s/resources/rolebinding.go b/providers/k8s/resources/rolebinding.go index 50cae14e04..afd083a312 100644 --- a/providers/k8s/resources/rolebinding.go +++ b/providers/k8s/resources/rolebinding.go @@ -7,10 +7,10 @@ import ( "errors" "sync" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/types" rbacv1 "k8s.io/api/rbac/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" diff --git a/providers/k8s/resources/secret.go b/providers/k8s/resources/secret.go index 0e69de30fc..31bdfc03ad 100644 --- a/providers/k8s/resources/secret.go +++ b/providers/k8s/resources/secret.go @@ -7,9 +7,9 @@ import ( "errors" "sync" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" diff --git a/providers/k8s/resources/service.go b/providers/k8s/resources/service.go index feb2ea34ce..5c56235b39 100644 --- a/providers/k8s/resources/service.go +++ b/providers/k8s/resources/service.go @@ -7,9 +7,9 @@ import ( "errors" "sync" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" diff --git a/providers/k8s/resources/serviceaccount.go b/providers/k8s/resources/serviceaccount.go index 67710e7869..8429dc3d21 100644 --- a/providers/k8s/resources/serviceaccount.go +++ b/providers/k8s/resources/serviceaccount.go @@ -7,9 +7,9 @@ import ( "errors" "sync" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" diff --git a/providers/k8s/resources/statefulset.go b/providers/k8s/resources/statefulset.go index 4cc746c935..7feaca6fcb 100644 --- a/providers/k8s/resources/statefulset.go +++ b/providers/k8s/resources/statefulset.go @@ -7,10 +7,10 @@ import ( "errors" "sync" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/k8s/connection/shared/resources" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/k8s/connection/shared/resources" appsv1 "k8s.io/api/apps/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" diff --git a/providers/k8s/resources/unsupported_test.go b/providers/k8s/resources/unsupported_test.go index 45c603fba5..f1ff16c002 100644 --- a/providers/k8s/resources/unsupported_test.go +++ b/providers/k8s/resources/unsupported_test.go @@ -7,10 +7,10 @@ import ( "testing" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/k8s/connection/manifest" - "go.mondoo.com/cnquery/v9/providers/k8s/connection/shared" - sharedres "go.mondoo.com/cnquery/v9/providers/k8s/connection/shared/resources" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/k8s/connection/manifest" + "go.mondoo.com/cnquery/v10/providers/k8s/connection/shared" + sharedres "go.mondoo.com/cnquery/v10/providers/k8s/connection/shared/resources" ) func TestManifestFile_OutdatedApi(t *testing.T) { diff --git a/providers/mock.go b/providers/mock.go index f77b46c41e..2157c6bd9d 100644 --- a/providers/mock.go +++ b/providers/mock.go @@ -5,14 +5,14 @@ package providers import ( "github.com/cockroachdb/errors" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" ) var mockProvider = Provider{ Provider: &plugin.Provider{ Name: "mock", - ID: "go.mondoo.com/cnquery/v9/providers/mock", + ID: "go.mondoo.com/cnquery/v10/providers/mock", Version: "9.0.0", Connectors: []plugin.Connector{{ Name: "mock", diff --git a/providers/ms365/config/config.go b/providers/ms365/config/config.go index 6dca22b202..9c867becc0 100644 --- a/providers/ms365/config/config.go +++ b/providers/ms365/config/config.go @@ -4,8 +4,8 @@ package config import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/ms365/provider" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/ms365/provider" ) var Config = plugin.Provider{ diff --git a/providers/ms365/connection/auth.go b/providers/ms365/connection/auth.go index 543787cb1b..3dbe513e51 100644 --- a/providers/ms365/connection/auth.go +++ b/providers/ms365/connection/auth.go @@ -11,7 +11,7 @@ import ( "github.com/pkg/errors" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" ) func getTokenCredential(credential *vault.Credential, tenantId, clientId string) (azcore.TokenCredential, error) { diff --git a/providers/ms365/connection/connection.go b/providers/ms365/connection/connection.go index 8b98320e86..1c00fe2fab 100644 --- a/providers/ms365/connection/connection.go +++ b/providers/ms365/connection/connection.go @@ -10,11 +10,11 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/pkg/errors" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" - "go.mondoo.com/cnquery/v9/providers/os/connection/local" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/resources/powershell" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers/os/connection/local" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/resources/powershell" ) const ( diff --git a/providers/ms365/connection/exchange_report.go b/providers/ms365/connection/exchange_report.go index 123c16bfb1..d81b44e385 100644 --- a/providers/ms365/connection/exchange_report.go +++ b/providers/ms365/connection/exchange_report.go @@ -11,7 +11,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/pkg/errors" - "go.mondoo.com/cnquery/v9/logger" + "go.mondoo.com/cnquery/v10/logger" ) var exchangeReport = ` diff --git a/providers/ms365/connection/sharepoint_report.go b/providers/ms365/connection/sharepoint_report.go index e55bfbaba7..dab268bd89 100644 --- a/providers/ms365/connection/sharepoint_report.go +++ b/providers/ms365/connection/sharepoint_report.go @@ -10,7 +10,7 @@ import ( "io" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "go.mondoo.com/cnquery/v9/logger" + "go.mondoo.com/cnquery/v10/logger" ) var sharepointReport = ` diff --git a/providers/ms365/connection/teams_report.go b/providers/ms365/connection/teams_report.go index 5ae8fe60d6..be3a75782a 100644 --- a/providers/ms365/connection/teams_report.go +++ b/providers/ms365/connection/teams_report.go @@ -11,7 +11,7 @@ import ( "strings" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "go.mondoo.com/cnquery/v9/logger" + "go.mondoo.com/cnquery/v10/logger" ) var teamsReport = ` diff --git a/providers/ms365/gen/main.go b/providers/ms365/gen/main.go index 49891ffbb5..123d567cdf 100644 --- a/providers/ms365/gen/main.go +++ b/providers/ms365/gen/main.go @@ -4,8 +4,8 @@ package main import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin/gen" - "go.mondoo.com/cnquery/v9/providers/ms365/config" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin/gen" + "go.mondoo.com/cnquery/v10/providers/ms365/config" ) func main() { diff --git a/providers/ms365/go.mod b/providers/ms365/go.mod index 11fc634bd8..c3d4cc7a07 100644 --- a/providers/ms365/go.mod +++ b/providers/ms365/go.mod @@ -1,6 +1,6 @@ -module go.mondoo.com/cnquery/v9/providers/ms365 +module go.mondoo.com/cnquery/v10/providers/ms365 -replace go.mondoo.com/cnquery/v9 => ../.. +replace go.mondoo.com/cnquery/v10 => ../.. go 1.21 @@ -15,7 +15,7 @@ require ( github.com/microsoftgraph/msgraph-sdk-go v1.29.0 github.com/pkg/errors v0.9.1 github.com/rs/zerolog v1.31.0 - go.mondoo.com/cnquery/v9 v9.14.0 + go.mondoo.com/cnquery/v10 v10.0.0 ) require ( diff --git a/providers/ms365/main.go b/providers/ms365/main.go index 7ec57d4612..d11d25517b 100644 --- a/providers/ms365/main.go +++ b/providers/ms365/main.go @@ -6,8 +6,8 @@ package main import ( "os" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/ms365/provider" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/ms365/provider" ) func main() { diff --git a/providers/ms365/provider/provider.go b/providers/ms365/provider/provider.go index 6b4e5fdf93..591a124342 100644 --- a/providers/ms365/provider/provider.go +++ b/providers/ms365/provider/provider.go @@ -8,13 +8,13 @@ import ( "strconv" "strings" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" - "go.mondoo.com/cnquery/v9/providers/ms365/connection" - "go.mondoo.com/cnquery/v9/providers/ms365/resources" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers/ms365/connection" + "go.mondoo.com/cnquery/v10/providers/ms365/resources" ) const ( diff --git a/providers/ms365/resources/adapter.go b/providers/ms365/resources/adapter.go index 6a555dd85a..d428aa896d 100644 --- a/providers/ms365/resources/adapter.go +++ b/providers/ms365/resources/adapter.go @@ -8,7 +8,7 @@ import ( "github.com/microsoft/kiota-abstractions-go/authentication" a "github.com/microsoft/kiota-authentication-azure-go" msgraphsdkgo "github.com/microsoftgraph/msgraph-sdk-go" - "go.mondoo.com/cnquery/v9/providers/ms365/connection" + "go.mondoo.com/cnquery/v10/providers/ms365/connection" ) var DefaultMSGraphScopes = []string{connection.DefaultMSGraphScope} diff --git a/providers/ms365/resources/applications.go b/providers/ms365/resources/applications.go index 3ee6bf8c0d..5394ca265e 100644 --- a/providers/ms365/resources/applications.go +++ b/providers/ms365/resources/applications.go @@ -7,10 +7,10 @@ import ( "context" "github.com/microsoftgraph/msgraph-sdk-go/applications" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/ms365/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/ms365/connection" + "go.mondoo.com/cnquery/v10/types" ) func (m *mqlMicrosoftApplication) id() (string, error) { diff --git a/providers/ms365/resources/devicemanagement.go b/providers/ms365/resources/devicemanagement.go index d0e85f2fd9..a94fa70ec2 100644 --- a/providers/ms365/resources/devicemanagement.go +++ b/providers/ms365/resources/devicemanagement.go @@ -8,10 +8,10 @@ import ( "github.com/microsoftgraph/msgraph-sdk-go/devicemanagement" "github.com/microsoftgraph/msgraph-sdk-go/models" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/ms365/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/ms365/connection" + "go.mondoo.com/cnquery/v10/types" ) func (m *mqlMicrosoftDevicemanagementDeviceconfiguration) id() (string, error) { diff --git a/providers/ms365/resources/domains.go b/providers/ms365/resources/domains.go index 14efebbea7..c214b18510 100644 --- a/providers/ms365/resources/domains.go +++ b/providers/ms365/resources/domains.go @@ -8,10 +8,10 @@ import ( "github.com/microsoftgraph/msgraph-sdk-go/domains" "github.com/microsoftgraph/msgraph-sdk-go/models" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/ms365/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/ms365/connection" + "go.mondoo.com/cnquery/v10/types" ) func (m *mqlMicrosoftDomain) id() (string, error) { diff --git a/providers/ms365/resources/groups.go b/providers/ms365/resources/groups.go index 60184fa187..14c7fd30be 100644 --- a/providers/ms365/resources/groups.go +++ b/providers/ms365/resources/groups.go @@ -8,9 +8,9 @@ import ( "errors" "github.com/microsoftgraph/msgraph-sdk-go/groups" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/ms365/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/ms365/connection" ) func (m *mqlMicrosoftGroup) id() (string, error) { diff --git a/providers/ms365/resources/microsoft.go b/providers/ms365/resources/microsoft.go index ee13a8affb..fb95388a92 100644 --- a/providers/ms365/resources/microsoft.go +++ b/providers/ms365/resources/microsoft.go @@ -7,7 +7,7 @@ import ( "context" "github.com/microsoftgraph/msgraph-sdk-go/organization" - "go.mondoo.com/cnquery/v9/providers/ms365/connection" + "go.mondoo.com/cnquery/v10/providers/ms365/connection" ) func (a *mqlMicrosoft) tenantDomainName() (string, error) { diff --git a/providers/ms365/resources/ms365.go b/providers/ms365/resources/ms365.go index 92f2fa0c3a..692211e4a2 100644 --- a/providers/ms365/resources/ms365.go +++ b/providers/ms365/resources/ms365.go @@ -10,11 +10,11 @@ import ( "strings" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/ms365/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/ms365/connection" + "go.mondoo.com/cnquery/v10/types" ) func (m *mqlMs365ExchangeonlineExternalSender) id() (string, error) { diff --git a/providers/ms365/resources/ms365.lr b/providers/ms365/resources/ms365.lr index 9fa728779d..95d186d7ba 100644 --- a/providers/ms365/resources/ms365.lr +++ b/providers/ms365/resources/ms365.lr @@ -2,7 +2,7 @@ // SPDX-License-Identifier: BUSL-1.1 option provider = "go.mondoo.com/cnquery/providers/ms365" -option go_package = "go.mondoo.com/cnquery/v9/providers/ms365/resources" +option go_package = "go.mondoo.com/cnquery/v10/providers/ms365/resources" // Microsoft microsoft { diff --git a/providers/ms365/resources/ms365.lr.go b/providers/ms365/resources/ms365.lr.go index 8e0a2ad0c5..8a8773125c 100644 --- a/providers/ms365/resources/ms365.lr.go +++ b/providers/ms365/resources/ms365.lr.go @@ -9,9 +9,9 @@ import ( "errors" "time" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/types" ) var resourceFactories map[string]plugin.ResourceFactory diff --git a/providers/ms365/resources/organizations.go b/providers/ms365/resources/organizations.go index 4c5bc96aff..430152098d 100644 --- a/providers/ms365/resources/organizations.go +++ b/providers/ms365/resources/organizations.go @@ -7,10 +7,10 @@ import ( "context" "github.com/microsoftgraph/msgraph-sdk-go/organization" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/ms365/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/ms365/connection" + "go.mondoo.com/cnquery/v10/types" ) func (m *mqlMicrosoftOrganization) id() (string, error) { diff --git a/providers/ms365/resources/policies.go b/providers/ms365/resources/policies.go index 24277f8918..140012bdb0 100644 --- a/providers/ms365/resources/policies.go +++ b/providers/ms365/resources/policies.go @@ -7,8 +7,8 @@ import ( "context" "github.com/microsoftgraph/msgraph-sdk-go/policies" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/ms365/connection" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/ms365/connection" ) func (a *mqlMicrosoftPolicies) authorizationPolicy() (interface{}, error) { diff --git a/providers/ms365/resources/rolemanagement.go b/providers/ms365/resources/rolemanagement.go index 7bb56a8415..101147d8d6 100644 --- a/providers/ms365/resources/rolemanagement.go +++ b/providers/ms365/resources/rolemanagement.go @@ -7,10 +7,10 @@ import ( "context" "github.com/microsoftgraph/msgraph-sdk-go/rolemanagement" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/ms365/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/ms365/connection" + "go.mondoo.com/cnquery/v10/types" ) func (m *mqlMicrosoftRolemanagementRoledefinition) id() (string, error) { diff --git a/providers/ms365/resources/securescores.go b/providers/ms365/resources/securescores.go index 81f9b4ef6a..7ab3a6c6c9 100644 --- a/providers/ms365/resources/securescores.go +++ b/providers/ms365/resources/securescores.go @@ -9,11 +9,11 @@ import ( "github.com/microsoftgraph/msgraph-sdk-go/models" "github.com/microsoftgraph/msgraph-sdk-go/security" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/ms365/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/ms365/connection" + "go.mondoo.com/cnquery/v10/types" ) func (m *mqlMicrosoftSecuritySecurityscore) id() (string, error) { diff --git a/providers/ms365/resources/serviceprincipals.go b/providers/ms365/resources/serviceprincipals.go index e46e74f92e..aadc36e332 100644 --- a/providers/ms365/resources/serviceprincipals.go +++ b/providers/ms365/resources/serviceprincipals.go @@ -7,12 +7,12 @@ import ( "context" "github.com/microsoftgraph/msgraph-sdk-go/serviceprincipals" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/ms365/connection" - "go.mondoo.com/cnquery/v9/types" - "go.mondoo.com/cnquery/v9/utils/stringx" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/ms365/connection" + "go.mondoo.com/cnquery/v10/types" + "go.mondoo.com/cnquery/v10/utils/stringx" ) func (m *mqlMicrosoftServiceprincipal) id() (string, error) { diff --git a/providers/ms365/resources/settings.go b/providers/ms365/resources/settings.go index 90dd37f2cf..0b28085b84 100644 --- a/providers/ms365/resources/settings.go +++ b/providers/ms365/resources/settings.go @@ -7,8 +7,8 @@ import ( "context" "github.com/microsoftgraph/msgraph-sdk-go/groupsettings" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/ms365/connection" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/ms365/connection" ) func (a *mqlMicrosoft) settings() ([]interface{}, error) { diff --git a/providers/ms365/resources/structs.go b/providers/ms365/resources/structs.go index 5368b41912..ece01b58c3 100644 --- a/providers/ms365/resources/structs.go +++ b/providers/ms365/resources/structs.go @@ -11,7 +11,7 @@ import ( "time" "github.com/microsoftgraph/msgraph-sdk-go/models" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" ) type AssignedPlan struct { diff --git a/providers/ms365/resources/users.go b/providers/ms365/resources/users.go index 938d0d878f..da7e084d97 100644 --- a/providers/ms365/resources/users.go +++ b/providers/ms365/resources/users.go @@ -7,10 +7,10 @@ import ( "context" "github.com/microsoftgraph/msgraph-sdk-go/users" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/ms365/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/ms365/connection" + "go.mondoo.com/cnquery/v10/types" ) func (m *mqlMicrosoftUser) id() (string, error) { diff --git a/providers/network/config/config.go b/providers/network/config/config.go index 6f944ccc8e..a3e109894e 100644 --- a/providers/network/config/config.go +++ b/providers/network/config/config.go @@ -4,8 +4,8 @@ package config import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/network/provider" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/network/provider" ) var Config = plugin.Provider{ diff --git a/providers/network/connection/connection.go b/providers/network/connection/connection.go index a38306183e..fec21d3994 100644 --- a/providers/network/connection/connection.go +++ b/providers/network/connection/connection.go @@ -4,7 +4,7 @@ package connection import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" ) type HostConnection struct { diff --git a/providers/network/gen/main.go b/providers/network/gen/main.go index 7fc5e2bc68..1cefb2ef63 100644 --- a/providers/network/gen/main.go +++ b/providers/network/gen/main.go @@ -4,8 +4,8 @@ package main import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin/gen" - "go.mondoo.com/cnquery/v9/providers/network/config" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin/gen" + "go.mondoo.com/cnquery/v10/providers/network/config" ) func main() { diff --git a/providers/network/main.go b/providers/network/main.go index 1060ce9a91..bd283d4c01 100644 --- a/providers/network/main.go +++ b/providers/network/main.go @@ -6,8 +6,8 @@ package main import ( "os" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/network/provider" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/network/provider" ) func main() { diff --git a/providers/network/provider/provider.go b/providers/network/provider/provider.go index 6612ba014d..b44849cc67 100644 --- a/providers/network/provider/provider.go +++ b/providers/network/provider/provider.go @@ -9,13 +9,13 @@ import ( "strconv" "strings" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream" - "go.mondoo.com/cnquery/v9/providers/network/connection" - "go.mondoo.com/cnquery/v9/providers/network/resources" - "go.mondoo.com/cnquery/v9/providers/network/resources/domain" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream" + "go.mondoo.com/cnquery/v10/providers/network/connection" + "go.mondoo.com/cnquery/v10/providers/network/resources" + "go.mondoo.com/cnquery/v10/providers/network/resources/domain" ) const ( diff --git a/providers/network/resources/certificates.go b/providers/network/resources/certificates.go index 830e705737..624a9141df 100644 --- a/providers/network/resources/certificates.go +++ b/providers/network/resources/certificates.go @@ -14,14 +14,14 @@ import ( "sync" "time" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/checksums" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/network/resources/certificates" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/checksums" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/network/resources/certificates" + "go.mondoo.com/cnquery/v10/types" ) func pkixnameToMql(runtime *plugin.Runtime, name pkix.Name, id string) (*mqlPkixName, error) { diff --git a/providers/network/resources/dns.go b/providers/network/resources/dns.go index 8feb4dfc19..20dba72cad 100644 --- a/providers/network/resources/dns.go +++ b/providers/network/resources/dns.go @@ -12,14 +12,14 @@ import ( "strings" "github.com/miekg/dns" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/network/connection" - "go.mondoo.com/cnquery/v9/providers/network/resources/dnsshake" - "go.mondoo.com/cnquery/v9/providers/network/resources/domain" - "go.mondoo.com/cnquery/v9/types" - "go.mondoo.com/cnquery/v9/utils/sortx" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/network/connection" + "go.mondoo.com/cnquery/v10/providers/network/resources/dnsshake" + "go.mondoo.com/cnquery/v10/providers/network/resources/domain" + "go.mondoo.com/cnquery/v10/types" + "go.mondoo.com/cnquery/v10/utils/sortx" ) func (d *mqlDomainName) id() (string, error) { diff --git a/providers/network/resources/dns_test.go b/providers/network/resources/dns_test.go index 550faed6b1..94cc31c654 100644 --- a/providers/network/resources/dns_test.go +++ b/providers/network/resources/dns_test.go @@ -8,11 +8,11 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/network/connection" - "go.mondoo.com/cnquery/v9/providers/network/resources" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/network/connection" + "go.mondoo.com/cnquery/v10/providers/network/resources" ) func TestResource_DNS(t *testing.T) { diff --git a/providers/network/resources/dnsshake/dnsshake.go b/providers/network/resources/dnsshake/dnsshake.go index 15ddec837b..f2fd1f83c2 100644 --- a/providers/network/resources/dnsshake/dnsshake.go +++ b/providers/network/resources/dnsshake/dnsshake.go @@ -12,7 +12,7 @@ import ( "github.com/cockroachdb/errors" "github.com/miekg/dns" - "go.mondoo.com/cnquery/v9/utils/multierr" + "go.mondoo.com/cnquery/v10/utils/multierr" ) type DnsClient struct { diff --git a/providers/network/resources/http.go b/providers/network/resources/http.go index 944c5e7729..06d9c8a65e 100644 --- a/providers/network/resources/http.go +++ b/providers/network/resources/http.go @@ -13,12 +13,12 @@ import ( "sync" "time" - "go.mondoo.com/cnquery/v9/checksums" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/network/connection" - "go.mondoo.com/cnquery/v9/types" - "go.mondoo.com/cnquery/v9/utils/sortx" + "go.mondoo.com/cnquery/v10/checksums" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/network/connection" + "go.mondoo.com/cnquery/v10/types" + "go.mondoo.com/cnquery/v10/utils/sortx" ) type mqlHttpGetInternal struct { diff --git a/providers/network/resources/network.lr b/providers/network/resources/network.lr index 497827dada..58322d0bba 100644 --- a/providers/network/resources/network.lr +++ b/providers/network/resources/network.lr @@ -2,7 +2,7 @@ // SPDX-License-Identifier: BUSL-1.1 option provider = "go.mondoo.com/cnquery/providers/network" -option go_package = "go.mondoo.com/cnquery/v9/providers/network/resources" +option go_package = "go.mondoo.com/cnquery/v10/providers/network/resources" // Socket socket @defaults("protocol port address") { diff --git a/providers/network/resources/network.lr.go b/providers/network/resources/network.lr.go index b10af7e516..5432d166b7 100644 --- a/providers/network/resources/network.lr.go +++ b/providers/network/resources/network.lr.go @@ -9,9 +9,9 @@ import ( "errors" "time" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/types" ) var resourceFactories map[string]plugin.ResourceFactory diff --git a/providers/network/resources/network_test.go b/providers/network/resources/network_test.go index 603d3709a1..157ef74e51 100644 --- a/providers/network/resources/network_test.go +++ b/providers/network/resources/network_test.go @@ -3,6 +3,6 @@ package resources_test -import "go.mondoo.com/cnquery/v9/providers-sdk/v1/testutils" +import "go.mondoo.com/cnquery/v10/providers-sdk/v1/testutils" var x = testutils.InitTester(testutils.LinuxMock()) diff --git a/providers/network/resources/openpgp.go b/providers/network/resources/openpgp.go index f6a38c22c3..600f188228 100644 --- a/providers/network/resources/openpgp.go +++ b/providers/network/resources/openpgp.go @@ -10,8 +10,8 @@ import ( "github.com/ProtonMail/go-crypto/openpgp" "github.com/ProtonMail/go-crypto/openpgp/packet" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" ) func (p *mqlOpenpgpEntities) list(content string) ([]interface{}, error) { diff --git a/providers/network/resources/tls.go b/providers/network/resources/tls.go index df4f3f41d4..dd2c05eeec 100644 --- a/providers/network/resources/tls.go +++ b/providers/network/resources/tls.go @@ -11,13 +11,13 @@ import ( "time" "github.com/cockroachdb/errors" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/core/resources/regex" - "go.mondoo.com/cnquery/v9/providers/network/connection" - "go.mondoo.com/cnquery/v9/providers/network/resources/certificates" - "go.mondoo.com/cnquery/v9/providers/network/resources/tlsshake" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/core/resources/regex" + "go.mondoo.com/cnquery/v10/providers/network/connection" + "go.mondoo.com/cnquery/v10/providers/network/resources/certificates" + "go.mondoo.com/cnquery/v10/providers/network/resources/tlsshake" + "go.mondoo.com/cnquery/v10/types" ) var reTarget = regexp.MustCompile("([^/:]+?)(:\\d+)?$") diff --git a/providers/network/resources/tls_test.go b/providers/network/resources/tls_test.go index f718958a19..6fe6380e3b 100644 --- a/providers/network/resources/tls_test.go +++ b/providers/network/resources/tls_test.go @@ -8,11 +8,11 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/network/connection" - "go.mondoo.com/cnquery/v9/providers/network/resources" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/network/connection" + "go.mondoo.com/cnquery/v10/providers/network/resources" ) func TestResource_TLS(t *testing.T) { diff --git a/providers/network/resources/tlsshake/tlsshake.go b/providers/network/resources/tlsshake/tlsshake.go index d49e91ec12..9bb29435da 100644 --- a/providers/network/resources/tlsshake/tlsshake.go +++ b/providers/network/resources/tlsshake/tlsshake.go @@ -20,7 +20,7 @@ import ( "sync" "time" - "go.mondoo.com/cnquery/v9/utils/multierr" + "go.mondoo.com/cnquery/v10/utils/multierr" "golang.org/x/crypto/ocsp" ) diff --git a/providers/network/resources/url.go b/providers/network/resources/url.go index abeafb3e16..114c15dccb 100644 --- a/providers/network/resources/url.go +++ b/providers/network/resources/url.go @@ -9,8 +9,8 @@ import ( "strconv" "strings" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" ) func initUrl(runtime *plugin.Runtime, args map[string]*llx.RawData) (map[string]*llx.RawData, plugin.Resource, error) { diff --git a/providers/oci/config/config.go b/providers/oci/config/config.go index 04b382ab0a..982337ba00 100644 --- a/providers/oci/config/config.go +++ b/providers/oci/config/config.go @@ -4,8 +4,8 @@ package config import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/oci/provider" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/oci/provider" ) var Config = plugin.Provider{ diff --git a/providers/oci/connection/connection.go b/providers/oci/connection/connection.go index 3e66950dca..9089063db8 100644 --- a/providers/oci/connection/connection.go +++ b/providers/oci/connection/connection.go @@ -7,8 +7,8 @@ import ( "errors" "github.com/oracle/oci-go-sdk/v65/common" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" ) type OciConnection struct { diff --git a/providers/oci/gen/main.go b/providers/oci/gen/main.go index 2cab7512b6..07c1557d3a 100644 --- a/providers/oci/gen/main.go +++ b/providers/oci/gen/main.go @@ -4,8 +4,8 @@ package main import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin/gen" - "go.mondoo.com/cnquery/v9/providers/oci/config" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin/gen" + "go.mondoo.com/cnquery/v10/providers/oci/config" ) func main() { diff --git a/providers/oci/go.mod b/providers/oci/go.mod index 3505d095d0..8dd2e93d23 100644 --- a/providers/oci/go.mod +++ b/providers/oci/go.mod @@ -1,15 +1,15 @@ -module go.mondoo.com/cnquery/v9/providers/oci +module go.mondoo.com/cnquery/v10/providers/oci go 1.21 toolchain go1.21.3 -replace go.mondoo.com/cnquery/v9 => ../.. +replace go.mondoo.com/cnquery/v10 => ../.. require ( github.com/oracle/oci-go-sdk/v65 v65.55.1 github.com/rs/zerolog v1.31.0 - go.mondoo.com/cnquery/v9 v9.14.0 + go.mondoo.com/cnquery/v10 v10.0.0 ) require ( diff --git a/providers/oci/main.go b/providers/oci/main.go index 9e50900fab..908dc6107d 100644 --- a/providers/oci/main.go +++ b/providers/oci/main.go @@ -6,8 +6,8 @@ package main import ( "os" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/oci/provider" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/oci/provider" ) func main() { diff --git a/providers/oci/provider/provider.go b/providers/oci/provider/provider.go index a20646977c..ff46daa0ed 100644 --- a/providers/oci/provider/provider.go +++ b/providers/oci/provider/provider.go @@ -10,14 +10,14 @@ import ( "strconv" "strings" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" - - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream" - "go.mondoo.com/cnquery/v9/providers/oci/connection" - "go.mondoo.com/cnquery/v9/providers/oci/resources" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" + + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream" + "go.mondoo.com/cnquery/v10/providers/oci/connection" + "go.mondoo.com/cnquery/v10/providers/oci/resources" ) const ConnectionType = "oci" diff --git a/providers/oci/provider/provider_test.go b/providers/oci/provider/provider_test.go index 5e58fed6ca..b93c5ed0b4 100644 --- a/providers/oci/provider/provider_test.go +++ b/providers/oci/provider/provider_test.go @@ -10,8 +10,8 @@ import ( "fmt" "testing" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" ) func TestOciProvider(t *testing.T) { diff --git a/providers/oci/resources/buckets.go b/providers/oci/resources/buckets.go index 749ff062c7..4d7a2bf876 100644 --- a/providers/oci/resources/buckets.go +++ b/providers/oci/resources/buckets.go @@ -11,9 +11,9 @@ import ( "github.com/oracle/oci-go-sdk/v65/common" "github.com/oracle/oci-go-sdk/v65/objectstorage" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/jobpool" - "go.mondoo.com/cnquery/v9/providers/oci/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/jobpool" + "go.mondoo.com/cnquery/v10/providers/oci/connection" ) func (e *mqlOciObjectStorage) id() (string, error) { diff --git a/providers/oci/resources/compute.go b/providers/oci/resources/compute.go index 19f0d90fc8..c5e76cab35 100644 --- a/providers/oci/resources/compute.go +++ b/providers/oci/resources/compute.go @@ -11,9 +11,9 @@ import ( "github.com/oracle/oci-go-sdk/v65/common" "github.com/oracle/oci-go-sdk/v65/core" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/jobpool" - "go.mondoo.com/cnquery/v9/providers/oci/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/jobpool" + "go.mondoo.com/cnquery/v10/providers/oci/connection" ) func (e *mqlOciCompute) id() (string, error) { diff --git a/providers/oci/resources/conversion.go b/providers/oci/resources/conversion.go index 66837ee3d0..4c73769148 100644 --- a/providers/oci/resources/conversion.go +++ b/providers/oci/resources/conversion.go @@ -6,7 +6,7 @@ package resources import ( "time" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/jobpool" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/jobpool" ) // parseTime parses RFC 3389 timestamps "2019-06-12T21:14:13.190Z" diff --git a/providers/oci/resources/identity.go b/providers/oci/resources/identity.go index e1a5e68cc1..dc116f6b86 100644 --- a/providers/oci/resources/identity.go +++ b/providers/oci/resources/identity.go @@ -10,11 +10,11 @@ import ( "github.com/oracle/oci-go-sdk/v65/common" "github.com/oracle/oci-go-sdk/v65/identity" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/jobpool" - "go.mondoo.com/cnquery/v9/providers/oci/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/jobpool" + "go.mondoo.com/cnquery/v10/providers/oci/connection" + "go.mondoo.com/cnquery/v10/types" ) func (o *mqlOciIdentity) id() (string, error) { diff --git a/providers/oci/resources/network.go b/providers/oci/resources/network.go index e1e1af92f1..6a3613ac8d 100644 --- a/providers/oci/resources/network.go +++ b/providers/oci/resources/network.go @@ -10,11 +10,11 @@ import ( "github.com/oracle/oci-go-sdk/v65/common" "github.com/oracle/oci-go-sdk/v65/core" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/jobpool" - "go.mondoo.com/cnquery/v9/providers/oci/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/jobpool" + "go.mondoo.com/cnquery/v10/providers/oci/connection" + "go.mondoo.com/cnquery/v10/types" ) func (o *mqlOciNetwork) id() (string, error) { diff --git a/providers/oci/resources/oci.go b/providers/oci/resources/oci.go index 2dce0e554d..1967d39f2d 100644 --- a/providers/oci/resources/oci.go +++ b/providers/oci/resources/oci.go @@ -9,9 +9,9 @@ import ( "time" "github.com/oracle/oci-go-sdk/v65/audit" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/oci/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/oci/connection" ) func (o *mqlOci) id() (string, error) { diff --git a/providers/oci/resources/oci.lr b/providers/oci/resources/oci.lr index cfa2455c3b..b4f778fdce 100644 --- a/providers/oci/resources/oci.lr +++ b/providers/oci/resources/oci.lr @@ -2,7 +2,7 @@ // SPDX-License-Identifier: BUSL-1.1 option provider = "go.mondoo.com/cnquery/providers/oci" -option go_package = "go.mondoo.com/cnquery/v9/providers/oci/resources" +option go_package = "go.mondoo.com/cnquery/v10/providers/oci/resources" // Oracle Cloud Infrastructure (OCI) tenancy oci { diff --git a/providers/oci/resources/oci.lr.go b/providers/oci/resources/oci.lr.go index 9d7032ad33..cc820bc141 100644 --- a/providers/oci/resources/oci.lr.go +++ b/providers/oci/resources/oci.lr.go @@ -9,9 +9,9 @@ import ( "errors" "time" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/types" ) var resourceFactories map[string]plugin.ResourceFactory diff --git a/providers/okta/config/config.go b/providers/okta/config/config.go index cf4a4f5c2d..dd53eeb114 100644 --- a/providers/okta/config/config.go +++ b/providers/okta/config/config.go @@ -4,8 +4,8 @@ package config import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/okta/provider" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/okta/provider" ) var Config = plugin.Provider{ diff --git a/providers/okta/connection/connection.go b/providers/okta/connection/connection.go index ecc9e15aca..18c618b114 100644 --- a/providers/okta/connection/connection.go +++ b/providers/okta/connection/connection.go @@ -9,8 +9,8 @@ import ( "github.com/okta/okta-sdk-golang/v2/okta" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" ) type OktaConnection struct { diff --git a/providers/okta/gen/main.go b/providers/okta/gen/main.go index 88d1f5609c..b303152dfa 100644 --- a/providers/okta/gen/main.go +++ b/providers/okta/gen/main.go @@ -4,8 +4,8 @@ package main import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin/gen" - "go.mondoo.com/cnquery/v9/providers/okta/config" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin/gen" + "go.mondoo.com/cnquery/v10/providers/okta/config" ) func main() { diff --git a/providers/okta/go.mod b/providers/okta/go.mod index dc2154bf2e..8bf743fbd9 100644 --- a/providers/okta/go.mod +++ b/providers/okta/go.mod @@ -1,6 +1,6 @@ -module go.mondoo.com/cnquery/v9/providers/okta +module go.mondoo.com/cnquery/v10/providers/okta -replace go.mondoo.com/cnquery/v9 => ../.. +replace go.mondoo.com/cnquery/v10 => ../.. go 1.21 @@ -10,7 +10,7 @@ require ( github.com/okta/okta-sdk-golang/v2 v2.20.0 github.com/rs/zerolog v1.31.0 github.com/stretchr/testify v1.8.4 - go.mondoo.com/cnquery/v9 v9.14.0 + go.mondoo.com/cnquery/v10 v10.0.0 go.mondoo.com/ranger-rpc v0.5.3 ) diff --git a/providers/okta/main.go b/providers/okta/main.go index fee4836aa4..4f3a0f4677 100644 --- a/providers/okta/main.go +++ b/providers/okta/main.go @@ -6,8 +6,8 @@ package main import ( "os" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/okta/provider" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/okta/provider" ) func main() { diff --git a/providers/okta/provider/provider.go b/providers/okta/provider/provider.go index 4eba6b3347..e5885e8ba6 100644 --- a/providers/okta/provider/provider.go +++ b/providers/okta/provider/provider.go @@ -9,13 +9,13 @@ import ( "strconv" "strings" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" - "go.mondoo.com/cnquery/v9/providers/okta/connection" - "go.mondoo.com/cnquery/v9/providers/okta/resources" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers/okta/connection" + "go.mondoo.com/cnquery/v10/providers/okta/resources" ) const ConnectionType = "okta" diff --git a/providers/okta/resources/applications.go b/providers/okta/resources/applications.go index 273610f92a..d4c6393481 100644 --- a/providers/okta/resources/applications.go +++ b/providers/okta/resources/applications.go @@ -8,11 +8,11 @@ import ( "github.com/okta/okta-sdk-golang/v2/okta" "github.com/okta/okta-sdk-golang/v2/okta/query" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/okta/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/okta/connection" + "go.mondoo.com/cnquery/v10/types" ) func (o *mqlOkta) applications() ([]interface{}, error) { diff --git a/providers/okta/resources/customRoles.go b/providers/okta/resources/customRoles.go index a4daf57dbb..ee05f3f63b 100644 --- a/providers/okta/resources/customRoles.go +++ b/providers/okta/resources/customRoles.go @@ -5,12 +5,12 @@ package resources import ( "context" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/okta/connection" - "go.mondoo.com/cnquery/v9/providers/okta/resources/sdk" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/okta/connection" + "go.mondoo.com/cnquery/v10/providers/okta/resources/sdk" + "go.mondoo.com/cnquery/v10/types" "net/http" "strings" ) diff --git a/providers/okta/resources/domains.go b/providers/okta/resources/domains.go index c4ebc788c7..74e52ce284 100644 --- a/providers/okta/resources/domains.go +++ b/providers/okta/resources/domains.go @@ -7,10 +7,10 @@ import ( "context" "github.com/okta/okta-sdk-golang/v2/okta" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/okta/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/okta/connection" ) func (o *mqlOkta) domains() ([]interface{}, error) { diff --git a/providers/okta/resources/groups.go b/providers/okta/resources/groups.go index 75fc68cd09..f2bd78f7d4 100644 --- a/providers/okta/resources/groups.go +++ b/providers/okta/resources/groups.go @@ -8,10 +8,10 @@ import ( "github.com/okta/okta-sdk-golang/v2/okta" "github.com/okta/okta-sdk-golang/v2/okta/query" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/okta/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/okta/connection" ) func (o *mqlOkta) groups() ([]interface{}, error) { diff --git a/providers/okta/resources/network.go b/providers/okta/resources/network.go index 635dfa8a13..b57f9b8f59 100644 --- a/providers/okta/resources/network.go +++ b/providers/okta/resources/network.go @@ -8,11 +8,11 @@ import ( "github.com/okta/okta-sdk-golang/v2/okta" "github.com/okta/okta-sdk-golang/v2/okta/query" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/okta/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/okta/connection" + "go.mondoo.com/cnquery/v10/types" ) func (o *mqlOkta) networks() ([]interface{}, error) { diff --git a/providers/okta/resources/okta.lr b/providers/okta/resources/okta.lr index 843e8495b7..373a20cbdc 100644 --- a/providers/okta/resources/okta.lr +++ b/providers/okta/resources/okta.lr @@ -2,7 +2,7 @@ // SPDX-License-Identifier: BUSL-1.1 option provider = "go.mondoo.com/cnquery/providers/okta" -option go_package = "go.mondoo.com/cnquery/v9/providers/okta/resources" +option go_package = "go.mondoo.com/cnquery/v10/providers/okta/resources" // Okta okta { diff --git a/providers/okta/resources/okta.lr.go b/providers/okta/resources/okta.lr.go index 938c8bcc4b..e7d0002c65 100644 --- a/providers/okta/resources/okta.lr.go +++ b/providers/okta/resources/okta.lr.go @@ -9,9 +9,9 @@ import ( "errors" "time" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/types" ) var resourceFactories map[string]plugin.ResourceFactory diff --git a/providers/okta/resources/organization.go b/providers/okta/resources/organization.go index e3b6ce492d..f1cd960479 100644 --- a/providers/okta/resources/organization.go +++ b/providers/okta/resources/organization.go @@ -6,12 +6,12 @@ package resources import ( "context" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/okta/connection" - "go.mondoo.com/cnquery/v9/providers/okta/resources/sdk" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/okta/connection" + "go.mondoo.com/cnquery/v10/providers/okta/resources/sdk" + "go.mondoo.com/cnquery/v10/types" "go.mondoo.com/ranger-rpc" ) diff --git a/providers/okta/resources/policies.go b/providers/okta/resources/policies.go index a9e4a76fed..71216725b9 100644 --- a/providers/okta/resources/policies.go +++ b/providers/okta/resources/policies.go @@ -14,11 +14,11 @@ import ( "github.com/okta/okta-sdk-golang/v2/okta" "github.com/okta/okta-sdk-golang/v2/okta/query" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/okta/connection" - "go.mondoo.com/cnquery/v9/providers/okta/resources/sdk" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/okta/connection" + "go.mondoo.com/cnquery/v10/providers/okta/resources/sdk" ) // https://developer.okta.com/docs/reference/api/policy/#policy-object diff --git a/providers/okta/resources/trustedorigin.go b/providers/okta/resources/trustedorigin.go index 03e0eff5b5..83441080e9 100644 --- a/providers/okta/resources/trustedorigin.go +++ b/providers/okta/resources/trustedorigin.go @@ -8,11 +8,11 @@ import ( "github.com/okta/okta-sdk-golang/v2/okta" "github.com/okta/okta-sdk-golang/v2/okta/query" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/okta/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/okta/connection" + "go.mondoo.com/cnquery/v10/types" ) func (o *mqlOkta) trustedOrigins() ([]interface{}, error) { diff --git a/providers/okta/resources/users.go b/providers/okta/resources/users.go index 9b85fd3cd8..eb9e67cc10 100644 --- a/providers/okta/resources/users.go +++ b/providers/okta/resources/users.go @@ -8,10 +8,10 @@ import ( "github.com/okta/okta-sdk-golang/v2/okta" "github.com/okta/okta-sdk-golang/v2/okta/query" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/okta/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/okta/connection" ) func (o *mqlOkta) users() ([]interface{}, error) { diff --git a/providers/opcua/config/config.go b/providers/opcua/config/config.go index b7f23870a4..4a3bec7c4d 100644 --- a/providers/opcua/config/config.go +++ b/providers/opcua/config/config.go @@ -4,8 +4,8 @@ package config import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/opcua/provider" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/opcua/provider" ) var Config = plugin.Provider{ diff --git a/providers/opcua/connection/connection.go b/providers/opcua/connection/connection.go index ad7fae0671..f918f4ee91 100644 --- a/providers/opcua/connection/connection.go +++ b/providers/opcua/connection/connection.go @@ -9,8 +9,8 @@ import ( "github.com/gopcua/opcua" "github.com/gopcua/opcua/ua" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" ) type OpcuaConnection struct { diff --git a/providers/opcua/gen/main.go b/providers/opcua/gen/main.go index baa9951bb4..0736bc3740 100644 --- a/providers/opcua/gen/main.go +++ b/providers/opcua/gen/main.go @@ -4,8 +4,8 @@ package main import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin/gen" - "go.mondoo.com/cnquery/v9/providers/opcua/config" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin/gen" + "go.mondoo.com/cnquery/v10/providers/opcua/config" ) func main() { diff --git a/providers/opcua/go.mod b/providers/opcua/go.mod index 42d4e926cd..d6f93de8cf 100644 --- a/providers/opcua/go.mod +++ b/providers/opcua/go.mod @@ -1,6 +1,6 @@ -module go.mondoo.com/cnquery/v9/providers/opcua +module go.mondoo.com/cnquery/v10/providers/opcua -replace go.mondoo.com/cnquery/v9 => ../.. +replace go.mondoo.com/cnquery/v10 => ../.. go 1.21 @@ -9,7 +9,7 @@ toolchain go1.21.3 require ( github.com/gopcua/opcua v0.5.3 github.com/mozillazg/go-slugify v0.2.0 - go.mondoo.com/cnquery/v9 v9.14.0 + go.mondoo.com/cnquery/v10 v10.0.0 ) require ( diff --git a/providers/opcua/main.go b/providers/opcua/main.go index c02c7d130a..daaf7541a6 100644 --- a/providers/opcua/main.go +++ b/providers/opcua/main.go @@ -6,8 +6,8 @@ package main import ( "os" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/opcua/provider" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/opcua/provider" ) // This is the entry point for the OPCUA provider. diff --git a/providers/opcua/provider/provider.go b/providers/opcua/provider/provider.go index 1b378c99ed..c12f22a2f8 100644 --- a/providers/opcua/provider/provider.go +++ b/providers/opcua/provider/provider.go @@ -9,12 +9,12 @@ import ( "strings" "github.com/mozillazg/go-slugify" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream" - "go.mondoo.com/cnquery/v9/providers/opcua/connection" - "go.mondoo.com/cnquery/v9/providers/opcua/resources" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream" + "go.mondoo.com/cnquery/v10/providers/opcua/connection" + "go.mondoo.com/cnquery/v10/providers/opcua/resources" ) const ConnectionType = "opcua" diff --git a/providers/opcua/resources/namespace.go b/providers/opcua/resources/namespace.go index 4cfd4f095e..c036407b15 100644 --- a/providers/opcua/resources/namespace.go +++ b/providers/opcua/resources/namespace.go @@ -6,9 +6,9 @@ package resources import ( "strconv" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/opcua/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/opcua/connection" ) func (o *mqlOpcuaNamespace) id() (string, error) { diff --git a/providers/opcua/resources/node.go b/providers/opcua/resources/node.go index 692413b416..7f60a7f073 100644 --- a/providers/opcua/resources/node.go +++ b/providers/opcua/resources/node.go @@ -10,8 +10,8 @@ import ( "github.com/gopcua/opcua/errors" "github.com/gopcua/opcua/id" "github.com/gopcua/opcua/ua" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" ) type nodeMeta struct { diff --git a/providers/opcua/resources/opcua.go b/providers/opcua/resources/opcua.go index 699d6d4e5c..935d9973c0 100644 --- a/providers/opcua/resources/opcua.go +++ b/providers/opcua/resources/opcua.go @@ -8,7 +8,7 @@ import ( "github.com/gopcua/opcua/id" "github.com/gopcua/opcua/ua" - "go.mondoo.com/cnquery/v9/providers/opcua/connection" + "go.mondoo.com/cnquery/v10/providers/opcua/connection" ) func (o *mqlOpcua) id() (string, error) { diff --git a/providers/opcua/resources/opcua.lr b/providers/opcua/resources/opcua.lr index e2866641a7..3a51fa884a 100644 --- a/providers/opcua/resources/opcua.lr +++ b/providers/opcua/resources/opcua.lr @@ -2,7 +2,7 @@ // SPDX-License-Identifier: BUSL-1.1 option provider = "go.mondoo.com/cnquery/providers/opcua" -option go_package = "go.mondoo.com/cnquery/v9/providers/opcua/resources" +option go_package = "go.mondoo.com/cnquery/v10/providers/opcua/resources" // OPC UA opcua { diff --git a/providers/opcua/resources/opcua.lr.go b/providers/opcua/resources/opcua.lr.go index effd73c63b..8b629416e5 100644 --- a/providers/opcua/resources/opcua.lr.go +++ b/providers/opcua/resources/opcua.lr.go @@ -9,9 +9,9 @@ import ( "errors" "time" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/types" ) var resourceFactories map[string]plugin.ResourceFactory diff --git a/providers/opcua/resources/server.go b/providers/opcua/resources/server.go index b3439fdf90..f7a227af2f 100644 --- a/providers/opcua/resources/server.go +++ b/providers/opcua/resources/server.go @@ -8,10 +8,10 @@ import ( "github.com/gopcua/opcua/id" "github.com/gopcua/opcua/ua" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/opcua/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/opcua/connection" ) func initOpcuaServer(runtime *plugin.Runtime, args map[string]*llx.RawData) (map[string]*llx.RawData, plugin.Resource, error) { diff --git a/providers/os/config/config.go b/providers/os/config/config.go index 3833d1c411..2560cf9187 100644 --- a/providers/os/config/config.go +++ b/providers/os/config/config.go @@ -4,9 +4,9 @@ package config import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/os/provider" - "go.mondoo.com/cnquery/v9/providers/os/resources/discovery/docker_engine" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/os/provider" + "go.mondoo.com/cnquery/v10/providers/os/resources/discovery/docker_engine" ) var Config = plugin.Provider{ diff --git a/providers/os/connection/container/auth/auth.go b/providers/os/connection/container/auth/auth.go index be2b4e906b..db482bb3cf 100644 --- a/providers/os/connection/container/auth/auth.go +++ b/providers/os/connection/container/auth/auth.go @@ -6,9 +6,9 @@ package auth import ( "github.com/google/go-containerregistry/pkg/authn" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/logger" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" - "go.mondoo.com/cnquery/v9/providers/os/connection/container/image" + "go.mondoo.com/cnquery/v10/logger" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers/os/connection/container/image" ) func AuthOption(credentials []*vault.Credential) []image.Option { diff --git a/providers/os/connection/container/docker_engine/command.go b/providers/os/connection/container/docker_engine/command.go index 522c201f0f..e4b60c905a 100644 --- a/providers/os/connection/container/docker_engine/command.go +++ b/providers/os/connection/container/docker_engine/command.go @@ -13,7 +13,7 @@ import ( docker "github.com/docker/docker/api/types" "github.com/docker/docker/client" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) type Command struct { diff --git a/providers/os/connection/container/image/docker.go b/providers/os/connection/container/image/docker.go index 3c4ee8d8db..cbb35de3b3 100644 --- a/providers/os/connection/container/image/docker.go +++ b/providers/os/connection/container/image/docker.go @@ -12,7 +12,7 @@ import ( v1 "github.com/google/go-containerregistry/pkg/v1" "github.com/google/go-containerregistry/pkg/v1/daemon" "github.com/google/go-containerregistry/pkg/v1/tarball" - "go.mondoo.com/cnquery/v9/providers/os/connection/container/cache" + "go.mondoo.com/cnquery/v10/providers/os/connection/container/cache" ) type ShaReference struct { diff --git a/providers/os/connection/docker_container.go b/providers/os/connection/docker_container.go index ea02317047..c8d434ad08 100644 --- a/providers/os/connection/docker_container.go +++ b/providers/os/connection/docker_container.go @@ -16,14 +16,14 @@ import ( v1 "github.com/google/go-containerregistry/pkg/v1" "github.com/rs/zerolog/log" "github.com/spf13/afero" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/container/auth" - "go.mondoo.com/cnquery/v9/providers/os/connection/container/docker_engine" - "go.mondoo.com/cnquery/v9/providers/os/connection/container/image" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/connection/ssh/cat" - "go.mondoo.com/cnquery/v9/providers/os/id/containerid" - docker_discovery "go.mondoo.com/cnquery/v9/providers/os/resources/discovery/docker_engine" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/container/auth" + "go.mondoo.com/cnquery/v10/providers/os/connection/container/docker_engine" + "go.mondoo.com/cnquery/v10/providers/os/connection/container/image" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/ssh/cat" + "go.mondoo.com/cnquery/v10/providers/os/id/containerid" + docker_discovery "go.mondoo.com/cnquery/v10/providers/os/resources/discovery/docker_engine" ) const ( diff --git a/providers/os/connection/docker_container_test.go b/providers/os/connection/docker_container_test.go index 2614224516..a78a94f3c1 100644 --- a/providers/os/connection/docker_container_test.go +++ b/providers/os/connection/docker_container_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" ) // This test has an external dependency on the gcr.io registry diff --git a/providers/os/connection/docker_file.go b/providers/os/connection/docker_file.go index 47be621724..9e228ad4a6 100644 --- a/providers/os/connection/docker_file.go +++ b/providers/os/connection/docker_file.go @@ -16,8 +16,8 @@ import ( dockertypes "github.com/docker/docker/api/types" "github.com/docker/docker/client" "github.com/spf13/afero" - "go.mondoo.com/cnquery/v9/providers/os/connection/ssh/cat" - "go.mondoo.com/cnquery/v9/providers/os/fsutil" + "go.mondoo.com/cnquery/v10/providers/os/connection/ssh/cat" + "go.mondoo.com/cnquery/v10/providers/os/fsutil" ) func FileOpen(dockerClient *client.Client, path string, container string, conn *DockerContainerConnection, catFs *cat.Fs) (afero.File, error) { diff --git a/providers/os/connection/docker_fs.go b/providers/os/connection/docker_fs.go index e0b2ae932e..e276e9a249 100644 --- a/providers/os/connection/docker_fs.go +++ b/providers/os/connection/docker_fs.go @@ -11,7 +11,7 @@ import ( "github.com/docker/docker/client" "github.com/spf13/afero" - "go.mondoo.com/cnquery/v9/providers/os/connection/ssh/cat" + "go.mondoo.com/cnquery/v10/providers/os/connection/ssh/cat" ) type FS struct { diff --git a/providers/os/connection/docker_snapshot.go b/providers/os/connection/docker_snapshot.go index 50fe685a74..84aa270784 100644 --- a/providers/os/connection/docker_snapshot.go +++ b/providers/os/connection/docker_snapshot.go @@ -7,9 +7,9 @@ import ( "context" "os" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/container/cache" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/container/cache" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) var _ shared.Connection = &DockerSnapshotConnection{} diff --git a/providers/os/connection/fs/filesystem.go b/providers/os/connection/fs/filesystem.go index 57aa22fcd4..05aa2556bb 100644 --- a/providers/os/connection/fs/filesystem.go +++ b/providers/os/connection/fs/filesystem.go @@ -8,10 +8,10 @@ import ( "github.com/rs/zerolog/log" "github.com/spf13/afero" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/fs" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/fs" ) var _ shared.Connection = &FileSystemConnection{} diff --git a/providers/os/connection/fs/filesystem_test.go b/providers/os/connection/fs/filesystem_test.go index 83a30c8fbc..1f1f7c7a23 100644 --- a/providers/os/connection/fs/filesystem_test.go +++ b/providers/os/connection/fs/filesystem_test.go @@ -9,10 +9,10 @@ import ( "github.com/spf13/afero" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/fs" - "go.mondoo.com/cnquery/v9/providers/os/connection/fs/fsutil" - "go.mondoo.com/cnquery/v9/providers/os/detector" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/fs" + "go.mondoo.com/cnquery/v10/providers/os/connection/fs/fsutil" + "go.mondoo.com/cnquery/v10/providers/os/detector" ) func TestOsDetection(t *testing.T) { diff --git a/providers/os/connection/fs/fsutil/hash_test.go b/providers/os/connection/fs/fsutil/hash_test.go index dafdb644e3..609cf0c108 100644 --- a/providers/os/connection/fs/fsutil/hash_test.go +++ b/providers/os/connection/fs/fsutil/hash_test.go @@ -8,8 +8,8 @@ import ( "github.com/spf13/afero" "github.com/stretchr/testify/assert" - "go.mondoo.com/cnquery/v9/providers/os/connection/fs/fsutil" - "go.mondoo.com/cnquery/v9/providers/os/connection/local" + "go.mondoo.com/cnquery/v10/providers/os/connection/fs/fsutil" + "go.mondoo.com/cnquery/v10/providers/os/connection/local" ) func TestFileResource(t *testing.T) { diff --git a/providers/os/connection/local/local.go b/providers/os/connection/local/local.go index 00871649ff..0b25400939 100644 --- a/providers/os/connection/local/local.go +++ b/providers/os/connection/local/local.go @@ -13,9 +13,9 @@ import ( "github.com/rs/zerolog/log" "github.com/spf13/afero" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/connection/ssh/cat" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/ssh/cat" ) type LocalConnection struct { diff --git a/providers/os/connection/local/local_unix.go b/providers/os/connection/local/local_unix.go index 9c14d11687..aed9bb2d03 100644 --- a/providers/os/connection/local/local_unix.go +++ b/providers/os/connection/local/local_unix.go @@ -10,7 +10,7 @@ import ( "os" "syscall" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) func (c *LocalConnection) fileowner(stat os.FileInfo) (int64, int64) { diff --git a/providers/os/connection/local/statutil/stat.go b/providers/os/connection/local/statutil/stat.go index 6c81325162..e663dd7b95 100644 --- a/providers/os/connection/local/statutil/stat.go +++ b/providers/os/connection/local/statutil/stat.go @@ -16,7 +16,7 @@ import ( "github.com/cockroachdb/errors" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) type CommandRunner interface { diff --git a/providers/os/connection/local/statutil/stat_test.go b/providers/os/connection/local/statutil/stat_test.go index 75c3e1269f..391113eaf2 100644 --- a/providers/os/connection/local/statutil/stat_test.go +++ b/providers/os/connection/local/statutil/stat_test.go @@ -12,8 +12,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) func TestLinuxStatCmd(t *testing.T) { diff --git a/providers/os/connection/mock/mock.go b/providers/os/connection/mock/mock.go index aaa46ed0b2..ab21c61364 100644 --- a/providers/os/connection/mock/mock.go +++ b/providers/os/connection/mock/mock.go @@ -19,8 +19,8 @@ import ( "github.com/gobwas/glob" "github.com/rs/zerolog/log" "github.com/spf13/afero" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) // Data holds the mocked data entries diff --git a/providers/os/connection/shared/shared.go b/providers/os/connection/shared/shared.go index bd6b294336..61be4d2c99 100644 --- a/providers/os/connection/shared/shared.go +++ b/providers/os/connection/shared/shared.go @@ -12,8 +12,8 @@ import ( "time" "github.com/spf13/afero" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" ) type ConnectionType string diff --git a/providers/os/connection/snapshot/localcmd.go b/providers/os/connection/snapshot/localcmd.go index 34c6f763f0..0dc74919ab 100644 --- a/providers/os/connection/snapshot/localcmd.go +++ b/providers/os/connection/snapshot/localcmd.go @@ -4,8 +4,8 @@ package snapshot import ( - "go.mondoo.com/cnquery/v9/providers/os/connection/local" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/local" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) type LocalCommandRunner struct { diff --git a/providers/os/connection/snapshot/volumemounter.go b/providers/os/connection/snapshot/volumemounter.go index bec438e205..5693a17876 100644 --- a/providers/os/connection/snapshot/volumemounter.go +++ b/providers/os/connection/snapshot/volumemounter.go @@ -9,7 +9,7 @@ import ( "os" "strings" - "go.mondoo.com/cnquery/v9/utils/stringx" + "go.mondoo.com/cnquery/v10/utils/stringx" "github.com/cockroachdb/errors" "github.com/rs/zerolog/log" diff --git a/providers/os/connection/ssh.go b/providers/os/connection/ssh.go index 0943f3fed1..82b0d5258c 100644 --- a/providers/os/connection/ssh.go +++ b/providers/os/connection/ssh.go @@ -21,16 +21,16 @@ import ( rawsftp "github.com/pkg/sftp" "github.com/rs/zerolog/log" "github.com/spf13/afero" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/connection/ssh/awsinstanceconnect" - "go.mondoo.com/cnquery/v9/providers/os/connection/ssh/awsssmsession" - "go.mondoo.com/cnquery/v9/providers/os/connection/ssh/cat" - "go.mondoo.com/cnquery/v9/providers/os/connection/ssh/scp" - "go.mondoo.com/cnquery/v9/providers/os/connection/ssh/sftp" - "go.mondoo.com/cnquery/v9/providers/os/connection/ssh/signers" - "go.mondoo.com/cnquery/v9/utils/multierr" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/ssh/awsinstanceconnect" + "go.mondoo.com/cnquery/v10/providers/os/connection/ssh/awsssmsession" + "go.mondoo.com/cnquery/v10/providers/os/connection/ssh/cat" + "go.mondoo.com/cnquery/v10/providers/os/connection/ssh/scp" + "go.mondoo.com/cnquery/v10/providers/os/connection/ssh/sftp" + "go.mondoo.com/cnquery/v10/providers/os/connection/ssh/signers" + "go.mondoo.com/cnquery/v10/utils/multierr" "golang.org/x/crypto/ssh" "golang.org/x/crypto/ssh/agent" "golang.org/x/crypto/ssh/knownhosts" diff --git a/providers/os/connection/ssh/awsinstanceconnect/ec2instanceconnect.go b/providers/os/connection/ssh/awsinstanceconnect/ec2instanceconnect.go index d1e2b666a3..c40dee7db2 100644 --- a/providers/os/connection/ssh/awsinstanceconnect/ec2instanceconnect.go +++ b/providers/os/connection/ssh/awsinstanceconnect/ec2instanceconnect.go @@ -13,7 +13,7 @@ import ( "github.com/aws/aws-sdk-go-v2/service/ec2instanceconnect" "github.com/cockroachdb/errors" "github.com/sethvargo/go-password/password" - "go.mondoo.com/cnquery/v9/providers/os/connection/ssh/keypair" + "go.mondoo.com/cnquery/v10/providers/os/connection/ssh/keypair" ) type generator struct { diff --git a/providers/os/connection/ssh/awsssmsession/session_manager.go b/providers/os/connection/ssh/awsssmsession/session_manager.go index e4d295c773..d33b474a59 100644 --- a/providers/os/connection/ssh/awsssmsession/session_manager.go +++ b/providers/os/connection/ssh/awsssmsession/session_manager.go @@ -17,7 +17,7 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/service/ssm" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" ) func NewAwsSsmSessionManager(cfg aws.Config, profile string) (*AwsSsmSessionManager, error) { diff --git a/providers/os/connection/ssh/cat/cat.go b/providers/os/connection/ssh/cat/cat.go index 4608afd4a1..ce202ba982 100644 --- a/providers/os/connection/ssh/cat/cat.go +++ b/providers/os/connection/ssh/cat/cat.go @@ -10,8 +10,8 @@ import ( "github.com/cockroachdb/errors" "github.com/rs/zerolog/log" "github.com/spf13/afero" - "go.mondoo.com/cnquery/v9/providers/os/connection/local/statutil" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/local/statutil" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) type CommandRunner interface { diff --git a/providers/os/connection/ssh/cat/cat_test.go b/providers/os/connection/ssh/cat/cat_test.go index ef48be763a..9f7a6e1b72 100644 --- a/providers/os/connection/ssh/cat/cat_test.go +++ b/providers/os/connection/ssh/cat/cat_test.go @@ -13,11 +13,11 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/connection/ssh/cat" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/ssh/cat" ) func TestCatFs(t *testing.T) { diff --git a/providers/os/connection/ssh/scp/fs.go b/providers/os/connection/ssh/scp/fs.go index 0dc3a191e8..e1bf356524 100644 --- a/providers/os/connection/ssh/scp/fs.go +++ b/providers/os/connection/ssh/scp/fs.go @@ -11,8 +11,8 @@ import ( scp_client "github.com/hnakamur/go-scp" "github.com/spf13/afero" - "go.mondoo.com/cnquery/v9/providers/os/connection/local/statutil" - "go.mondoo.com/cnquery/v9/providers/os/connection/ssh/cat" + "go.mondoo.com/cnquery/v10/providers/os/connection/local/statutil" + "go.mondoo.com/cnquery/v10/providers/os/connection/ssh/cat" "golang.org/x/crypto/ssh" ) diff --git a/providers/os/connection/ssh/sftp/sftp.go b/providers/os/connection/ssh/sftp/sftp.go index bf4bea7aec..7ed742d61d 100644 --- a/providers/os/connection/ssh/sftp/sftp.go +++ b/providers/os/connection/ssh/sftp/sftp.go @@ -21,7 +21,7 @@ import ( "github.com/cockroachdb/errors" "github.com/pkg/sftp" "github.com/spf13/afero" - "go.mondoo.com/cnquery/v9/providers/os/connection/ssh/cat" + "go.mondoo.com/cnquery/v10/providers/os/connection/ssh/cat" "golang.org/x/crypto/ssh" ) diff --git a/providers/os/connection/ssh_test.go b/providers/os/connection/ssh_test.go index d2377aab31..000e396d44 100644 --- a/providers/os/connection/ssh_test.go +++ b/providers/os/connection/ssh_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" ) func TestSSHDefaultSettings(t *testing.T) { diff --git a/providers/os/connection/tar.go b/providers/os/connection/tar.go index ea8265b7e7..660a1046af 100644 --- a/providers/os/connection/tar.go +++ b/providers/os/connection/tar.go @@ -15,12 +15,12 @@ import ( "github.com/google/go-containerregistry/pkg/v1/tarball" "github.com/rs/zerolog/log" "github.com/spf13/afero" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/container/cache" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - provider_tar "go.mondoo.com/cnquery/v9/providers/os/connection/tar" - "go.mondoo.com/cnquery/v9/providers/os/fsutil" - "go.mondoo.com/cnquery/v9/providers/os/id/containerid" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/container/cache" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + provider_tar "go.mondoo.com/cnquery/v10/providers/os/connection/tar" + "go.mondoo.com/cnquery/v10/providers/os/fsutil" + "go.mondoo.com/cnquery/v10/providers/os/id/containerid" ) const ( diff --git a/providers/os/connection/tar/fs.go b/providers/os/connection/tar/fs.go index e68aa72b73..de6a884885 100644 --- a/providers/os/connection/tar/fs.go +++ b/providers/os/connection/tar/fs.go @@ -16,7 +16,7 @@ import ( "github.com/rs/zerolog/log" "github.com/spf13/afero" - "go.mondoo.com/cnquery/v9/providers/os/fsutil" + "go.mondoo.com/cnquery/v10/providers/os/fsutil" ) func NewFs(source string) *FS { diff --git a/providers/os/connection/tar_test.go b/providers/os/connection/tar_test.go index 03071e0dd6..fb86d82ebc 100644 --- a/providers/os/connection/tar_test.go +++ b/providers/os/connection/tar_test.go @@ -16,9 +16,9 @@ import ( "github.com/google/go-containerregistry/pkg/v1/tarball" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection" - "go.mondoo.com/cnquery/v9/providers/os/connection/tar" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection" + "go.mondoo.com/cnquery/v10/providers/os/connection/tar" ) const ( diff --git a/providers/os/connection/vagrant.go b/providers/os/connection/vagrant.go index 84577b8f5c..dfa5f2648b 100644 --- a/providers/os/connection/vagrant.go +++ b/providers/os/connection/vagrant.go @@ -7,12 +7,12 @@ import ( "errors" "strings" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" - "go.mondoo.com/cnquery/v9/providers/os/connection/local" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/connection/vagrant" - "go.mondoo.com/cnquery/v9/providers/os/id/ids" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers/os/connection/local" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/vagrant" + "go.mondoo.com/cnquery/v10/providers/os/id/ids" ) const ( diff --git a/providers/os/connection/vagrant/cli_test.go b/providers/os/connection/vagrant/cli_test.go index 217c752c29..d40f0449fd 100644 --- a/providers/os/connection/vagrant/cli_test.go +++ b/providers/os/connection/vagrant/cli_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" - "go.mondoo.com/cnquery/v9/providers/os/connection/vagrant" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/connection/vagrant" ) func TestVagrantSshConfigParsing(t *testing.T) { diff --git a/providers/os/detector/detector.go b/providers/os/detector/detector.go index 35f0a4fca4..34c7fa80b6 100644 --- a/providers/os/detector/detector.go +++ b/providers/os/detector/detector.go @@ -6,8 +6,8 @@ package detector import ( "runtime" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) func DetectOS(conn shared.Connection) (*inventory.Platform, bool) { diff --git a/providers/os/detector/detector_all.go b/providers/os/detector/detector_all.go index 44c96d5078..9a2e02e6ef 100644 --- a/providers/os/detector/detector_all.go +++ b/providers/os/detector/detector_all.go @@ -12,9 +12,9 @@ import ( "github.com/rs/zerolog/log" "github.com/spf13/afero" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - win "go.mondoo.com/cnquery/v9/providers/os/detector/windows" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + win "go.mondoo.com/cnquery/v10/providers/os/detector/windows" ) const ( diff --git a/providers/os/detector/detector_platform_test.go b/providers/os/detector/detector_platform_test.go index 89d8b8e0b6..8499f98ad6 100644 --- a/providers/os/detector/detector_platform_test.go +++ b/providers/os/detector/detector_platform_test.go @@ -5,11 +5,11 @@ package detector import ( "errors" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" "testing" "github.com/stretchr/testify/assert" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" ) func detectPlatformFromMock(filepath string) (*inventory.Platform, error) { diff --git a/providers/os/detector/detector_test.go b/providers/os/detector/detector_test.go index 7cee409f78..a1cfc65277 100644 --- a/providers/os/detector/detector_test.go +++ b/providers/os/detector/detector_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" ) func TestFamilyParents(t *testing.T) { diff --git a/providers/os/detector/os_release.go b/providers/os/detector/os_release.go index 6473e21d80..e11d04b17e 100644 --- a/providers/os/detector/os_release.go +++ b/providers/os/detector/os_release.go @@ -10,7 +10,7 @@ import ( "strings" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) func NewOSReleaseDetector(conn shared.Connection) *OSReleaseDetector { diff --git a/providers/os/detector/parser_esxi_version_test.go b/providers/os/detector/parser_esxi_version_test.go index 5eadb0d12c..7ae68b50df 100644 --- a/providers/os/detector/parser_esxi_version_test.go +++ b/providers/os/detector/parser_esxi_version_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers/os/detector" + "go.mondoo.com/cnquery/v10/providers/os/detector" ) func TestEsxiVersionParser(t *testing.T) { diff --git a/providers/os/detector/parser_linux_version_test.go b/providers/os/detector/parser_linux_version_test.go index 0986f5f417..f1a3b1e487 100644 --- a/providers/os/detector/parser_linux_version_test.go +++ b/providers/os/detector/parser_linux_version_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers/os/detector" + "go.mondoo.com/cnquery/v10/providers/os/detector" ) func TestOSReleaseParser(t *testing.T) { diff --git a/providers/os/detector/parser_macos_version_test.go b/providers/os/detector/parser_macos_version_test.go index 7dd78080e0..ec1ebf6965 100644 --- a/providers/os/detector/parser_macos_version_test.go +++ b/providers/os/detector/parser_macos_version_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers/os/detector" + "go.mondoo.com/cnquery/v10/providers/os/detector" ) func TestDarwinRelease(t *testing.T) { diff --git a/providers/os/detector/parser_sol_test.go b/providers/os/detector/parser_sol_test.go index 201af4fcef..da36c406bd 100644 --- a/providers/os/detector/parser_sol_test.go +++ b/providers/os/detector/parser_sol_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers/os/detector" + "go.mondoo.com/cnquery/v10/providers/os/detector" ) func TestOpenSolaris2009Release(t *testing.T) { diff --git a/providers/os/detector/platform_resolver.go b/providers/os/detector/platform_resolver.go index f798279c3b..1193fd4c36 100644 --- a/providers/os/detector/platform_resolver.go +++ b/providers/os/detector/platform_resolver.go @@ -5,9 +5,9 @@ package detector import ( "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) type detect func(r *PlatformResolver, pf *inventory.Platform, conn shared.Connection) (bool, error) diff --git a/providers/os/detector/windows/build_version.go b/providers/os/detector/windows/build_version.go index 2bd889b3a8..bad8faf482 100644 --- a/providers/os/detector/windows/build_version.go +++ b/providers/os/detector/windows/build_version.go @@ -10,8 +10,8 @@ import ( "regexp" "strconv" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/resources/powershell" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/resources/powershell" ) var WinBuildVersionRegex = regexp.MustCompile(`^(\d+)(?:\.(\d+)){0,1}`) diff --git a/providers/os/detector/windows/build_version_unix.go b/providers/os/detector/windows/build_version_unix.go index de5db46a3e..d0425593c4 100644 --- a/providers/os/detector/windows/build_version_unix.go +++ b/providers/os/detector/windows/build_version_unix.go @@ -6,7 +6,7 @@ package windows -import "go.mondoo.com/cnquery/v9/providers/os/connection/shared" +import "go.mondoo.com/cnquery/v10/providers/os/connection/shared" func GetWindowsOSBuild(conn shared.Connection) (*WindowsCurrentVersion, error) { return powershellGetWindowsOSBuild(conn) diff --git a/providers/os/detector/windows/build_version_windows.go b/providers/os/detector/windows/build_version_windows.go index 48ccaf4b56..abd805e17f 100644 --- a/providers/os/detector/windows/build_version_windows.go +++ b/providers/os/detector/windows/build_version_windows.go @@ -9,7 +9,7 @@ package windows import ( "runtime" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" "golang.org/x/sys/windows/registry" ) diff --git a/providers/os/detector/windows/wmi.go b/providers/os/detector/windows/wmi.go index 54277b8d4d..250fb3d2c1 100644 --- a/providers/os/detector/windows/wmi.go +++ b/providers/os/detector/windows/wmi.go @@ -10,8 +10,8 @@ import ( "strconv" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/linefeed" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/linefeed" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) type WmicOSInformation struct { diff --git a/providers/os/detector/windows/wmi_unix.go b/providers/os/detector/windows/wmi_unix.go index a042cf3f85..1be864c270 100644 --- a/providers/os/detector/windows/wmi_unix.go +++ b/providers/os/detector/windows/wmi_unix.go @@ -6,7 +6,7 @@ package windows -import "go.mondoo.com/cnquery/v9/providers/os/connection/shared" +import "go.mondoo.com/cnquery/v10/providers/os/connection/shared" func GetWmiInformation(conn shared.Connection) (*WmicOSInformation, error) { return powershellGetWmiInformation(conn) diff --git a/providers/os/detector/windows/wmi_windows.go b/providers/os/detector/windows/wmi_windows.go index 51ec148382..4f98e61180 100644 --- a/providers/os/detector/windows/wmi_windows.go +++ b/providers/os/detector/windows/wmi_windows.go @@ -12,7 +12,7 @@ import ( "strconv" wmi "github.com/StackExchange/wmi" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) const wmiOSQuery = "SELECT Name, Caption, Manufacturer, OSArchitecture, Version, BuildNumber, Description, OSType, ProductType, SerialNumber FROM Win32_OperatingSystem" diff --git a/providers/os/fsutil/hash_test.go b/providers/os/fsutil/hash_test.go index efb103239c..24b73c2948 100644 --- a/providers/os/fsutil/hash_test.go +++ b/providers/os/fsutil/hash_test.go @@ -8,9 +8,9 @@ import ( "github.com/spf13/afero" "github.com/stretchr/testify/assert" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/local" - "go.mondoo.com/cnquery/v9/providers/os/fsutil" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/local" + "go.mondoo.com/cnquery/v10/providers/os/fsutil" ) func TestFileResource(t *testing.T) { diff --git a/providers/os/gen/main.go b/providers/os/gen/main.go index b1e94d44c4..5b77698987 100644 --- a/providers/os/gen/main.go +++ b/providers/os/gen/main.go @@ -4,8 +4,8 @@ package main import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin/gen" - "go.mondoo.com/cnquery/v9/providers/os/config" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin/gen" + "go.mondoo.com/cnquery/v10/providers/os/config" ) func main() { diff --git a/providers/os/id/aws/aws.go b/providers/os/id/aws/aws.go index 9a9c9b15bb..00915362d1 100644 --- a/providers/os/id/aws/aws.go +++ b/providers/os/id/aws/aws.go @@ -8,11 +8,11 @@ import ( "github.com/rs/zerolog/log" "github.com/spf13/afero" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/id/awsec2" - "go.mondoo.com/cnquery/v9/providers/os/id/awsecs" - "go.mondoo.com/cnquery/v9/providers/os/resources/smbios" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/id/awsec2" + "go.mondoo.com/cnquery/v10/providers/os/id/awsecs" + "go.mondoo.com/cnquery/v10/providers/os/resources/smbios" ) func readValue(conn shared.Connection, fPath string) string { diff --git a/providers/os/id/aws/aws_test.go b/providers/os/id/aws/aws_test.go index 84f1e11551..defbb4c310 100644 --- a/providers/os/id/aws/aws_test.go +++ b/providers/os/id/aws/aws_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" - "go.mondoo.com/cnquery/v9/providers/os/detector" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/detector" ) func TestDetectInstance(t *testing.T) { diff --git a/providers/os/id/awsec2/awsec2.go b/providers/os/id/awsec2/awsec2.go index d2e02be816..3b6183afff 100644 --- a/providers/os/id/awsec2/awsec2.go +++ b/providers/os/id/awsec2/awsec2.go @@ -8,9 +8,9 @@ import ( "github.com/aws/aws-sdk-go-v2/config" "github.com/cockroachdb/errors" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) type Identity struct { diff --git a/providers/os/id/awsec2/metadata_cmd.go b/providers/os/id/awsec2/metadata_cmd.go index 47b43bac35..1b6e0caf2e 100644 --- a/providers/os/id/awsec2/metadata_cmd.go +++ b/providers/os/id/awsec2/metadata_cmd.go @@ -15,9 +15,9 @@ import ( "github.com/aws/aws-sdk-go-v2/service/ec2" ec2types "github.com/aws/aws-sdk-go-v2/service/ec2/types" "github.com/cockroachdb/errors" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/resources/powershell" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/resources/powershell" ) const ( diff --git a/providers/os/id/awsec2/metadata_cmd_test.go b/providers/os/id/awsec2/metadata_cmd_test.go index 315fb54153..c2675f4902 100644 --- a/providers/os/id/awsec2/metadata_cmd_test.go +++ b/providers/os/id/awsec2/metadata_cmd_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" - "go.mondoo.com/cnquery/v9/providers/os/detector" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/detector" ) func TestEC2RoleProviderInstanceIdentityUnix(t *testing.T) { diff --git a/providers/os/id/awsecs/awsecs.go b/providers/os/id/awsecs/awsecs.go index bcad2e88f4..d1a7b8c901 100644 --- a/providers/os/id/awsecs/awsecs.go +++ b/providers/os/id/awsecs/awsecs.go @@ -12,9 +12,9 @@ import ( "github.com/aws/aws-sdk-go/aws/arn" "github.com/cockroachdb/errors" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/id/containerid" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/id/containerid" ) const ( diff --git a/providers/os/id/awsecs/awsecs_test.go b/providers/os/id/awsecs/awsecs_test.go index 52f68706f0..c86a459a17 100644 --- a/providers/os/id/awsecs/awsecs_test.go +++ b/providers/os/id/awsecs/awsecs_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" - "go.mondoo.com/cnquery/v9/providers/os/detector" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/detector" ) func TestParseECSContainerId(t *testing.T) { diff --git a/providers/os/id/azcompute/azcompute.go b/providers/os/id/azcompute/azcompute.go index 038968eec6..6cbe06934d 100644 --- a/providers/os/id/azcompute/azcompute.go +++ b/providers/os/id/azcompute/azcompute.go @@ -9,10 +9,10 @@ import ( "io" "strings" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/resources/powershell" - "go.mondoo.com/cnquery/v9/utils/multierr" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/resources/powershell" + "go.mondoo.com/cnquery/v10/utils/multierr" ) const ( diff --git a/providers/os/id/azcompute/azcompute_test.go b/providers/os/id/azcompute/azcompute_test.go index bcd51cc540..d3ccb76be3 100644 --- a/providers/os/id/azcompute/azcompute_test.go +++ b/providers/os/id/azcompute/azcompute_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" - "go.mondoo.com/cnquery/v9/providers/os/detector" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/detector" ) func TestCommandProviderLinux(t *testing.T) { diff --git a/providers/os/id/azure/azure.go b/providers/os/id/azure/azure.go index 9ac35b3a2b..3bcab04ba6 100644 --- a/providers/os/id/azure/azure.go +++ b/providers/os/id/azure/azure.go @@ -8,10 +8,10 @@ import ( "github.com/rs/zerolog/log" "github.com/spf13/afero" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/id/azcompute" - "go.mondoo.com/cnquery/v9/providers/os/resources/smbios" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/id/azcompute" + "go.mondoo.com/cnquery/v10/providers/os/resources/smbios" ) const ( diff --git a/providers/os/id/clouddetect/clouddetect.go b/providers/os/id/clouddetect/clouddetect.go index fe737e9527..e59be01aea 100644 --- a/providers/os/id/clouddetect/clouddetect.go +++ b/providers/os/id/clouddetect/clouddetect.go @@ -7,11 +7,11 @@ import ( "sync" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/id/aws" - "go.mondoo.com/cnquery/v9/providers/os/id/azure" - "go.mondoo.com/cnquery/v9/providers/os/id/gcp" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/id/aws" + "go.mondoo.com/cnquery/v10/providers/os/id/azure" + "go.mondoo.com/cnquery/v10/providers/os/id/gcp" ) type ( diff --git a/providers/os/id/gce/gce.go b/providers/os/id/gce/gce.go index 88b2f0111f..f885fdf942 100644 --- a/providers/os/id/gce/gce.go +++ b/providers/os/id/gce/gce.go @@ -10,9 +10,9 @@ import ( "strconv" "strings" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/resources/powershell" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/resources/powershell" ) // deprecated: use MondooGcpInstancePlatformMrn diff --git a/providers/os/id/gce/gce_test.go b/providers/os/id/gce/gce_test.go index 8e9a8672e9..1c1a8ba6bc 100644 --- a/providers/os/id/gce/gce_test.go +++ b/providers/os/id/gce/gce_test.go @@ -8,9 +8,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" - "go.mondoo.com/cnquery/v9/providers/os/detector" - "go.mondoo.com/cnquery/v9/providers/os/id/gce" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/detector" + "go.mondoo.com/cnquery/v10/providers/os/id/gce" ) func TestCommandProviderLinux(t *testing.T) { diff --git a/providers/os/id/gcp/gcp.go b/providers/os/id/gcp/gcp.go index ebefbc3901..fdde567f1c 100644 --- a/providers/os/id/gcp/gcp.go +++ b/providers/os/id/gcp/gcp.go @@ -8,10 +8,10 @@ import ( "github.com/rs/zerolog/log" "github.com/spf13/afero" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/id/gce" - "go.mondoo.com/cnquery/v9/providers/os/resources/smbios" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/id/gce" + "go.mondoo.com/cnquery/v10/providers/os/resources/smbios" ) const ( diff --git a/providers/os/id/gcp/gcp_test.go b/providers/os/id/gcp/gcp_test.go index 38aa910fae..3cf4e06527 100644 --- a/providers/os/id/gcp/gcp_test.go +++ b/providers/os/id/gcp/gcp_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" - "go.mondoo.com/cnquery/v9/providers/os/detector" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/detector" ) func TestDetectLinuxInstance(t *testing.T) { diff --git a/providers/os/id/hostname/hostname.go b/providers/os/id/hostname/hostname.go index d93573fc5f..0484e0c8c1 100644 --- a/providers/os/id/hostname/hostname.go +++ b/providers/os/id/hostname/hostname.go @@ -9,8 +9,8 @@ import ( "github.com/rs/zerolog/log" "github.com/spf13/afero" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) func Hostname(conn shared.Connection, pf *inventory.Platform) (string, bool) { diff --git a/providers/os/id/hostname/hostname_test.go b/providers/os/id/hostname/hostname_test.go index a614bce16a..9fee24b327 100644 --- a/providers/os/id/hostname/hostname_test.go +++ b/providers/os/id/hostname/hostname_test.go @@ -8,9 +8,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" - "go.mondoo.com/cnquery/v9/providers/os/detector" - "go.mondoo.com/cnquery/v9/providers/os/id/hostname" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/detector" + "go.mondoo.com/cnquery/v10/providers/os/id/hostname" ) func TestHostnameLinuxEtcHostname(t *testing.T) { diff --git a/providers/os/id/machineid/guid.go b/providers/os/id/machineid/guid.go index 2fcf6a02d8..d12b1edf37 100644 --- a/providers/os/id/machineid/guid.go +++ b/providers/os/id/machineid/guid.go @@ -5,9 +5,9 @@ package machineid import ( "github.com/cockroachdb/errors" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/id/platformid" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/id/platformid" ) func MachineId(conn shared.Connection, p *inventory.Platform) (string, error) { diff --git a/providers/os/id/platform.go b/providers/os/id/platform.go index c1a85cef0d..ae64c3ccf6 100644 --- a/providers/os/id/platform.go +++ b/providers/os/id/platform.go @@ -8,16 +8,16 @@ import ( "fmt" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/detector" - "go.mondoo.com/cnquery/v9/providers/os/id/awsec2" - "go.mondoo.com/cnquery/v9/providers/os/id/awsecs" - "go.mondoo.com/cnquery/v9/providers/os/id/clouddetect" - "go.mondoo.com/cnquery/v9/providers/os/id/hostname" - "go.mondoo.com/cnquery/v9/providers/os/id/ids" - "go.mondoo.com/cnquery/v9/providers/os/id/machineid" - "go.mondoo.com/cnquery/v9/providers/os/id/sshhostkey" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/detector" + "go.mondoo.com/cnquery/v10/providers/os/id/awsec2" + "go.mondoo.com/cnquery/v10/providers/os/id/awsecs" + "go.mondoo.com/cnquery/v10/providers/os/id/clouddetect" + "go.mondoo.com/cnquery/v10/providers/os/id/hostname" + "go.mondoo.com/cnquery/v10/providers/os/id/ids" + "go.mondoo.com/cnquery/v10/providers/os/id/machineid" + "go.mondoo.com/cnquery/v10/providers/os/id/sshhostkey" ) type PlatformFingerprint struct { diff --git a/providers/os/id/platformid/linux.go b/providers/os/id/platformid/linux.go index 323cc8be69..5977f18a0f 100644 --- a/providers/os/id/platformid/linux.go +++ b/providers/os/id/platformid/linux.go @@ -7,7 +7,7 @@ import ( "io" "strings" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) // LinuxIdProvider read the following files to extract the machine id diff --git a/providers/os/id/platformid/linux_test.go b/providers/os/id/platformid/linux_test.go index 2f23a5ad97..0b98f0227b 100644 --- a/providers/os/id/platformid/linux_test.go +++ b/providers/os/id/platformid/linux_test.go @@ -9,7 +9,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" ) func TestLinuxMachineId(t *testing.T) { diff --git a/providers/os/id/platformid/manager.go b/providers/os/id/platformid/manager.go index 4519bc962d..8ef54f3c0b 100644 --- a/providers/os/id/platformid/manager.go +++ b/providers/os/id/platformid/manager.go @@ -4,8 +4,8 @@ package platformid import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) type UniquePlatformIDProvider interface { diff --git a/providers/os/id/platformid/osx.go b/providers/os/id/platformid/osx.go index 534fcd1420..81d387d852 100644 --- a/providers/os/id/platformid/osx.go +++ b/providers/os/id/platformid/osx.go @@ -9,7 +9,7 @@ import ( "regexp" "strings" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) // MacOSIdProvider read the operating system id by calling diff --git a/providers/os/id/platformid/osx_test.go b/providers/os/id/platformid/osx_test.go index 90be78db3c..83f74cd48d 100644 --- a/providers/os/id/platformid/osx_test.go +++ b/providers/os/id/platformid/osx_test.go @@ -9,7 +9,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" ) func TestMacOSMachineId(t *testing.T) { diff --git a/providers/os/id/platformid/win.go b/providers/os/id/platformid/win.go index 7ec4828a8d..79e4480462 100644 --- a/providers/os/id/platformid/win.go +++ b/providers/os/id/platformid/win.go @@ -6,7 +6,7 @@ package platformid import ( "io" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) const wmiMachineIDQuery = "SELECT UUID FROM Win32_ComputerSystemProduct" diff --git a/providers/os/id/platformid/win_guid_unix.go b/providers/os/id/platformid/win_guid_unix.go index c4518163a3..5c6a17e3ad 100644 --- a/providers/os/id/platformid/win_guid_unix.go +++ b/providers/os/id/platformid/win_guid_unix.go @@ -6,7 +6,7 @@ package platformid -import "go.mondoo.com/cnquery/v9/providers/os/connection/shared" +import "go.mondoo.com/cnquery/v10/providers/os/connection/shared" func windowsMachineId(conn shared.Connection) (string, error) { return PowershellWindowsMachineId(conn) diff --git a/providers/os/id/platformid/win_guid_windows.go b/providers/os/id/platformid/win_guid_windows.go index 14e6601b73..0f4ea3ba35 100644 --- a/providers/os/id/platformid/win_guid_windows.go +++ b/providers/os/id/platformid/win_guid_windows.go @@ -11,7 +11,7 @@ import ( "runtime" wmi "github.com/StackExchange/wmi" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) func windowsMachineId(conn shared.Connection) (string, error) { diff --git a/providers/os/id/platformid/win_test.go b/providers/os/id/platformid/win_test.go index abf0d0ae45..53c7bcad52 100644 --- a/providers/os/id/platformid/win_test.go +++ b/providers/os/id/platformid/win_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" ) func TestGuidWindows(t *testing.T) { diff --git a/providers/os/id/sshhostkey/sshhostkey.go b/providers/os/id/sshhostkey/sshhostkey.go index b2b757ffc6..6ac5c37981 100644 --- a/providers/os/id/sshhostkey/sshhostkey.go +++ b/providers/os/id/sshhostkey/sshhostkey.go @@ -8,9 +8,9 @@ import ( "github.com/cockroachdb/errors" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" "golang.org/x/crypto/ssh" ) diff --git a/providers/os/main.go b/providers/os/main.go index da05030443..cf27916b06 100644 --- a/providers/os/main.go +++ b/providers/os/main.go @@ -6,8 +6,8 @@ package main import ( "os" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/os/provider" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/os/provider" ) func main() { diff --git a/providers/os/provider/detector.go b/providers/os/provider/detector.go index 055fc5e501..2b40cc7d1f 100644 --- a/providers/os/provider/detector.go +++ b/providers/os/provider/detector.go @@ -7,16 +7,16 @@ import ( "errors" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/detector" - "go.mondoo.com/cnquery/v9/providers/os/id/aws" - "go.mondoo.com/cnquery/v9/providers/os/id/azure" - "go.mondoo.com/cnquery/v9/providers/os/id/gcp" - "go.mondoo.com/cnquery/v9/providers/os/id/hostname" - "go.mondoo.com/cnquery/v9/providers/os/id/ids" - "go.mondoo.com/cnquery/v9/providers/os/id/machineid" - "go.mondoo.com/cnquery/v9/providers/os/id/sshhostkey" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/detector" + "go.mondoo.com/cnquery/v10/providers/os/id/aws" + "go.mondoo.com/cnquery/v10/providers/os/id/azure" + "go.mondoo.com/cnquery/v10/providers/os/id/gcp" + "go.mondoo.com/cnquery/v10/providers/os/id/hostname" + "go.mondoo.com/cnquery/v10/providers/os/id/ids" + "go.mondoo.com/cnquery/v10/providers/os/id/machineid" + "go.mondoo.com/cnquery/v10/providers/os/id/sshhostkey" ) // default id detectors diff --git a/providers/os/provider/provider.go b/providers/os/provider/provider.go index d7dff74362..421edc4950 100644 --- a/providers/os/provider/provider.go +++ b/providers/os/provider/provider.go @@ -11,21 +11,21 @@ import ( "strings" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" - "go.mondoo.com/cnquery/v9/providers/os/connection" - "go.mondoo.com/cnquery/v9/providers/os/connection/fs" - "go.mondoo.com/cnquery/v9/providers/os/connection/local" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/id" - "go.mondoo.com/cnquery/v9/providers/os/resources" - "go.mondoo.com/cnquery/v9/providers/os/resources/discovery/container_registry" - "go.mondoo.com/cnquery/v9/providers/os/resources/discovery/docker_engine" - "go.mondoo.com/cnquery/v9/utils/stringx" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers/os/connection" + "go.mondoo.com/cnquery/v10/providers/os/connection/fs" + "go.mondoo.com/cnquery/v10/providers/os/connection/local" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/id" + "go.mondoo.com/cnquery/v10/providers/os/resources" + "go.mondoo.com/cnquery/v10/providers/os/resources/discovery/container_registry" + "go.mondoo.com/cnquery/v10/providers/os/resources/discovery/docker_engine" + "go.mondoo.com/cnquery/v10/utils/stringx" ) const ( diff --git a/providers/os/provider/provider_test.go b/providers/os/provider/provider_test.go index 7be6d9574c..8676492134 100644 --- a/providers/os/provider/provider_test.go +++ b/providers/os/provider/provider_test.go @@ -11,11 +11,11 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" - "go.mondoo.com/cnquery/v9/providers/os/id/ids" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers/os/id/ids" ) func TestLocalConnectionIdDetectors(t *testing.T) { diff --git a/providers/os/resources/asset_cpe.go b/providers/os/resources/asset_cpe.go index edd7f9a33a..8ad86b3f79 100644 --- a/providers/os/resources/asset_cpe.go +++ b/providers/os/resources/asset_cpe.go @@ -5,9 +5,9 @@ package resources import ( "github.com/facebookincubator/nvdtools/wfn" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/resources/cpe" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/resources/cpe" "strings" ) diff --git a/providers/os/resources/asset_eol.go b/providers/os/resources/asset_eol.go index 7e85fde08a..c9503bb03a 100644 --- a/providers/os/resources/asset_eol.go +++ b/providers/os/resources/asset_eol.go @@ -6,14 +6,14 @@ package resources import ( "context" "errors" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream/mvd" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream/mvd" "time" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/resources" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/resources" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) // FIXME: DEPRECATED, update in v10.0 vv diff --git a/providers/os/resources/asset_vuln.go b/providers/os/resources/asset_vuln.go index 359a2f6066..9601bee738 100644 --- a/providers/os/resources/asset_vuln.go +++ b/providers/os/resources/asset_vuln.go @@ -9,15 +9,15 @@ import ( "time" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/logger" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/resources" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream/gql" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream/mvd" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream/mvd/cvss" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/logger" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/resources" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream/gql" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream/mvd" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream/mvd/cvss" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) // TODO: generalize this kind of function diff --git a/providers/os/resources/auditpol.go b/providers/os/resources/auditpol.go index a4878434a6..ccd02d7e6d 100644 --- a/providers/os/resources/auditpol.go +++ b/providers/os/resources/auditpol.go @@ -7,8 +7,8 @@ import ( "fmt" "strings" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers/os/resources/windows" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers/os/resources/windows" ) func (p *mqlAuditpol) list() ([]interface{}, error) { diff --git a/providers/os/resources/authorizedkeys.go b/providers/os/resources/authorizedkeys.go index 9f5237113f..0407edba1e 100644 --- a/providers/os/resources/authorizedkeys.go +++ b/providers/os/resources/authorizedkeys.go @@ -8,9 +8,9 @@ import ( "strconv" "strings" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/os/resources/authorizedkeys" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/os/resources/authorizedkeys" ) func (x *mqlAuthorizedkeysEntry) id() (string, error) { diff --git a/providers/os/resources/command.go b/providers/os/resources/command.go index 07b06f66ed..74ddf37a48 100644 --- a/providers/os/resources/command.go +++ b/providers/os/resources/command.go @@ -8,9 +8,9 @@ import ( "io" "sync" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) type mqlCommandInternal struct { diff --git a/providers/os/resources/container.go b/providers/os/resources/container.go index aef499e25b..298c13c9b8 100644 --- a/providers/os/resources/container.go +++ b/providers/os/resources/container.go @@ -5,9 +5,9 @@ package resources import ( "github.com/google/go-containerregistry/pkg/name" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/os/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/os/connection" ) func initContainerImage(runtime *plugin.Runtime, args map[string]*llx.RawData) (map[string]*llx.RawData, plugin.Resource, error) { diff --git a/providers/os/resources/cpe/platforms.go b/providers/os/resources/cpe/platforms.go index ee72d480eb..e9f8ae5107 100644 --- a/providers/os/resources/cpe/platforms.go +++ b/providers/os/resources/cpe/platforms.go @@ -5,7 +5,7 @@ package cpe import ( "bytes" - "go.mondoo.com/cnquery/v9/utils/stringx" + "go.mondoo.com/cnquery/v10/utils/stringx" "regexp" "strconv" "text/template" diff --git a/providers/os/resources/discovery/container_registry/registry.go b/providers/os/resources/discovery/container_registry/registry.go index a5bf24ff95..f68f2a828f 100644 --- a/providers/os/resources/discovery/container_registry/registry.go +++ b/providers/os/resources/discovery/container_registry/registry.go @@ -17,11 +17,11 @@ import ( "github.com/google/go-containerregistry/pkg/name" "github.com/google/go-containerregistry/pkg/v1/remote" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" - "go.mondoo.com/cnquery/v9/providers/os/connection/container/auth" - "go.mondoo.com/cnquery/v9/providers/os/connection/container/image" - "go.mondoo.com/cnquery/v9/providers/os/id/containerid" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers/os/connection/container/auth" + "go.mondoo.com/cnquery/v10/providers/os/connection/container/image" + "go.mondoo.com/cnquery/v10/providers/os/id/containerid" ) func NewContainerRegistryResolver() *DockerRegistryImages { diff --git a/providers/os/resources/discovery/container_registry/resolver.go b/providers/os/resources/discovery/container_registry/resolver.go index 1bc9447e41..2e08ca8f3a 100644 --- a/providers/os/resources/discovery/container_registry/resolver.go +++ b/providers/os/resources/discovery/container_registry/resolver.go @@ -11,9 +11,9 @@ import ( "github.com/google/go-containerregistry/pkg/name" "github.com/google/go-containerregistry/pkg/v1/remote" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/logger" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/logger" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" ) type Resolver struct { diff --git a/providers/os/resources/discovery/docker_engine/client_test.go b/providers/os/resources/discovery/docker_engine/client_test.go index 5b7015a558..dd7f2021f8 100644 --- a/providers/os/resources/discovery/docker_engine/client_test.go +++ b/providers/os/resources/discovery/docker_engine/client_test.go @@ -10,7 +10,7 @@ import ( "github.com/docker/docker/client" "github.com/stretchr/testify/assert" - "go.mondoo.com/cnquery/v9/providers/os/resources/discovery/docker_engine" + "go.mondoo.com/cnquery/v10/providers/os/resources/discovery/docker_engine" ) func resetEnv(env []string) { diff --git a/providers/os/resources/discovery/docker_engine/container.go b/providers/os/resources/discovery/docker_engine/container.go index beafc0a595..f7444eb4bf 100644 --- a/providers/os/resources/discovery/docker_engine/container.go +++ b/providers/os/resources/discovery/docker_engine/container.go @@ -9,8 +9,8 @@ import ( "github.com/docker/docker/api/types" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/id/containerid" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/id/containerid" ) func (e *dockerEngineDiscovery) containerList() ([]types.Container, error) { diff --git a/providers/os/resources/discovery/docker_engine/images.go b/providers/os/resources/discovery/docker_engine/images.go index 65f1a9acbd..b3232c437d 100644 --- a/providers/os/resources/discovery/docker_engine/images.go +++ b/providers/os/resources/discovery/docker_engine/images.go @@ -9,7 +9,7 @@ import ( "github.com/docker/docker/api/types" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" ) // be aware that images are prefixed with sha256:, while containers are not diff --git a/providers/os/resources/discovery/docker_engine/platform.go b/providers/os/resources/discovery/docker_engine/platform.go index 4b58438ba9..c23a121f77 100644 --- a/providers/os/resources/discovery/docker_engine/platform.go +++ b/providers/os/resources/discovery/docker_engine/platform.go @@ -5,8 +5,8 @@ package docker_engine import ( "github.com/google/go-containerregistry/pkg/v1/tarball" - "go.mondoo.com/cnquery/v9/providers/os/fsutil" - "go.mondoo.com/cnquery/v9/providers/os/id/containerid" + "go.mondoo.com/cnquery/v10/providers/os/fsutil" + "go.mondoo.com/cnquery/v10/providers/os/id/containerid" ) func platformID(filename string) (string, error) { diff --git a/providers/os/resources/discovery/docker_engine/resolver.go b/providers/os/resources/discovery/docker_engine/resolver.go index fd241d6933..0a6b678a38 100644 --- a/providers/os/resources/discovery/docker_engine/resolver.go +++ b/providers/os/resources/discovery/docker_engine/resolver.go @@ -10,10 +10,10 @@ import ( "github.com/cockroachdb/errors" "github.com/google/go-containerregistry/pkg/name" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" - "go.mondoo.com/cnquery/v9/providers/os/resources/discovery/container_registry" - "go.mondoo.com/cnquery/v9/utils/stringx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers/os/resources/discovery/container_registry" + "go.mondoo.com/cnquery/v10/utils/stringx" ) const ( diff --git a/providers/os/resources/docker.go b/providers/os/resources/docker.go index b07323b8d5..3bd715073f 100644 --- a/providers/os/resources/docker.go +++ b/providers/os/resources/docker.go @@ -9,8 +9,8 @@ import ( docker_types "github.com/docker/docker/api/types" "github.com/docker/docker/client" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/types" ) func (p *mqlDocker) images() ([]interface{}, error) { diff --git a/providers/os/resources/file.go b/providers/os/resources/file.go index d8e0f1fcbe..3b73ff6cf3 100644 --- a/providers/os/resources/file.go +++ b/providers/os/resources/file.go @@ -9,10 +9,10 @@ import ( "path" "github.com/spf13/afero" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/resources" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/resources" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) func (s *mqlFile) id() (string, error) { diff --git a/providers/os/resources/file_test.go b/providers/os/resources/file_test.go index 2009fdded5..d3c42b4071 100644 --- a/providers/os/resources/file_test.go +++ b/providers/os/resources/file_test.go @@ -8,10 +8,10 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/testutils" - "go.mondoo.com/cnquery/v9/providers/os/resources" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/testutils" + "go.mondoo.com/cnquery/v10/providers/os/resources" ) const passwdContent = `root:x:0:0::/root:/bin/bash diff --git a/providers/os/resources/files.go b/providers/os/resources/files.go index 466eec3d50..c4aa6c31b4 100644 --- a/providers/os/resources/files.go +++ b/providers/os/resources/files.go @@ -11,9 +11,9 @@ import ( "strconv" "strings" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) var findTypes = map[string]string{ diff --git a/providers/os/resources/files_test.go b/providers/os/resources/files_test.go index 9726eefa99..864cd72385 100644 --- a/providers/os/resources/files_test.go +++ b/providers/os/resources/files_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/testutils" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/testutils" ) func TestResource_FilesFind(t *testing.T) { diff --git a/providers/os/resources/group.go b/providers/os/resources/group.go index 16137ec617..edac414bc9 100644 --- a/providers/os/resources/group.go +++ b/providers/os/resources/group.go @@ -8,10 +8,10 @@ import ( "strconv" "sync" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/resources/groups" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/resources/groups" ) type mqlGroupInternal struct { diff --git a/providers/os/resources/groups/dscache.go b/providers/os/resources/groups/dscache.go index 9687ca133f..05cda0e84b 100644 --- a/providers/os/resources/groups/dscache.go +++ b/providers/os/resources/groups/dscache.go @@ -11,7 +11,7 @@ import ( "strings" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) var GROUP_OSX_DSCACHEUTIL_REGEX = regexp.MustCompile(`^(\S+):\s(.*?)$`) diff --git a/providers/os/resources/groups/dscache_test.go b/providers/os/resources/groups/dscache_test.go index c84a595e74..8cc634484f 100644 --- a/providers/os/resources/groups/dscache_test.go +++ b/providers/os/resources/groups/dscache_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/stretchr/testify/assert" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" - "go.mondoo.com/cnquery/v9/providers/os/resources/groups" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/resources/groups" ) func TestParseDscacheutilResult(t *testing.T) { diff --git a/providers/os/resources/groups/etcgroups.go b/providers/os/resources/groups/etcgroups.go index 5e5f43084c..341be9faa0 100644 --- a/providers/os/resources/groups/etcgroups.go +++ b/providers/os/resources/groups/etcgroups.go @@ -10,7 +10,7 @@ import ( "strings" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) // a good description of this file is available at: diff --git a/providers/os/resources/groups/etcgroups_test.go b/providers/os/resources/groups/etcgroups_test.go index b6fea4a7c7..0e64d589ac 100644 --- a/providers/os/resources/groups/etcgroups_test.go +++ b/providers/os/resources/groups/etcgroups_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/stretchr/testify/assert" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" - "go.mondoo.com/cnquery/v9/providers/os/resources/groups" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/resources/groups" ) func TestParseLinuxEtcGroups(t *testing.T) { diff --git a/providers/os/resources/groups/manager.go b/providers/os/resources/groups/manager.go index 4aaae3ba15..df671113ef 100644 --- a/providers/os/resources/groups/manager.go +++ b/providers/os/resources/groups/manager.go @@ -6,7 +6,7 @@ package groups import ( "errors" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) func ResolveManager(conn shared.Connection) (OSGroupManager, error) { diff --git a/providers/os/resources/groups/manager_test.go b/providers/os/resources/groups/manager_test.go index 3e8135041a..8d6250fdf1 100644 --- a/providers/os/resources/groups/manager_test.go +++ b/providers/os/resources/groups/manager_test.go @@ -8,9 +8,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" - "go.mondoo.com/cnquery/v9/providers/os/resources/groups" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/resources/groups" ) func TestManagerDebian(t *testing.T) { diff --git a/providers/os/resources/groups/ps1getlocalgroup.go b/providers/os/resources/groups/ps1getlocalgroup.go index 9aee9972f8..23eb456cf9 100644 --- a/providers/os/resources/groups/ps1getlocalgroup.go +++ b/providers/os/resources/groups/ps1getlocalgroup.go @@ -7,8 +7,8 @@ import ( "encoding/json" "io" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/resources/powershell" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/resources/powershell" ) type WindowsSID struct { diff --git a/providers/os/resources/groups/ps1getlocalgroup_test.go b/providers/os/resources/groups/ps1getlocalgroup_test.go index e39b5d39d1..0ad58f0ed4 100644 --- a/providers/os/resources/groups/ps1getlocalgroup_test.go +++ b/providers/os/resources/groups/ps1getlocalgroup_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" - "go.mondoo.com/cnquery/v9/providers/os/resources/groups" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/resources/groups" ) func TestWindowsGroupsParserFromMock(t *testing.T) { diff --git a/providers/os/resources/iptables.go b/providers/os/resources/iptables.go index 046b4f09c9..a0c960a859 100644 --- a/providers/os/resources/iptables.go +++ b/providers/os/resources/iptables.go @@ -11,8 +11,8 @@ import ( "strconv" "strings" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) // Stat represents a structured statistic entry. diff --git a/providers/os/resources/kernel.go b/providers/os/resources/kernel.go index 468c007545..dc171f54d9 100644 --- a/providers/os/resources/kernel.go +++ b/providers/os/resources/kernel.go @@ -9,12 +9,12 @@ import ( "github.com/cockroachdb/errors" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/resources/kernel" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/resources/kernel" ) func initKernel(runtime *plugin.Runtime, args map[string]*llx.RawData) (map[string]*llx.RawData, plugin.Resource, error) { diff --git a/providers/os/resources/kernel/manager.go b/providers/os/resources/kernel/manager.go index a508348a17..69667dadaa 100644 --- a/providers/os/resources/kernel/manager.go +++ b/providers/os/resources/kernel/manager.go @@ -11,7 +11,7 @@ import ( "github.com/cockroachdb/errors" "github.com/rs/zerolog/log" "github.com/spf13/afero" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) const sysctlPath = "/proc/sys/" diff --git a/providers/os/resources/kernel/manager_test.go b/providers/os/resources/kernel/manager_test.go index 59252daf5f..e212cfb421 100644 --- a/providers/os/resources/kernel/manager_test.go +++ b/providers/os/resources/kernel/manager_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" ) func TestManagerDebian(t *testing.T) { diff --git a/providers/os/resources/kernel/modules_test.go b/providers/os/resources/kernel/modules_test.go index 0e01b361e6..e7fe095c79 100644 --- a/providers/os/resources/kernel/modules_test.go +++ b/providers/os/resources/kernel/modules_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" ) func TestLsmodParser(t *testing.T) { diff --git a/providers/os/resources/kernel/sysctl_test.go b/providers/os/resources/kernel/sysctl_test.go index ceb28942a3..0472b01c2b 100644 --- a/providers/os/resources/kernel/sysctl_test.go +++ b/providers/os/resources/kernel/sysctl_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" ) func TestSysctlDebian(t *testing.T) { diff --git a/providers/os/resources/kubelet.go b/providers/os/resources/kubelet.go index 3ccada22af..c7e961e207 100644 --- a/providers/os/resources/kubelet.go +++ b/providers/os/resources/kubelet.go @@ -13,9 +13,9 @@ import ( "sigs.k8s.io/yaml" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" ) const defaultKubeletConfig = "/var/lib/kubelet/config.yaml" diff --git a/providers/os/resources/kubelet_flags.go b/providers/os/resources/kubelet_flags.go index d0251759dd..47261551c3 100644 --- a/providers/os/resources/kubelet_flags.go +++ b/providers/os/resources/kubelet_flags.go @@ -8,7 +8,7 @@ import ( "regexp" "strings" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" ) // mergeFlagsIntoConfig adds flags to the kubelet config diff --git a/providers/os/resources/kubelet_test.go b/providers/os/resources/kubelet_test.go index ca71b51224..a892ec6061 100644 --- a/providers/os/resources/kubelet_test.go +++ b/providers/os/resources/kubelet_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/testutils" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/testutils" ) func TestResource_K8sKubelet(t *testing.T) { diff --git a/providers/os/resources/logindefs.go b/providers/os/resources/logindefs.go index 4c997497a4..1efad02242 100644 --- a/providers/os/resources/logindefs.go +++ b/providers/os/resources/logindefs.go @@ -7,9 +7,9 @@ import ( "errors" "strings" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/os/resources/logindefs" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/os/resources/logindefs" ) func initLogindefs(runtime *plugin.Runtime, args map[string]*llx.RawData) (map[string]*llx.RawData, plugin.Resource, error) { diff --git a/providers/os/resources/logindefs/logindefs_test.go b/providers/os/resources/logindefs/logindefs_test.go index 983894b9b7..9a768f21b2 100644 --- a/providers/os/resources/logindefs/logindefs_test.go +++ b/providers/os/resources/logindefs/logindefs_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" - "go.mondoo.com/cnquery/v9/providers/os/resources/logindefs" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/resources/logindefs" ) func TestLoginDefsParser(t *testing.T) { diff --git a/providers/os/resources/lsblk.go b/providers/os/resources/lsblk.go index 1c137ab2bb..2b09cf32f1 100644 --- a/providers/os/resources/lsblk.go +++ b/providers/os/resources/lsblk.go @@ -7,8 +7,8 @@ import ( "encoding/json" "errors" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/types" ) func (l *mqlLsblk) id() (string, error) { diff --git a/providers/os/resources/machine.go b/providers/os/resources/machine.go index 710c50d17c..b3816b60b6 100644 --- a/providers/os/resources/machine.go +++ b/providers/os/resources/machine.go @@ -7,10 +7,10 @@ import ( "fmt" "github.com/cockroachdb/errors" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/resources/smbios" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/resources/smbios" ) type mqlMachineInternal struct { diff --git a/providers/os/resources/macos.go b/providers/os/resources/macos.go index 8bf3462006..0665451501 100644 --- a/providers/os/resources/macos.go +++ b/providers/os/resources/macos.go @@ -11,9 +11,9 @@ import ( "io" "strings" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/resources/macos" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/resources/macos" "howett.net/plist" ) diff --git a/providers/os/resources/macos/preferences.go b/providers/os/resources/macos/preferences.go index 22890feb9d..0751ca8a6c 100644 --- a/providers/os/resources/macos/preferences.go +++ b/providers/os/resources/macos/preferences.go @@ -9,7 +9,7 @@ import ( "io" "strings" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" "howett.net/plist" ) diff --git a/providers/os/resources/macos/preferences_test.go b/providers/os/resources/macos/preferences_test.go index 08456654f3..5c9b609b54 100644 --- a/providers/os/resources/macos/preferences_test.go +++ b/providers/os/resources/macos/preferences_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" ) func TestPreferences(t *testing.T) { diff --git a/providers/os/resources/macos/systemsetup_test.go b/providers/os/resources/macos/systemsetup_test.go index 55bec220a2..191fc55f02 100644 --- a/providers/os/resources/macos/systemsetup_test.go +++ b/providers/os/resources/macos/systemsetup_test.go @@ -9,9 +9,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) func TestSystemSetup(t *testing.T) { diff --git a/providers/os/resources/macos_alf.go b/providers/os/resources/macos_alf.go index ed752d9075..ce05424851 100644 --- a/providers/os/resources/macos_alf.go +++ b/providers/os/resources/macos_alf.go @@ -4,10 +4,10 @@ package resources import ( - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/types" ) func initMacosAlf(runtime *plugin.Runtime, args map[string]*llx.RawData) (map[string]*llx.RawData, plugin.Resource, error) { diff --git a/providers/os/resources/mount.go b/providers/os/resources/mount.go index 47ef29e58d..27bfe6592f 100644 --- a/providers/os/resources/mount.go +++ b/providers/os/resources/mount.go @@ -7,11 +7,11 @@ import ( "fmt" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/resources/mount" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/resources/mount" + "go.mondoo.com/cnquery/v10/types" ) func (m *mqlMount) id() (string, error) { diff --git a/providers/os/resources/mount/manager.go b/providers/os/resources/mount/manager.go index 55affc1328..cadf0e2d36 100644 --- a/providers/os/resources/mount/manager.go +++ b/providers/os/resources/mount/manager.go @@ -5,7 +5,7 @@ package mount import ( "github.com/cockroachdb/errors" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) type MountPoint struct { diff --git a/providers/os/resources/mount/manager_test.go b/providers/os/resources/mount/manager_test.go index 4cfc71479b..ccfa32457a 100644 --- a/providers/os/resources/mount/manager_test.go +++ b/providers/os/resources/mount/manager_test.go @@ -8,9 +8,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" - "go.mondoo.com/cnquery/v9/providers/os/resources/mount" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/resources/mount" ) func TestManagerDebian(t *testing.T) { diff --git a/providers/os/resources/mount/mount_test.go b/providers/os/resources/mount/mount_test.go index eb6450ac67..d6ecb29683 100644 --- a/providers/os/resources/mount/mount_test.go +++ b/providers/os/resources/mount/mount_test.go @@ -10,9 +10,9 @@ import ( "github.com/google/go-cmp/cmp" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" - "go.mondoo.com/cnquery/v9/providers/os/resources/mount" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/resources/mount" ) func TestMountLinuxParser(t *testing.T) { diff --git a/providers/os/resources/mql_test.go b/providers/os/resources/mql_test.go index 452f9587c3..14690204f6 100644 --- a/providers/os/resources/mql_test.go +++ b/providers/os/resources/mql_test.go @@ -9,8 +9,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/testutils" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/testutils" ) // Core Language constructs diff --git a/providers/os/resources/networkinterface/interface.go b/providers/os/resources/networkinterface/interface.go index d317906a0d..af42a70f14 100644 --- a/providers/os/resources/networkinterface/interface.go +++ b/providers/os/resources/networkinterface/interface.go @@ -15,9 +15,9 @@ import ( "github.com/cockroachdb/errors" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/resources/powershell" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/resources/powershell" ) var errNoSuchInterface = errors.New("no such network interface") diff --git a/providers/os/resources/networkinterface/interface_test.go b/providers/os/resources/networkinterface/interface_test.go index 738b026c37..411e94e203 100644 --- a/providers/os/resources/networkinterface/interface_test.go +++ b/providers/os/resources/networkinterface/interface_test.go @@ -6,12 +6,12 @@ package networkinterface_test import ( "testing" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" - "go.mondoo.com/cnquery/v9/providers/os/resources/networkinterface" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/resources/networkinterface" ) func TestWindowsRemoteInterface(t *testing.T) { diff --git a/providers/os/resources/npm/packagejson.go b/providers/os/resources/npm/packagejson.go index 00b27126f3..f7a9bdacdd 100644 --- a/providers/os/resources/npm/packagejson.go +++ b/providers/os/resources/npm/packagejson.go @@ -7,7 +7,7 @@ import ( "encoding/json" "io" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream/mvd" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream/mvd" ) // PackageJson allows parsing the package json file diff --git a/providers/os/resources/npm/packagejson_test.go b/providers/os/resources/npm/packagejson_test.go index a5bb8fce49..1533909204 100644 --- a/providers/os/resources/npm/packagejson_test.go +++ b/providers/os/resources/npm/packagejson_test.go @@ -8,8 +8,8 @@ import ( "testing" "github.com/stretchr/testify/assert" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream/mvd" - "go.mondoo.com/cnquery/v9/providers/os/resources/npm" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream/mvd" + "go.mondoo.com/cnquery/v10/providers/os/resources/npm" ) func TestPackageJsonParser(t *testing.T) { diff --git a/providers/os/resources/npm/yarn.go b/providers/os/resources/npm/yarn.go index 6a9db53710..eccbfe0168 100644 --- a/providers/os/resources/npm/yarn.go +++ b/providers/os/resources/npm/yarn.go @@ -12,7 +12,7 @@ import ( "strings" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream/mvd" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream/mvd" "sigs.k8s.io/yaml" ) diff --git a/providers/os/resources/npm/yarn_test.go b/providers/os/resources/npm/yarn_test.go index 6cbb2d4e2d..c82346df36 100644 --- a/providers/os/resources/npm/yarn_test.go +++ b/providers/os/resources/npm/yarn_test.go @@ -8,8 +8,8 @@ import ( "testing" "github.com/stretchr/testify/assert" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream/mvd" - "go.mondoo.com/cnquery/v9/providers/os/resources/npm" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream/mvd" + "go.mondoo.com/cnquery/v10/providers/os/resources/npm" ) func TestYarnParser(t *testing.T) { diff --git a/providers/os/resources/ntp.go b/providers/os/resources/ntp.go index b604f9b443..69fbe4f2bc 100644 --- a/providers/os/resources/ntp.go +++ b/providers/os/resources/ntp.go @@ -7,8 +7,8 @@ import ( "errors" "strings" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" ) func initNtpConf(runtime *plugin.Runtime, args map[string]*llx.RawData) (map[string]*llx.RawData, plugin.Resource, error) { diff --git a/providers/os/resources/os.go b/providers/os/resources/os.go index fddeaf6d8e..b4bdd1be22 100644 --- a/providers/os/resources/os.go +++ b/providers/os/resources/os.go @@ -11,17 +11,17 @@ import ( "github.com/cockroachdb/errors" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/id/hostname" - "go.mondoo.com/cnquery/v9/providers/os/id/platformid" - "go.mondoo.com/cnquery/v9/providers/os/resources/reboot" - "go.mondoo.com/cnquery/v9/providers/os/resources/systemd" - "go.mondoo.com/cnquery/v9/providers/os/resources/updates" - "go.mondoo.com/cnquery/v9/providers/os/resources/uptime" - "go.mondoo.com/cnquery/v9/providers/os/resources/windows" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/id/hostname" + "go.mondoo.com/cnquery/v10/providers/os/id/platformid" + "go.mondoo.com/cnquery/v10/providers/os/resources/reboot" + "go.mondoo.com/cnquery/v10/providers/os/resources/systemd" + "go.mondoo.com/cnquery/v10/providers/os/resources/updates" + "go.mondoo.com/cnquery/v10/providers/os/resources/uptime" + "go.mondoo.com/cnquery/v10/providers/os/resources/windows" ) func (p *mqlOs) rebootpending() (bool, error) { diff --git a/providers/os/resources/os.lr b/providers/os/resources/os.lr index ae2739e81e..f53576f1bc 100644 --- a/providers/os/resources/os.lr +++ b/providers/os/resources/os.lr @@ -5,7 +5,7 @@ import "../../core/resources/core.lr" import "../../network/resources/network.lr" option provider = "go.mondoo.com/cnquery/providers/os" -option go_package = "go.mondoo.com/cnquery/v9/providers/os/resources" +option go_package = "go.mondoo.com/cnquery/v10/providers/os/resources" alias os.base.command = command alias os.base.user = user diff --git a/providers/os/resources/os.lr.go b/providers/os/resources/os.lr.go index 5ceb3f2af9..3f5c50168a 100644 --- a/providers/os/resources/os.lr.go +++ b/providers/os/resources/os.lr.go @@ -9,9 +9,9 @@ import ( "errors" "time" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/types" ) var resourceFactories map[string]plugin.ResourceFactory diff --git a/providers/os/resources/os_rootcertificates.go b/providers/os/resources/os_rootcertificates.go index 2e81317eb5..95377879df 100644 --- a/providers/os/resources/os_rootcertificates.go +++ b/providers/os/resources/os_rootcertificates.go @@ -7,10 +7,10 @@ import ( "errors" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/types" ) var BsdCertFiles = []string{ diff --git a/providers/os/resources/os_test.go b/providers/os/resources/os_test.go index d6e074d72b..1e7cf6801c 100644 --- a/providers/os/resources/os_test.go +++ b/providers/os/resources/os_test.go @@ -6,8 +6,8 @@ package resources_test import ( "testing" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/testutils" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/testutils" ) var x = testutils.InitTester(testutils.LinuxMock()) diff --git a/providers/os/resources/packages.go b/providers/os/resources/packages.go index 947d2382a2..6726024565 100644 --- a/providers/os/resources/packages.go +++ b/providers/os/resources/packages.go @@ -5,16 +5,16 @@ package resources import ( "errors" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/types" "regexp" "sync" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/resources/packages" - "go.mondoo.com/cnquery/v9/utils/multierr" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/resources/packages" + "go.mondoo.com/cnquery/v10/utils/multierr" ) var PKG_IDENTIFIER = regexp.MustCompile(`^(.*):\/\/(.*)\/(.*)\/(.*)$`) diff --git a/providers/os/resources/packages/aix_packages.go b/providers/os/resources/packages/aix_packages.go index e33476f212..0a99874f4a 100644 --- a/providers/os/resources/packages/aix_packages.go +++ b/providers/os/resources/packages/aix_packages.go @@ -7,13 +7,13 @@ import ( "bufio" "fmt" "github.com/package-url/packageurl-go" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - cpe2 "go.mondoo.com/cnquery/v9/providers/os/resources/cpe" - "go.mondoo.com/cnquery/v9/providers/os/resources/purl" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + cpe2 "go.mondoo.com/cnquery/v10/providers/os/resources/cpe" + "go.mondoo.com/cnquery/v10/providers/os/resources/purl" "io" "strings" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) const ( diff --git a/providers/os/resources/packages/aix_packages_test.go b/providers/os/resources/packages/aix_packages_test.go index fbfc4ccd55..7c8955182a 100644 --- a/providers/os/resources/packages/aix_packages_test.go +++ b/providers/os/resources/packages/aix_packages_test.go @@ -4,7 +4,7 @@ package packages import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" "os" "testing" diff --git a/providers/os/resources/packages/apk_packages.go b/providers/os/resources/packages/apk_packages.go index cedc5cca29..799a32e8d5 100644 --- a/providers/os/resources/packages/apk_packages.go +++ b/providers/os/resources/packages/apk_packages.go @@ -7,14 +7,14 @@ import ( "bufio" "fmt" "github.com/package-url/packageurl-go" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - cpe2 "go.mondoo.com/cnquery/v9/providers/os/resources/cpe" - "go.mondoo.com/cnquery/v9/providers/os/resources/purl" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + cpe2 "go.mondoo.com/cnquery/v10/providers/os/resources/cpe" + "go.mondoo.com/cnquery/v10/providers/os/resources/purl" "io" "regexp" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) const ( diff --git a/providers/os/resources/packages/apk_packages_test.go b/providers/os/resources/packages/apk_packages_test.go index 2c01f6e402..26e403a1f5 100644 --- a/providers/os/resources/packages/apk_packages_test.go +++ b/providers/os/resources/packages/apk_packages_test.go @@ -4,12 +4,12 @@ package packages_test import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" "testing" "github.com/stretchr/testify/assert" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" - "go.mondoo.com/cnquery/v9/providers/os/resources/packages" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/resources/packages" ) func TestAlpineApkdbParser(t *testing.T) { diff --git a/providers/os/resources/packages/cos_packages.go b/providers/os/resources/packages/cos_packages.go index 81dd10fd57..b91660fad0 100644 --- a/providers/os/resources/packages/cos_packages.go +++ b/providers/os/resources/packages/cos_packages.go @@ -9,7 +9,7 @@ import ( "fmt" "io" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) const ( diff --git a/providers/os/resources/packages/detect.go b/providers/os/resources/packages/detect.go index 7f168000df..cb0d31699e 100644 --- a/providers/os/resources/packages/detect.go +++ b/providers/os/resources/packages/detect.go @@ -7,8 +7,8 @@ import ( "fmt" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream/mvd" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream/mvd" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) func Detect(conn shared.Connection) ([]Package, map[string]PackageUpdate, error) { diff --git a/providers/os/resources/packages/dpkg_packages.go b/providers/os/resources/packages/dpkg_packages.go index 035cecf070..ea5a370825 100644 --- a/providers/os/resources/packages/dpkg_packages.go +++ b/providers/os/resources/packages/dpkg_packages.go @@ -7,9 +7,9 @@ import ( "bufio" "fmt" "github.com/package-url/packageurl-go" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/resources/cpe" - "go.mondoo.com/cnquery/v9/providers/os/resources/purl" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/resources/cpe" + "go.mondoo.com/cnquery/v10/providers/os/resources/purl" "io" "os" "regexp" @@ -17,7 +17,7 @@ import ( "github.com/rs/zerolog/log" "github.com/spf13/afero" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) const ( diff --git a/providers/os/resources/packages/dpkg_packages_test.go b/providers/os/resources/packages/dpkg_packages_test.go index 11e84708df..0e9fe9db8f 100644 --- a/providers/os/resources/packages/dpkg_packages_test.go +++ b/providers/os/resources/packages/dpkg_packages_test.go @@ -4,13 +4,13 @@ package packages_test import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" - "go.mondoo.com/cnquery/v9/providers/os/resources/packages" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/resources/packages" ) func TestDpkgParser(t *testing.T) { diff --git a/providers/os/resources/packages/freebsd_packages.go b/providers/os/resources/packages/freebsd_packages.go index 66f074e706..36f25e37ff 100644 --- a/providers/os/resources/packages/freebsd_packages.go +++ b/providers/os/resources/packages/freebsd_packages.go @@ -9,7 +9,7 @@ import ( "fmt" "io" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) const ( diff --git a/providers/os/resources/packages/macos_packages.go b/providers/os/resources/packages/macos_packages.go index 4415c77aaa..33977c534a 100644 --- a/providers/os/resources/packages/macos_packages.go +++ b/providers/os/resources/packages/macos_packages.go @@ -9,7 +9,7 @@ import ( "strings" "github.com/cockroachdb/errors" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" plist "howett.net/plist" ) diff --git a/providers/os/resources/packages/macos_packages_test.go b/providers/os/resources/packages/macos_packages_test.go index 1839108739..d6c4d6baea 100644 --- a/providers/os/resources/packages/macos_packages_test.go +++ b/providers/os/resources/packages/macos_packages_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/stretchr/testify/assert" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" - "go.mondoo.com/cnquery/v9/providers/os/resources/packages" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/resources/packages" ) func TestMacOsXPackageParser(t *testing.T) { diff --git a/providers/os/resources/packages/opkg_packages.go b/providers/os/resources/packages/opkg_packages.go index 433e76033e..9c2dd88ad9 100644 --- a/providers/os/resources/packages/opkg_packages.go +++ b/providers/os/resources/packages/opkg_packages.go @@ -11,7 +11,7 @@ import ( "strings" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) const ( diff --git a/providers/os/resources/packages/opkg_packages_test.go b/providers/os/resources/packages/opkg_packages_test.go index bc64668924..439c795be0 100644 --- a/providers/os/resources/packages/opkg_packages_test.go +++ b/providers/os/resources/packages/opkg_packages_test.go @@ -10,9 +10,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" - "go.mondoo.com/cnquery/v9/providers/os/resources/packages" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/resources/packages" ) func TestOpkgListCommandParser(t *testing.T) { diff --git a/providers/os/resources/packages/packages.go b/providers/os/resources/packages/packages.go index 35a7e33e81..3ae36dff8a 100644 --- a/providers/os/resources/packages/packages.go +++ b/providers/os/resources/packages/packages.go @@ -5,7 +5,7 @@ package packages import ( "github.com/cockroachdb/errors" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) type Package struct { diff --git a/providers/os/resources/packages/pacman_packages.go b/providers/os/resources/packages/pacman_packages.go index be558c38f9..925623dabe 100644 --- a/providers/os/resources/packages/pacman_packages.go +++ b/providers/os/resources/packages/pacman_packages.go @@ -7,13 +7,13 @@ import ( "bufio" "fmt" "github.com/package-url/packageurl-go" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/resources/purl" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/resources/purl" "io" "regexp" "github.com/cockroachdb/errors" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) const ( diff --git a/providers/os/resources/packages/pacman_packages_test.go b/providers/os/resources/packages/pacman_packages_test.go index bb36dec9e0..6cd0b89b91 100644 --- a/providers/os/resources/packages/pacman_packages_test.go +++ b/providers/os/resources/packages/pacman_packages_test.go @@ -4,12 +4,12 @@ package packages_test import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" "strings" "testing" "github.com/stretchr/testify/assert" - "go.mondoo.com/cnquery/v9/providers/os/resources/packages" + "go.mondoo.com/cnquery/v10/providers/os/resources/packages" ) func TestPacmanParser(t *testing.T) { diff --git a/providers/os/resources/packages/rpm_packages.go b/providers/os/resources/packages/rpm_packages.go index 207e6baa37..1d5d040ecf 100644 --- a/providers/os/resources/packages/rpm_packages.go +++ b/providers/os/resources/packages/rpm_packages.go @@ -8,8 +8,8 @@ import ( "bytes" "fmt" "github.com/package-url/packageurl-go" - "go.mondoo.com/cnquery/v9/providers/os/resources/cpe" - "go.mondoo.com/cnquery/v9/providers/os/resources/purl" + "go.mondoo.com/cnquery/v10/providers/os/resources/cpe" + "go.mondoo.com/cnquery/v10/providers/os/resources/purl" "io" "os" "path/filepath" @@ -22,8 +22,8 @@ import ( rpmdb "github.com/knqyf263/go-rpmdb/pkg" "github.com/rs/zerolog/log" "github.com/spf13/afero" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) const ( diff --git a/providers/os/resources/packages/rpm_packages_test.go b/providers/os/resources/packages/rpm_packages_test.go index f679b0ed4c..0bbdc66071 100644 --- a/providers/os/resources/packages/rpm_packages_test.go +++ b/providers/os/resources/packages/rpm_packages_test.go @@ -6,7 +6,7 @@ package packages_test import ( "bytes" "fmt" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" "io" "os" "path/filepath" @@ -15,8 +15,8 @@ import ( rpmdb "github.com/knqyf263/go-rpmdb/pkg" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" - "go.mondoo.com/cnquery/v9/providers/os/resources/packages" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/resources/packages" ) func TestRedhat7Parser(t *testing.T) { diff --git a/providers/os/resources/packages/rpm_updates_test.go b/providers/os/resources/packages/rpm_updates_test.go index 29fb324ab7..d798ca3c24 100644 --- a/providers/os/resources/packages/rpm_updates_test.go +++ b/providers/os/resources/packages/rpm_updates_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" ) func TestRpmUpdateParser(t *testing.T) { diff --git a/providers/os/resources/packages/scratch.go b/providers/os/resources/packages/scratch.go index e0a7a4bc74..3f93dcb154 100644 --- a/providers/os/resources/packages/scratch.go +++ b/providers/os/resources/packages/scratch.go @@ -3,7 +3,7 @@ package packages -import "go.mondoo.com/cnquery/v9/providers/os/connection/shared" +import "go.mondoo.com/cnquery/v10/providers/os/connection/shared" type ScratchPkgManager struct { conn shared.Connection diff --git a/providers/os/resources/packages/solaris_packages.go b/providers/os/resources/packages/solaris_packages.go index 91c1a36f9e..222c847bfd 100644 --- a/providers/os/resources/packages/solaris_packages.go +++ b/providers/os/resources/packages/solaris_packages.go @@ -9,7 +9,7 @@ import ( "io" "regexp" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) const ( diff --git a/providers/os/resources/packages/solaris_packages_test.go b/providers/os/resources/packages/solaris_packages_test.go index 095e43e638..e70b81f785 100644 --- a/providers/os/resources/packages/solaris_packages_test.go +++ b/providers/os/resources/packages/solaris_packages_test.go @@ -10,9 +10,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" - "go.mondoo.com/cnquery/v9/providers/os/resources/packages" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/resources/packages" ) func TestFmriParser(t *testing.T) { diff --git a/providers/os/resources/packages/windows_packages.go b/providers/os/resources/packages/windows_packages.go index a8fa45af55..974e85c0d6 100644 --- a/providers/os/resources/packages/windows_packages.go +++ b/providers/os/resources/packages/windows_packages.go @@ -11,10 +11,10 @@ import ( "github.com/cockroachdb/errors" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/detector/windows" - "go.mondoo.com/cnquery/v9/providers/os/resources/powershell" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/detector/windows" + "go.mondoo.com/cnquery/v10/providers/os/resources/powershell" ) // ProcessorArchitecture Enum diff --git a/providers/os/resources/packages/windows_packages_test.go b/providers/os/resources/packages/windows_packages_test.go index b4812f83e5..92e3e6ceff 100644 --- a/providers/os/resources/packages/windows_packages_test.go +++ b/providers/os/resources/packages/windows_packages_test.go @@ -10,9 +10,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" - "go.mondoo.com/cnquery/v9/providers/os/resources/powershell" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/resources/powershell" ) func TestWindowsAppPackagesParser(t *testing.T) { diff --git a/providers/os/resources/pam.go b/providers/os/resources/pam.go index f74fe323d9..3d426126ec 100644 --- a/providers/os/resources/pam.go +++ b/providers/os/resources/pam.go @@ -9,12 +9,12 @@ import ( "strconv" "strings" - "go.mondoo.com/cnquery/v9/checksums" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/resources/pam" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/checksums" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/resources/pam" + "go.mondoo.com/cnquery/v10/types" ) const ( diff --git a/providers/os/resources/parse.go b/providers/os/resources/parse.go index ac12f14923..4a2de88bcc 100644 --- a/providers/os/resources/parse.go +++ b/providers/os/resources/parse.go @@ -9,11 +9,11 @@ import ( "errors" "strings" - "go.mondoo.com/cnquery/v9/checksums" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/os/resources/parsers" - "go.mondoo.com/cnquery/v9/providers/os/resources/plist" + "go.mondoo.com/cnquery/v10/checksums" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/os/resources/parsers" + "go.mondoo.com/cnquery/v10/providers/os/resources/plist" "sigs.k8s.io/yaml" ) diff --git a/providers/os/resources/parse_test.go b/providers/os/resources/parse_test.go index a99bf351bc..fddf3cb979 100644 --- a/providers/os/resources/parse_test.go +++ b/providers/os/resources/parse_test.go @@ -6,7 +6,7 @@ package resources_test import ( "testing" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/testutils" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/testutils" ) func TestParsePlist(t *testing.T) { diff --git a/providers/os/resources/port.go b/providers/os/resources/port.go index b768e4a229..5b97638e7c 100644 --- a/providers/os/resources/port.go +++ b/providers/os/resources/port.go @@ -18,12 +18,12 @@ import ( "unsafe" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/resources/lsof" - "go.mondoo.com/cnquery/v9/providers/os/resources/ports" - "go.mondoo.com/cnquery/v9/providers/os/resources/powershell" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/resources/lsof" + "go.mondoo.com/cnquery/v10/providers/os/resources/ports" + "go.mondoo.com/cnquery/v10/providers/os/resources/powershell" ) type mqlPortsInternal struct { diff --git a/providers/os/resources/powershell.go b/providers/os/resources/powershell.go index 83bf058ca2..dc9d89ba4d 100644 --- a/providers/os/resources/powershell.go +++ b/providers/os/resources/powershell.go @@ -9,9 +9,9 @@ import ( "sync" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/resources/powershell" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/resources/powershell" "golang.org/x/net/html/charset" "golang.org/x/text/transform" ) diff --git a/providers/os/resources/powershell/encode_test.go b/providers/os/resources/powershell/encode_test.go index 195d0e7172..f00622d75a 100644 --- a/providers/os/resources/powershell/encode_test.go +++ b/providers/os/resources/powershell/encode_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - "go.mondoo.com/cnquery/v9/providers/os/resources/powershell" + "go.mondoo.com/cnquery/v10/providers/os/resources/powershell" ) func TestPowershellEncoding(t *testing.T) { diff --git a/providers/os/resources/privatekey.go b/providers/os/resources/privatekey.go index 31cdf9fb53..466aa0f322 100644 --- a/providers/os/resources/privatekey.go +++ b/providers/os/resources/privatekey.go @@ -6,8 +6,8 @@ package resources import ( "errors" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" ) func initPrivatekey(runtime *plugin.Runtime, args map[string]*llx.RawData) (map[string]*llx.RawData, plugin.Resource, error) { diff --git a/providers/os/resources/processes.go b/providers/os/resources/processes.go index a18ddc8043..139a5f4a6d 100644 --- a/providers/os/resources/processes.go +++ b/providers/os/resources/processes.go @@ -10,10 +10,10 @@ import ( "sync" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/resources/processes" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/resources/processes" ) type mqlProcessInternal struct { diff --git a/providers/os/resources/processes/docker_test.go b/providers/os/resources/processes/docker_test.go index 0d266904cb..762e2c1373 100644 --- a/providers/os/resources/processes/docker_test.go +++ b/providers/os/resources/processes/docker_test.go @@ -19,7 +19,7 @@ import ( specs "github.com/opencontainers/image-spec/specs-go/v1" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers/os/connection" + "go.mondoo.com/cnquery/v10/providers/os/connection" ) func TestDockerProcsList(t *testing.T) { diff --git a/providers/os/resources/processes/dockertop.go b/providers/os/resources/processes/dockertop.go index 9845158c64..55bfd41b2f 100644 --- a/providers/os/resources/processes/dockertop.go +++ b/providers/os/resources/processes/dockertop.go @@ -8,9 +8,9 @@ import ( "fmt" "strconv" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/os/connection" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/os/connection" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) type DockerTopManager struct { diff --git a/providers/os/resources/processes/linuxproc.go b/providers/os/resources/processes/linuxproc.go index 825856bfff..892629ec9a 100644 --- a/providers/os/resources/processes/linuxproc.go +++ b/providers/os/resources/processes/linuxproc.go @@ -10,9 +10,9 @@ import ( "github.com/cockroachdb/errors" "github.com/rs/zerolog/log" "github.com/spf13/afero" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/resources/procfs" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/resources/procfs" ) type LinuxProcManager struct { diff --git a/providers/os/resources/processes/manager.go b/providers/os/resources/processes/manager.go index ca9d4d9eee..975d2c2b04 100644 --- a/providers/os/resources/processes/manager.go +++ b/providers/os/resources/processes/manager.go @@ -6,10 +6,10 @@ package processes import ( "errors" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/os/connection" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/os/connection" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) type OSProcess struct { diff --git a/providers/os/resources/processes/manager_test.go b/providers/os/resources/processes/manager_test.go index 3f023d6d95..58648498c6 100644 --- a/providers/os/resources/processes/manager_test.go +++ b/providers/os/resources/processes/manager_test.go @@ -8,9 +8,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" - "go.mondoo.com/cnquery/v9/providers/os/resources/processes" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/resources/processes" ) func TestManagerDebian(t *testing.T) { diff --git a/providers/os/resources/processes/ps1getprocess.go b/providers/os/resources/processes/ps1getprocess.go index 1747f9dbc7..2733e9bf61 100644 --- a/providers/os/resources/processes/ps1getprocess.go +++ b/providers/os/resources/processes/ps1getprocess.go @@ -10,9 +10,9 @@ import ( "io" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/resources/powershell" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/resources/powershell" ) const ( diff --git a/providers/os/resources/processes/ps1getprocess_test.go b/providers/os/resources/processes/ps1getprocess_test.go index 46f6b0291d..432eeda156 100644 --- a/providers/os/resources/processes/ps1getprocess_test.go +++ b/providers/os/resources/processes/ps1getprocess_test.go @@ -9,7 +9,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers/os/resources/processes" + "go.mondoo.com/cnquery/v10/providers/os/resources/processes" ) func TestWindows2019ServiceParser(t *testing.T) { diff --git a/providers/os/resources/processes/unixps.go b/providers/os/resources/processes/unixps.go index 5d90043a68..5c57ca07aa 100644 --- a/providers/os/resources/processes/unixps.go +++ b/providers/os/resources/processes/unixps.go @@ -14,9 +14,9 @@ import ( "github.com/kballard/go-shellquote" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) var ( diff --git a/providers/os/resources/processes/unixps_test.go b/providers/os/resources/processes/unixps_test.go index 6454406000..15ba3b0ddc 100644 --- a/providers/os/resources/processes/unixps_test.go +++ b/providers/os/resources/processes/unixps_test.go @@ -11,9 +11,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" - "go.mondoo.com/cnquery/v9/providers/os/resources/processes" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/resources/processes" ) func TestLinuxPSProcessParser(t *testing.T) { diff --git a/providers/os/resources/processes_test.go b/providers/os/resources/processes_test.go index 5117cacac0..9636516e11 100644 --- a/providers/os/resources/processes_test.go +++ b/providers/os/resources/processes_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/stretchr/testify/assert" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/types" ) func TestResource_Processes(t *testing.T) { diff --git a/providers/os/resources/procfs/cpu_info_test.go b/providers/os/resources/procfs/cpu_info_test.go index 3c556ec535..4457dba52f 100644 --- a/providers/os/resources/procfs/cpu_info_test.go +++ b/providers/os/resources/procfs/cpu_info_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" ) func TestParseProcCpuX64(t *testing.T) { diff --git a/providers/os/resources/procfs/processes_test.go b/providers/os/resources/procfs/processes_test.go index 67693e184d..181809ded2 100644 --- a/providers/os/resources/procfs/processes_test.go +++ b/providers/os/resources/procfs/processes_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" ) func TestParseProcessStatus(t *testing.T) { diff --git a/providers/os/resources/purl/purl.go b/providers/os/resources/purl/purl.go index 8acb7c0a6a..605c562ac5 100644 --- a/providers/os/resources/purl/purl.go +++ b/providers/os/resources/purl/purl.go @@ -5,8 +5,8 @@ package purl import ( "github.com/package-url/packageurl-go" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/detector" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/detector" "sort" "strings" ) diff --git a/providers/os/resources/python.go b/providers/os/resources/python.go index f48f16c25f..b2819b5be1 100644 --- a/providers/os/resources/python.go +++ b/providers/os/resources/python.go @@ -13,10 +13,10 @@ import ( "github.com/rs/zerolog/log" "github.com/spf13/afero" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/resources/python" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/resources/python" ) type pythonDirectory struct { diff --git a/providers/os/resources/python/mime.go b/providers/os/resources/python/mime.go index f98f3cbaed..68231256b1 100644 --- a/providers/os/resources/python/mime.go +++ b/providers/os/resources/python/mime.go @@ -7,7 +7,7 @@ import ( "bufio" "fmt" "github.com/package-url/packageurl-go" - "go.mondoo.com/cnquery/v9/providers/os/resources/cpe" + "go.mondoo.com/cnquery/v10/providers/os/resources/cpe" "io" "net/textproto" "strings" diff --git a/providers/os/resources/python/testdata/rhel.json b/providers/os/resources/python/testdata/rhel.json index e64efc367c..245b2ffd1c 100644 --- a/providers/os/resources/python/testdata/rhel.json +++ b/providers/os/resources/python/testdata/rhel.json @@ -24,7 +24,7 @@ "connections": [ { "url": "docker-image://registry.access.redhat.com/ubi8/ubi", - "provider": "go.mondoo.com/cnquery/v9/providers/os", + "provider": "go.mondoo.com/cnquery/v10/providers/os", "connector": "docker-image", "version": "" } diff --git a/providers/os/resources/python_package.go b/providers/os/resources/python_package.go index 8345c36e99..d54fc022cc 100644 --- a/providers/os/resources/python_package.go +++ b/providers/os/resources/python_package.go @@ -9,11 +9,11 @@ import ( "strings" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/os/resources/python" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/os/resources/python" + "go.mondoo.com/cnquery/v10/types" ) func (k *mqlPythonPackage) id() (string, error) { diff --git a/providers/os/resources/python_test.go b/providers/os/resources/python_test.go index f58bdf3ec9..d69357524e 100644 --- a/providers/os/resources/python_test.go +++ b/providers/os/resources/python_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/testutils" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/testutils" ) func TestResource_Python(t *testing.T) { diff --git a/providers/os/resources/reboot/debian.go b/providers/os/resources/reboot/debian.go index 4e3803286e..589db960ae 100644 --- a/providers/os/resources/reboot/debian.go +++ b/providers/os/resources/reboot/debian.go @@ -3,7 +3,7 @@ package reboot -import "go.mondoo.com/cnquery/v9/providers/os/connection/shared" +import "go.mondoo.com/cnquery/v10/providers/os/connection/shared" const LinuxRebootFile = "/var/run/reboot-required" diff --git a/providers/os/resources/reboot/debian_test.go b/providers/os/resources/reboot/debian_test.go index 985739cd6c..74174b435d 100644 --- a/providers/os/resources/reboot/debian_test.go +++ b/providers/os/resources/reboot/debian_test.go @@ -9,8 +9,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" ) func TestRebootLinux(t *testing.T) { diff --git a/providers/os/resources/reboot/reboot.go b/providers/os/resources/reboot/reboot.go index 522700ca0e..f48b043a1e 100644 --- a/providers/os/resources/reboot/reboot.go +++ b/providers/os/resources/reboot/reboot.go @@ -6,8 +6,8 @@ package reboot import ( "errors" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) type Reboot interface { diff --git a/providers/os/resources/reboot/reboot_test.go b/providers/os/resources/reboot/reboot_test.go index 21621639a7..71c0269f4c 100644 --- a/providers/os/resources/reboot/reboot_test.go +++ b/providers/os/resources/reboot/reboot_test.go @@ -9,8 +9,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" ) func TestRebootOnUbuntu(t *testing.T) { diff --git a/providers/os/resources/reboot/rhel.go b/providers/os/resources/reboot/rhel.go index 0bfef34e16..f69cc8c7af 100644 --- a/providers/os/resources/reboot/rhel.go +++ b/providers/os/resources/reboot/rhel.go @@ -4,13 +4,13 @@ package reboot import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" "io" "strings" - "go.mondoo.com/cnquery/v9/providers/core/resources/versions/rpm" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/resources/packages" + "go.mondoo.com/cnquery/v10/providers/core/resources/versions/rpm" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/resources/packages" ) // RpmNewestKernel works on all machines running rpm diff --git a/providers/os/resources/reboot/rhel_test.go b/providers/os/resources/reboot/rhel_test.go index 26d392307f..416b963050 100644 --- a/providers/os/resources/reboot/rhel_test.go +++ b/providers/os/resources/reboot/rhel_test.go @@ -9,8 +9,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" ) func TestRhelKernelLatest(t *testing.T) { diff --git a/providers/os/resources/reboot/windows.go b/providers/os/resources/reboot/windows.go index 3c05008399..f39c825fcc 100644 --- a/providers/os/resources/reboot/windows.go +++ b/providers/os/resources/reboot/windows.go @@ -7,8 +7,8 @@ import ( "io" "strings" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/resources/powershell" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/resources/powershell" ) const ( diff --git a/providers/os/resources/registrykey.go b/providers/os/resources/registrykey.go index ca78d93039..93056a1f6c 100644 --- a/providers/os/resources/registrykey.go +++ b/providers/os/resources/registrykey.go @@ -8,12 +8,12 @@ import ( "runtime" "strings" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/resources/powershell" - "go.mondoo.com/cnquery/v9/providers/os/resources/windows" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/resources/powershell" + "go.mondoo.com/cnquery/v10/providers/os/resources/windows" "go.mondoo.com/ranger-rpc/codes" "go.mondoo.com/ranger-rpc/status" ) diff --git a/providers/os/resources/registrykey_test.go b/providers/os/resources/registrykey_test.go index ac789e5318..ee9b17995d 100644 --- a/providers/os/resources/registrykey_test.go +++ b/providers/os/resources/registrykey_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/stretchr/testify/assert" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/types" ) func TestResource_Registrykey(t *testing.T) { diff --git a/providers/os/resources/rsyslog.go b/providers/os/resources/rsyslog.go index 3cae058063..41b3d4d083 100644 --- a/providers/os/resources/rsyslog.go +++ b/providers/os/resources/rsyslog.go @@ -7,9 +7,9 @@ import ( "errors" "strings" - "go.mondoo.com/cnquery/v9/checksums" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/resources" + "go.mondoo.com/cnquery/v10/checksums" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/resources" ) const defaultRsyslogConf = "/etc/rsyslog.conf" diff --git a/providers/os/resources/secpol.go b/providers/os/resources/secpol.go index 19fa101fa4..f7b22b7ee0 100644 --- a/providers/os/resources/secpol.go +++ b/providers/os/resources/secpol.go @@ -7,9 +7,9 @@ import ( "fmt" "strings" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers/os/resources/powershell" - "go.mondoo.com/cnquery/v9/providers/os/resources/windows" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers/os/resources/powershell" + "go.mondoo.com/cnquery/v10/providers/os/resources/windows" ) type mqlSecpolInternal struct { diff --git a/providers/os/resources/services.go b/providers/os/resources/services.go index d57d55cbc0..3e2dd42ee7 100644 --- a/providers/os/resources/services.go +++ b/providers/os/resources/services.go @@ -9,10 +9,10 @@ import ( "sync" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/resources/services" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/resources/services" ) func initService(runtime *plugin.Runtime, args map[string]*llx.RawData) (map[string]*llx.RawData, plugin.Resource, error) { diff --git a/providers/os/resources/services/aixlssrc.go b/providers/os/resources/services/aixlssrc.go index 25e7059c0a..031deb8163 100644 --- a/providers/os/resources/services/aixlssrc.go +++ b/providers/os/resources/services/aixlssrc.go @@ -8,7 +8,7 @@ import ( "io" "regexp" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) type AixServiceManager struct { diff --git a/providers/os/resources/services/alpine_openrc.go b/providers/os/resources/services/alpine_openrc.go index 0a189bded7..faa4db785b 100644 --- a/providers/os/resources/services/alpine_openrc.go +++ b/providers/os/resources/services/alpine_openrc.go @@ -10,7 +10,7 @@ import ( "regexp" "github.com/spf13/afero" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) type AlpineOpenrcServiceManager struct { diff --git a/providers/os/resources/services/alpine_openrc_test.go b/providers/os/resources/services/alpine_openrc_test.go index 4803b0fb45..7f68f8a9fe 100644 --- a/providers/os/resources/services/alpine_openrc_test.go +++ b/providers/os/resources/services/alpine_openrc_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" ) func TestManagerAlpineImage(t *testing.T) { diff --git a/providers/os/resources/services/bsdinit.go b/providers/os/resources/services/bsdinit.go index d5160b0a0c..bc770dde55 100644 --- a/providers/os/resources/services/bsdinit.go +++ b/providers/os/resources/services/bsdinit.go @@ -8,7 +8,7 @@ import ( "io" "strings" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) func ParseBsdInit(input io.Reader) ([]*Service, error) { diff --git a/providers/os/resources/services/bsdinit_test.go b/providers/os/resources/services/bsdinit_test.go index c951c443fa..f502d3dd43 100644 --- a/providers/os/resources/services/bsdinit_test.go +++ b/providers/os/resources/services/bsdinit_test.go @@ -7,9 +7,9 @@ import ( "testing" "github.com/stretchr/testify/assert" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" - "go.mondoo.com/cnquery/v9/providers/os/resources/services" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/resources/services" ) func TestParseBsdInit(t *testing.T) { diff --git a/providers/os/resources/services/launchd.go b/providers/os/resources/services/launchd.go index 29e97a8d1b..9f1c6be9c8 100644 --- a/providers/os/resources/services/launchd.go +++ b/providers/os/resources/services/launchd.go @@ -7,7 +7,7 @@ import ( "io" "regexp" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) var LAUNCHD_REGEX = regexp.MustCompile(`(?m)^\s*([\d-]*)\s+(\d)\s+(.*)$`) diff --git a/providers/os/resources/services/launchd_test.go b/providers/os/resources/services/launchd_test.go index 61a8d4b006..ea8c46038b 100644 --- a/providers/os/resources/services/launchd_test.go +++ b/providers/os/resources/services/launchd_test.go @@ -7,9 +7,9 @@ import ( "testing" "github.com/stretchr/testify/assert" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" - "go.mondoo.com/cnquery/v9/providers/os/resources/services" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/resources/services" ) func TestParseServiceLaunchD(t *testing.T) { diff --git a/providers/os/resources/services/manager.go b/providers/os/resources/services/manager.go index 74c8a0a262..331f61408d 100644 --- a/providers/os/resources/services/manager.go +++ b/providers/os/resources/services/manager.go @@ -7,8 +7,8 @@ import ( "errors" "regexp" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/detector" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/detector" ) type Service struct { diff --git a/providers/os/resources/services/manager_test.go b/providers/os/resources/services/manager_test.go index 2c2bfbcf7d..1a26d543c7 100644 --- a/providers/os/resources/services/manager_test.go +++ b/providers/os/resources/services/manager_test.go @@ -7,9 +7,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" - "go.mondoo.com/cnquery/v9/providers/os/resources/services" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/resources/services" ) func TestManagerMacos(t *testing.T) { diff --git a/providers/os/resources/services/openbsdrcctl.go b/providers/os/resources/services/openbsdrcctl.go index 925c3af102..5775b8c79a 100644 --- a/providers/os/resources/services/openbsdrcctl.go +++ b/providers/os/resources/services/openbsdrcctl.go @@ -8,7 +8,7 @@ import ( "io" "strings" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) // https://man.openbsd.org/rcctl diff --git a/providers/os/resources/services/openbsdrcctl_test.go b/providers/os/resources/services/openbsdrcctl_test.go index 590c1c4fce..17844deb38 100644 --- a/providers/os/resources/services/openbsdrcctl_test.go +++ b/providers/os/resources/services/openbsdrcctl_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" ) func TestParseOpenbsdServicesRunning(t *testing.T) { diff --git a/providers/os/resources/services/ps1getservice.go b/providers/os/resources/services/ps1getservice.go index c76c2b4b42..ccae91a692 100644 --- a/providers/os/resources/services/ps1getservice.go +++ b/providers/os/resources/services/ps1getservice.go @@ -7,8 +7,8 @@ import ( "encoding/json" "io" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/resources/powershell" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/resources/powershell" ) // WindowsService calls powershell Get-Service diff --git a/providers/os/resources/services/ps1getservice_test.go b/providers/os/resources/services/ps1getservice_test.go index 20f9d2469d..98a629c4b7 100644 --- a/providers/os/resources/services/ps1getservice_test.go +++ b/providers/os/resources/services/ps1getservice_test.go @@ -8,7 +8,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - "go.mondoo.com/cnquery/v9/providers/os/resources/services" + "go.mondoo.com/cnquery/v10/providers/os/resources/services" ) func TestWindowsServiceParser(t *testing.T) { diff --git a/providers/os/resources/services/systemd.go b/providers/os/resources/services/systemd.go index 64ad2d9030..7ccabd4422 100644 --- a/providers/os/resources/services/systemd.go +++ b/providers/os/resources/services/systemd.go @@ -16,7 +16,7 @@ import ( "github.com/coreos/go-systemd/unit" "github.com/spf13/afero" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) var ( diff --git a/providers/os/resources/services/systemd_test.go b/providers/os/resources/services/systemd_test.go index b6670d9c5c..1701c9037b 100644 --- a/providers/os/resources/services/systemd_test.go +++ b/providers/os/resources/services/systemd_test.go @@ -8,9 +8,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" - "go.mondoo.com/cnquery/v9/providers/os/fs" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/fs" ) func TestSystemDExtractDescription(t *testing.T) { diff --git a/providers/os/resources/services/sysv.go b/providers/os/resources/services/sysv.go index ffa2fa2a21..b0b2c8377a 100644 --- a/providers/os/resources/services/sysv.go +++ b/providers/os/resources/services/sysv.go @@ -11,8 +11,8 @@ import ( "strings" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/utils/stringx" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/utils/stringx" ) type SysVServiceManager struct { diff --git a/providers/os/resources/services/sysv_test.go b/providers/os/resources/services/sysv_test.go index 4fb9ff2f55..92dc8dea08 100644 --- a/providers/os/resources/services/sysv_test.go +++ b/providers/os/resources/services/sysv_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" ) func TestParseSysvServices(t *testing.T) { diff --git a/providers/os/resources/services/upstart_test.go b/providers/os/resources/services/upstart_test.go index 699d07366d..c7ab7aafd4 100644 --- a/providers/os/resources/services/upstart_test.go +++ b/providers/os/resources/services/upstart_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" ) func TestParseUpstartServicesRunning(t *testing.T) { diff --git a/providers/os/resources/shadow.go b/providers/os/resources/shadow.go index 0fb0d6ee2b..06ad3223b7 100644 --- a/providers/os/resources/shadow.go +++ b/providers/os/resources/shadow.go @@ -10,8 +10,8 @@ import ( "strings" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers/os/resources/shadow" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers/os/resources/shadow" ) const defaultShadowConfig = "/etc/shadow" diff --git a/providers/os/resources/shadow/shadow_test.go b/providers/os/resources/shadow/shadow_test.go index 790afca8e8..88d472cc4c 100644 --- a/providers/os/resources/shadow/shadow_test.go +++ b/providers/os/resources/shadow/shadow_test.go @@ -9,8 +9,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" - "go.mondoo.com/cnquery/v9/providers/os/resources/shadow" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/resources/shadow" ) func TestParseShadow(t *testing.T) { diff --git a/providers/os/resources/smbios/linux.go b/providers/os/resources/smbios/linux.go index 376d0faea9..133a89b254 100644 --- a/providers/os/resources/smbios/linux.go +++ b/providers/os/resources/smbios/linux.go @@ -10,7 +10,7 @@ import ( "strings" "github.com/spf13/afero" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) type LinuxSmbiosManager struct { diff --git a/providers/os/resources/smbios/osx.go b/providers/os/resources/smbios/osx.go index a90081c8ed..91c36191f4 100644 --- a/providers/os/resources/smbios/osx.go +++ b/providers/os/resources/smbios/osx.go @@ -8,8 +8,8 @@ import ( "io" "strings" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" plist "howett.net/plist" ) diff --git a/providers/os/resources/smbios/smbios.go b/providers/os/resources/smbios/smbios.go index e02100c981..da5a789924 100644 --- a/providers/os/resources/smbios/smbios.go +++ b/providers/os/resources/smbios/smbios.go @@ -6,8 +6,8 @@ package smbios import ( "errors" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) type SmBiosInfo struct { diff --git a/providers/os/resources/smbios/smbios_test.go b/providers/os/resources/smbios/smbios_test.go index c90c54f3cf..ab11b0986f 100644 --- a/providers/os/resources/smbios/smbios_test.go +++ b/providers/os/resources/smbios/smbios_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" - "go.mondoo.com/cnquery/v9/providers/os/detector" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/detector" ) func TestManagerCentos(t *testing.T) { diff --git a/providers/os/resources/smbios/win.go b/providers/os/resources/smbios/win.go index dab6e76728..9a5d6b3291 100644 --- a/providers/os/resources/smbios/win.go +++ b/providers/os/resources/smbios/win.go @@ -7,8 +7,8 @@ import ( "encoding/json" "io" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/resources/powershell" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/resources/powershell" ) const smbiosWindowsScript = ` diff --git a/providers/os/resources/sshd.go b/providers/os/resources/sshd.go index 0eabb77d39..6190e9526f 100644 --- a/providers/os/resources/sshd.go +++ b/providers/os/resources/sshd.go @@ -9,10 +9,10 @@ import ( "fmt" "strings" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/resources/sshd" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/resources/sshd" ) func initSshdConfig(runtime *plugin.Runtime, args map[string]*llx.RawData) (map[string]*llx.RawData, plugin.Resource, error) { diff --git a/providers/os/resources/sshd/include.go b/providers/os/resources/sshd/include.go index 9761ce20c4..bf9ff82fd1 100644 --- a/providers/os/resources/sshd/include.go +++ b/providers/os/resources/sshd/include.go @@ -13,7 +13,7 @@ import ( "strings" "github.com/spf13/afero" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) var ( diff --git a/providers/os/resources/sshd_test.go b/providers/os/resources/sshd_test.go index c23c5911c0..30c920c540 100644 --- a/providers/os/resources/sshd_test.go +++ b/providers/os/resources/sshd_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/testutils" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/testutils" ) func TestResource_SSHD(t *testing.T) { diff --git a/providers/os/resources/updates/mac_updates.go b/providers/os/resources/updates/mac_updates.go index 8bc3595770..162d397f87 100644 --- a/providers/os/resources/updates/mac_updates.go +++ b/providers/os/resources/updates/mac_updates.go @@ -8,7 +8,7 @@ import ( "io" "strings" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" "howett.net/plist" ) diff --git a/providers/os/resources/updates/suse_updates.go b/providers/os/resources/updates/suse_updates.go index 55f0b7956e..43dfebb04e 100644 --- a/providers/os/resources/updates/suse_updates.go +++ b/providers/os/resources/updates/suse_updates.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/resources/packages" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/resources/packages" ) const ( diff --git a/providers/os/resources/updates/suse_updates_test.go b/providers/os/resources/updates/suse_updates_test.go index e97002fbd0..0822dd4066 100644 --- a/providers/os/resources/updates/suse_updates_test.go +++ b/providers/os/resources/updates/suse_updates_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/stretchr/testify/assert" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" ) // SUSE OS updates diff --git a/providers/os/resources/updates/updates.go b/providers/os/resources/updates/updates.go index 2c35632df8..9f21719dc1 100644 --- a/providers/os/resources/updates/updates.go +++ b/providers/os/resources/updates/updates.go @@ -6,7 +6,7 @@ package updates import ( "errors" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) type OperatingSystemUpdate struct { diff --git a/providers/os/resources/updates/win_updates.go b/providers/os/resources/updates/win_updates.go index b7a03996dd..9cab253e49 100644 --- a/providers/os/resources/updates/win_updates.go +++ b/providers/os/resources/updates/win_updates.go @@ -9,8 +9,8 @@ import ( "io" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/resources/powershell" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/resources/powershell" ) const ( diff --git a/providers/os/resources/updates/win_updates_test.go b/providers/os/resources/updates/win_updates_test.go index a89fbd11ce..7e889a8cab 100644 --- a/providers/os/resources/updates/win_updates_test.go +++ b/providers/os/resources/updates/win_updates_test.go @@ -10,9 +10,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" - "go.mondoo.com/cnquery/v9/providers/os/resources/powershell" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/resources/powershell" ) func TestWinOSUpdatesParser(t *testing.T) { diff --git a/providers/os/resources/uptime/unix.go b/providers/os/resources/uptime/unix.go index de0a8d2537..1b8e6b638c 100644 --- a/providers/os/resources/uptime/unix.go +++ b/providers/os/resources/uptime/unix.go @@ -12,7 +12,7 @@ import ( "time" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) var UnixUptimeRegex = regexp.MustCompile(`^.*up[\s]*(?:\s*(\d+)\s(day[s]*),)*(?:\s*(\d+)\s(min[s]*),)*(?:\s+([\d:]+),\s)*\s*(?:(\d+)\suser[s]*,\s)*\s*load\s+average[s]*:\s+(\d+[\.,]\d+)[,\s]+(\d+[\.,]\d+)[,\s]+(\d+[\.,]\d+)\s*$`) diff --git a/providers/os/resources/uptime/unix_test.go b/providers/os/resources/uptime/unix_test.go index 8c46bfbc8c..ba9a446fd7 100644 --- a/providers/os/resources/uptime/unix_test.go +++ b/providers/os/resources/uptime/unix_test.go @@ -8,7 +8,7 @@ import ( "time" "github.com/stretchr/testify/assert" - "go.mondoo.com/cnquery/v9/providers/os/resources/uptime" + "go.mondoo.com/cnquery/v10/providers/os/resources/uptime" ) func TestLinuxUptime(t *testing.T) { diff --git a/providers/os/resources/uptime/uptime.go b/providers/os/resources/uptime/uptime.go index 9012fbad2d..9b37cc4b45 100644 --- a/providers/os/resources/uptime/uptime.go +++ b/providers/os/resources/uptime/uptime.go @@ -7,8 +7,8 @@ import ( "errors" "time" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) type Uptime interface { diff --git a/providers/os/resources/uptime/uptime_test.go b/providers/os/resources/uptime/uptime_test.go index 0f9399df65..24e06c7499 100644 --- a/providers/os/resources/uptime/uptime_test.go +++ b/providers/os/resources/uptime/uptime_test.go @@ -8,9 +8,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" - "go.mondoo.com/cnquery/v9/providers/os/resources/uptime" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/resources/uptime" ) func TestUptimeOnLinux(t *testing.T) { diff --git a/providers/os/resources/uptime/windows.go b/providers/os/resources/uptime/windows.go index dbd87d6bde..f90877784c 100644 --- a/providers/os/resources/uptime/windows.go +++ b/providers/os/resources/uptime/windows.go @@ -8,8 +8,8 @@ import ( "io" "time" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/resources/powershell" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/resources/powershell" ) type WindowsUptime struct { diff --git a/providers/os/resources/uptime/windows_test.go b/providers/os/resources/uptime/windows_test.go index 7657060d43..8b21ae981a 100644 --- a/providers/os/resources/uptime/windows_test.go +++ b/providers/os/resources/uptime/windows_test.go @@ -8,7 +8,7 @@ import ( "time" "github.com/stretchr/testify/assert" - "go.mondoo.com/cnquery/v9/providers/os/resources/uptime" + "go.mondoo.com/cnquery/v10/providers/os/resources/uptime" ) func TestWindowsUptime(t *testing.T) { diff --git a/providers/os/resources/user.go b/providers/os/resources/user.go index 84cf66d8f0..8c695ca128 100644 --- a/providers/os/resources/user.go +++ b/providers/os/resources/user.go @@ -12,10 +12,10 @@ import ( "sync" "github.com/spf13/afero" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/resources/users" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/resources/users" ) func (x *mqlUser) id() (string, error) { diff --git a/providers/os/resources/users/dscl.go b/providers/os/resources/users/dscl.go index 9eb88d72ff..ec64c65a95 100644 --- a/providers/os/resources/users/dscl.go +++ b/providers/os/resources/users/dscl.go @@ -9,7 +9,7 @@ import ( "strconv" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) var USER_OSX_DSCL_REGEX = regexp.MustCompile(`(?m)^(\S*)\s*(.*)$`) diff --git a/providers/os/resources/users/dscl_test.go b/providers/os/resources/users/dscl_test.go index 505e28fc51..d118858978 100644 --- a/providers/os/resources/users/dscl_test.go +++ b/providers/os/resources/users/dscl_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/stretchr/testify/assert" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" - "go.mondoo.com/cnquery/v9/providers/os/resources/users" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/resources/users" ) func TestParseDsclListResult(t *testing.T) { diff --git a/providers/os/resources/users/etcpasswd.go b/providers/os/resources/users/etcpasswd.go index 619ca766a4..1a2f347439 100644 --- a/providers/os/resources/users/etcpasswd.go +++ b/providers/os/resources/users/etcpasswd.go @@ -10,7 +10,7 @@ import ( "strings" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) // a good description of this file is available at: diff --git a/providers/os/resources/users/etcpasswd_test.go b/providers/os/resources/users/etcpasswd_test.go index c93e7f610d..980cbeebcb 100644 --- a/providers/os/resources/users/etcpasswd_test.go +++ b/providers/os/resources/users/etcpasswd_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/stretchr/testify/assert" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" - "go.mondoo.com/cnquery/v9/providers/os/resources/users" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/resources/users" ) func TestParseLinuxEtcPasswd(t *testing.T) { diff --git a/providers/os/resources/users/manager.go b/providers/os/resources/users/manager.go index c13e251a5b..d67c2c4c4e 100644 --- a/providers/os/resources/users/manager.go +++ b/providers/os/resources/users/manager.go @@ -6,7 +6,7 @@ package users import ( "errors" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" ) type User struct { diff --git a/providers/os/resources/users/manager_test.go b/providers/os/resources/users/manager_test.go index 496f4d0cb8..a5e3ee9ded 100644 --- a/providers/os/resources/users/manager_test.go +++ b/providers/os/resources/users/manager_test.go @@ -8,9 +8,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" - "go.mondoo.com/cnquery/v9/providers/os/resources/users" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/resources/users" ) func TestManagerDebian(t *testing.T) { diff --git a/providers/os/resources/users/ps1getlocalusers.go b/providers/os/resources/users/ps1getlocalusers.go index 3d18a156df..27f867a1e3 100644 --- a/providers/os/resources/users/ps1getlocalusers.go +++ b/providers/os/resources/users/ps1getlocalusers.go @@ -7,8 +7,8 @@ import ( "encoding/json" "io" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/resources/powershell" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/resources/powershell" ) type WindowsSID struct { diff --git a/providers/os/resources/users/ps1getlocalusers_test.go b/providers/os/resources/users/ps1getlocalusers_test.go index 18347c86d0..31f1617975 100644 --- a/providers/os/resources/users/ps1getlocalusers_test.go +++ b/providers/os/resources/users/ps1getlocalusers_test.go @@ -8,7 +8,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - "go.mondoo.com/cnquery/v9/providers/os/resources/users" + "go.mondoo.com/cnquery/v10/providers/os/resources/users" ) func TestWindowsLocalUsersParser(t *testing.T) { diff --git a/providers/os/resources/vulnmgmt.go b/providers/os/resources/vulnmgmt.go index e41d4d98c9..b684fd3b36 100644 --- a/providers/os/resources/vulnmgmt.go +++ b/providers/os/resources/vulnmgmt.go @@ -8,11 +8,11 @@ import ( "time" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/resources" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream/gql" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/resources" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream/gql" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" mondoogql "go.mondoo.com/mondoo-go" ) diff --git a/providers/os/resources/windows.go b/providers/os/resources/windows.go index a43a0f7106..5b30b1a66f 100644 --- a/providers/os/resources/windows.go +++ b/providers/os/resources/windows.go @@ -6,12 +6,12 @@ package resources import ( "errors" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/resources/packages" - "go.mondoo.com/cnquery/v9/providers/os/resources/powershell" - "go.mondoo.com/cnquery/v9/providers/os/resources/windows" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/resources/packages" + "go.mondoo.com/cnquery/v10/providers/os/resources/powershell" + "go.mondoo.com/cnquery/v10/providers/os/resources/windows" ) func (s *mqlWindows) computerInfo() (map[string]interface{}, error) { diff --git a/providers/os/resources/windows/auditpol_test.go b/providers/os/resources/windows/auditpol_test.go index 00b523027b..3631a09a2c 100644 --- a/providers/os/resources/windows/auditpol_test.go +++ b/providers/os/resources/windows/auditpol_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" - "go.mondoo.com/cnquery/v9/providers/os/resources/windows" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/resources/windows" ) func TestParseAuditpol(t *testing.T) { diff --git a/providers/os/resources/windows/bitlocker.go b/providers/os/resources/windows/bitlocker.go index 5d9941107e..bdc3f7249e 100644 --- a/providers/os/resources/windows/bitlocker.go +++ b/providers/os/resources/windows/bitlocker.go @@ -7,8 +7,8 @@ import ( "encoding/json" "io" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/resources/powershell" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/resources/powershell" ) // https://docs.microsoft.com/en-us/windows/win32/secprov/getconversionstatus-win32-encryptablevolume diff --git a/providers/os/resources/windows/registrykey.go b/providers/os/resources/windows/registrykey.go index f5e40bc0f3..db6c682872 100644 --- a/providers/os/resources/windows/registrykey.go +++ b/providers/os/resources/windows/registrykey.go @@ -3,7 +3,7 @@ package windows -import "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" +import "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" // derived from "golang.org/x/sys/windows/registry" // see https://github.com/golang/sys/blob/master/windows/registry/value.go#L17-L31 diff --git a/providers/os/resources/windows/secpol_test.go b/providers/os/resources/windows/secpol_test.go index 5bd7195d7f..c3e75a11b3 100644 --- a/providers/os/resources/windows/secpol_test.go +++ b/providers/os/resources/windows/secpol_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" - "go.mondoo.com/cnquery/v9/providers/os/resources/powershell" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/resources/powershell" ) func TestParseSecpol(t *testing.T) { diff --git a/providers/os/resources/windows/security_health.go b/providers/os/resources/windows/security_health.go index 7ec18b5b2d..cc2df52259 100644 --- a/providers/os/resources/windows/security_health.go +++ b/providers/os/resources/windows/security_health.go @@ -7,8 +7,8 @@ import ( "encoding/json" "io" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/resources/powershell" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/resources/powershell" ) // This implements the Windows Security Center API diff --git a/providers/os/resources/windows/security_products.go b/providers/os/resources/windows/security_products.go index 770b12b4c9..b3f3183d99 100644 --- a/providers/os/resources/windows/security_products.go +++ b/providers/os/resources/windows/security_products.go @@ -8,8 +8,8 @@ import ( "io" "time" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/resources/powershell" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/resources/powershell" ) // This implementation reads the security products from Windows Desktop Systems diff --git a/providers/os/resources/windows_bitlocker.go b/providers/os/resources/windows_bitlocker.go index bd478f1af7..7236fe5e35 100644 --- a/providers/os/resources/windows_bitlocker.go +++ b/providers/os/resources/windows_bitlocker.go @@ -4,10 +4,10 @@ package resources import ( - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/resources/windows" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/resources/windows" ) func (s *mqlWindowsBitlocker) volumes() ([]interface{}, error) { diff --git a/providers/os/resources/windows_firewall.go b/providers/os/resources/windows_firewall.go index cf77a16945..131f5e8014 100644 --- a/providers/os/resources/windows_firewall.go +++ b/providers/os/resources/windows_firewall.go @@ -4,11 +4,11 @@ package resources import ( - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/resources/powershell" - "go.mondoo.com/cnquery/v9/providers/os/resources/windows" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/resources/powershell" + "go.mondoo.com/cnquery/v10/providers/os/resources/windows" ) func (w *mqlWindowsFirewallProfile) id() (string, error) { diff --git a/providers/os/resources/windows_security.go b/providers/os/resources/windows_security.go index b82fb56283..e4979fb26d 100644 --- a/providers/os/resources/windows_security.go +++ b/providers/os/resources/windows_security.go @@ -4,11 +4,11 @@ package resources import ( - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/resources/windows" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/resources/windows" ) func (w *mqlWindowsSecurity) products() ([]interface{}, error) { diff --git a/providers/os/resources/yum.go b/providers/os/resources/yum.go index 4507f76daf..214b3d989b 100644 --- a/providers/os/resources/yum.go +++ b/providers/os/resources/yum.go @@ -9,12 +9,12 @@ import ( "regexp" "strings" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/os/connection/shared" - "go.mondoo.com/cnquery/v9/providers/os/resources/yum" - "go.mondoo.com/cnquery/v9/types" - "go.mondoo.com/cnquery/v9/utils/stringx" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/os/connection/shared" + "go.mondoo.com/cnquery/v10/providers/os/resources/yum" + "go.mondoo.com/cnquery/v10/types" + "go.mondoo.com/cnquery/v10/utils/stringx" ) var supportedPlatforms = []string{"amazonlinux"} diff --git a/providers/os/resources/yum/yum_test.go b/providers/os/resources/yum/yum_test.go index 8e712fe771..7869f036ca 100644 --- a/providers/os/resources/yum/yum_test.go +++ b/providers/os/resources/yum/yum_test.go @@ -10,7 +10,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers/os/connection/mock" + "go.mondoo.com/cnquery/v10/providers/os/connection/mock" ) func TestParseYumRepoEntry(t *testing.T) { diff --git a/providers/providers.go b/providers/providers.go index 080055cad2..fab457dc90 100644 --- a/providers/providers.go +++ b/providers/providers.go @@ -21,9 +21,9 @@ import ( "github.com/rs/zerolog/log" "github.com/spf13/afero" "github.com/ulikunitz/xz" - "go.mondoo.com/cnquery/v9/cli/config" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/resources" + "go.mondoo.com/cnquery/v10/cli/config" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/resources" "go.mondoo.com/ranger-rpc" "golang.org/x/exp/slices" ) @@ -254,7 +254,7 @@ func ListAll() ([]*Provider, error) { // EnsureProvider makes sure that a given provider exists and returns it. // You can supply providers either via: -// 1. providerID, which universally identifies it, e.g. "go.mondoo.com/cnquery/v9/providers/os" +// 1. providerID, which universally identifies it, e.g. "go.mondoo.com/cnquery/v10/providers/os" // 2. connectorName, which is what you see in the CLI e.g. "local", "ssh", ... // 3. connectorType, which is how assets define the connector type when // they are moved between discovery and execution, e.g. "registry-image". diff --git a/providers/providers_test.go b/providers/providers_test.go index 9de2658136..947d5160b7 100644 --- a/providers/providers_test.go +++ b/providers/providers_test.go @@ -8,7 +8,7 @@ import ( "time" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" ) type testPlugin struct { diff --git a/providers/recording.go b/providers/recording.go index dc73534470..e8356a8b9c 100644 --- a/providers/recording.go +++ b/providers/recording.go @@ -10,10 +10,10 @@ import ( "sort" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/types" - "go.mondoo.com/cnquery/v9/utils/multierr" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/types" + "go.mondoo.com/cnquery/v10/utils/multierr" ) type Recording interface { diff --git a/providers/runtime.go b/providers/runtime.go index b1b4f03390..5e9297bf88 100644 --- a/providers/runtime.go +++ b/providers/runtime.go @@ -10,13 +10,13 @@ import ( "time" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/resources" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream" - "go.mondoo.com/cnquery/v9/types" - "go.mondoo.com/cnquery/v9/utils/multierr" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/resources" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream" + "go.mondoo.com/cnquery/v10/types" + "go.mondoo.com/cnquery/v10/utils/multierr" "google.golang.org/grpc/status" ) diff --git a/providers/slack/config/config.go b/providers/slack/config/config.go index a18d8ce874..e3283b824b 100644 --- a/providers/slack/config/config.go +++ b/providers/slack/config/config.go @@ -4,8 +4,8 @@ package config import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/slack/provider" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/slack/provider" ) var Config = plugin.Provider{ diff --git a/providers/slack/connection/connection.go b/providers/slack/connection/connection.go index 0c3f97f968..43aa19a8b2 100644 --- a/providers/slack/connection/connection.go +++ b/providers/slack/connection/connection.go @@ -11,8 +11,8 @@ import ( "github.com/rs/zerolog" "github.com/rs/zerolog/log" "github.com/slack-go/slack" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" ) type SlackConnection struct { diff --git a/providers/slack/gen/main.go b/providers/slack/gen/main.go index 75b9149427..19f35c7754 100644 --- a/providers/slack/gen/main.go +++ b/providers/slack/gen/main.go @@ -4,8 +4,8 @@ package main import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin/gen" - "go.mondoo.com/cnquery/v9/providers/slack/config" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin/gen" + "go.mondoo.com/cnquery/v10/providers/slack/config" ) func main() { diff --git a/providers/slack/go.mod b/providers/slack/go.mod index 562a3de24d..0040ad9a75 100644 --- a/providers/slack/go.mod +++ b/providers/slack/go.mod @@ -1,6 +1,6 @@ -module go.mondoo.com/cnquery/v9/providers/slack +module go.mondoo.com/cnquery/v10/providers/slack -replace go.mondoo.com/cnquery/v9 => ../.. +replace go.mondoo.com/cnquery/v10 => ../.. go 1.21 @@ -10,7 +10,7 @@ require ( github.com/hashicorp/go-retryablehttp v0.7.5 github.com/rs/zerolog v1.31.0 github.com/slack-go/slack v0.12.3 - go.mondoo.com/cnquery/v9 v9.14.0 + go.mondoo.com/cnquery/v10 v10.0.0 ) require ( diff --git a/providers/slack/main.go b/providers/slack/main.go index 4a76985b41..236c68e608 100644 --- a/providers/slack/main.go +++ b/providers/slack/main.go @@ -6,8 +6,8 @@ package main import ( "os" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/slack/provider" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/slack/provider" ) func main() { diff --git a/providers/slack/provider/provider.go b/providers/slack/provider/provider.go index 04869b513c..f2fd68dba8 100644 --- a/providers/slack/provider/provider.go +++ b/providers/slack/provider/provider.go @@ -9,13 +9,13 @@ import ( "strconv" "strings" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" - "go.mondoo.com/cnquery/v9/providers/slack/connection" - "go.mondoo.com/cnquery/v9/providers/slack/resources" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers/slack/connection" + "go.mondoo.com/cnquery/v10/providers/slack/resources" ) const ConnectionType = "slack" diff --git a/providers/slack/resources/accesslogs.go b/providers/slack/resources/accesslogs.go index b355daf89c..75576b0770 100644 --- a/providers/slack/resources/accesslogs.go +++ b/providers/slack/resources/accesslogs.go @@ -8,9 +8,9 @@ import ( "time" "github.com/slack-go/slack" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/slack/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/slack/connection" ) func (s *mqlSlack) accessLogs() ([]interface{}, error) { diff --git a/providers/slack/resources/conversations.go b/providers/slack/resources/conversations.go index 4cbe9dd516..09c199205b 100644 --- a/providers/slack/resources/conversations.go +++ b/providers/slack/resources/conversations.go @@ -8,10 +8,10 @@ import ( "time" "github.com/slack-go/slack" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/slack/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/slack/connection" ) func (o *mqlSlackConversations) id() (string, error) { diff --git a/providers/slack/resources/slack.lr b/providers/slack/resources/slack.lr index 793cf95f1a..b5ce2a28d6 100644 --- a/providers/slack/resources/slack.lr +++ b/providers/slack/resources/slack.lr @@ -2,7 +2,7 @@ // SPDX-License-Identifier: BUSL-1.1 option provider = "go.mondoo.com/cnquery/providers/slack" -option go_package = "go.mondoo.com/cnquery/v9/providers/slack/resources" +option go_package = "go.mondoo.com/cnquery/v10/providers/slack/resources" // Slack slack { diff --git a/providers/slack/resources/slack.lr.go b/providers/slack/resources/slack.lr.go index a65d503c13..c70e330a84 100644 --- a/providers/slack/resources/slack.lr.go +++ b/providers/slack/resources/slack.lr.go @@ -9,9 +9,9 @@ import ( "errors" "time" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/types" ) var resourceFactories map[string]plugin.ResourceFactory diff --git a/providers/slack/resources/team.go b/providers/slack/resources/team.go index e2b1658574..2667317ae2 100644 --- a/providers/slack/resources/team.go +++ b/providers/slack/resources/team.go @@ -6,9 +6,9 @@ package resources import ( "errors" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/slack/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/slack/connection" ) func (x *mqlSlackTeam) id() (string, error) { diff --git a/providers/slack/resources/usergroups.go b/providers/slack/resources/usergroups.go index a53bb1b405..6156221d35 100644 --- a/providers/slack/resources/usergroups.go +++ b/providers/slack/resources/usergroups.go @@ -8,9 +8,9 @@ import ( "errors" "github.com/slack-go/slack" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/slack/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/slack/connection" ) func (s *mqlSlack) userGroups() ([]interface{}, error) { diff --git a/providers/slack/resources/users.go b/providers/slack/resources/users.go index 071c7550e7..c35a242dc2 100644 --- a/providers/slack/resources/users.go +++ b/providers/slack/resources/users.go @@ -9,10 +9,10 @@ import ( "time" "github.com/slack-go/slack" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/slack/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/slack/connection" ) func (o *mqlSlackUsers) id() (string, error) { diff --git a/providers/terraform/config/config.go b/providers/terraform/config/config.go index 3ec27c0bd1..d89329c593 100644 --- a/providers/terraform/config/config.go +++ b/providers/terraform/config/config.go @@ -4,8 +4,8 @@ package config import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/terraform/provider" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/terraform/provider" ) var Config = plugin.Provider{ diff --git a/providers/terraform/connection/connection.go b/providers/terraform/connection/connection.go index 786d98c188..5447dcaa57 100644 --- a/providers/terraform/connection/connection.go +++ b/providers/terraform/connection/connection.go @@ -6,7 +6,7 @@ package connection import ( "github.com/hashicorp/hcl/v2" "github.com/hashicorp/hcl/v2/hclparse" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" ) type ConnectionType string diff --git a/providers/terraform/connection/hcl_manifest.go b/providers/terraform/connection/hcl_manifest.go index 203451879e..8a19e580d4 100644 --- a/providers/terraform/connection/hcl_manifest.go +++ b/providers/terraform/connection/hcl_manifest.go @@ -17,8 +17,8 @@ import ( "github.com/hashicorp/hcl/v2" "github.com/pkg/errors" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" ) func ParseTerraformModuleManifest(manifestPath string) (*ModuleManifest, error) { diff --git a/providers/terraform/connection/hcl_manifest_test.go b/providers/terraform/connection/hcl_manifest_test.go index e288d6f351..29d9a8efcc 100644 --- a/providers/terraform/connection/hcl_manifest_test.go +++ b/providers/terraform/connection/hcl_manifest_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" ) func TestTerraform(t *testing.T) { diff --git a/providers/terraform/connection/hcl_parser_test.go b/providers/terraform/connection/hcl_parser_test.go index 3b1aa57bcd..58a8e03c38 100644 --- a/providers/terraform/connection/hcl_parser_test.go +++ b/providers/terraform/connection/hcl_parser_test.go @@ -9,7 +9,7 @@ import ( "github.com/hashicorp/hcl/v2" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" ) func TestLoadHclBlocks(t *testing.T) { diff --git a/providers/terraform/connection/tfplan.go b/providers/terraform/connection/tfplan.go index 80e7fc5c0e..3b27ac09d7 100644 --- a/providers/terraform/connection/tfplan.go +++ b/providers/terraform/connection/tfplan.go @@ -8,7 +8,7 @@ import ( "os" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" ) type Plan struct { diff --git a/providers/terraform/connection/tfstate.go b/providers/terraform/connection/tfstate.go index 547d072891..0085a9c279 100644 --- a/providers/terraform/connection/tfstate.go +++ b/providers/terraform/connection/tfstate.go @@ -8,7 +8,7 @@ import ( "os" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" ) // This is designed around https://www.terraform.io/internals/json-format diff --git a/providers/terraform/gen/main.go b/providers/terraform/gen/main.go index dfbe4b5d6e..001c05618d 100644 --- a/providers/terraform/gen/main.go +++ b/providers/terraform/gen/main.go @@ -4,8 +4,8 @@ package main import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin/gen" - "go.mondoo.com/cnquery/v9/providers/terraform/config" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin/gen" + "go.mondoo.com/cnquery/v10/providers/terraform/config" ) func main() { diff --git a/providers/terraform/go.mod b/providers/terraform/go.mod index 46d1f0f9d6..3d080b6ead 100644 --- a/providers/terraform/go.mod +++ b/providers/terraform/go.mod @@ -1,6 +1,6 @@ -module go.mondoo.com/cnquery/v9/providers/terraform +module go.mondoo.com/cnquery/v10/providers/terraform -replace go.mondoo.com/cnquery/v9 => ../.. +replace go.mondoo.com/cnquery/v10 => ../.. go 1.21 @@ -9,7 +9,7 @@ toolchain go1.21.3 require ( github.com/go-git/go-git/v5 v5.11.0 github.com/hashicorp/hcl/v2 v2.19.1 - go.mondoo.com/cnquery/v9 v9.14.0 + go.mondoo.com/cnquery/v10 v10.0.0 ) require ( diff --git a/providers/terraform/main.go b/providers/terraform/main.go index 16b0dad385..d8879e778e 100644 --- a/providers/terraform/main.go +++ b/providers/terraform/main.go @@ -6,8 +6,8 @@ package main import ( "os" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/terraform/provider" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/terraform/provider" ) func main() { diff --git a/providers/terraform/provider/detector.go b/providers/terraform/provider/detector.go index ce931ad2f0..fb79ebc5e5 100644 --- a/providers/terraform/provider/detector.go +++ b/providers/terraform/provider/detector.go @@ -13,8 +13,8 @@ import ( "path/filepath" "strings" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers/terraform/connection" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers/terraform/connection" ) func (s *Service) detect(asset *inventory.Asset, conn *connection.Connection) error { diff --git a/providers/terraform/provider/hcl_test.go b/providers/terraform/provider/hcl_test.go index 1b98413b23..6054f4d78d 100644 --- a/providers/terraform/provider/hcl_test.go +++ b/providers/terraform/provider/hcl_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/terraform/resources" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/terraform/resources" ) const ( diff --git a/providers/terraform/provider/provider.go b/providers/terraform/provider/provider.go index 42f5774c9e..ed76913f64 100644 --- a/providers/terraform/provider/provider.go +++ b/providers/terraform/provider/provider.go @@ -9,12 +9,12 @@ import ( "strconv" "strings" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream" - "go.mondoo.com/cnquery/v9/providers/terraform/connection" - "go.mondoo.com/cnquery/v9/providers/terraform/resources" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream" + "go.mondoo.com/cnquery/v10/providers/terraform/connection" + "go.mondoo.com/cnquery/v10/providers/terraform/resources" ) const ( diff --git a/providers/terraform/provider/terraform_test.go b/providers/terraform/provider/terraform_test.go index a0171d0c0e..0316521c94 100644 --- a/providers/terraform/provider/terraform_test.go +++ b/providers/terraform/provider/terraform_test.go @@ -4,8 +4,8 @@ package provider import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" ) func newTestService(connType string, path string) (*Service, *plugin.ConnectRes) { diff --git a/providers/terraform/provider/tfplan_test.go b/providers/terraform/provider/tfplan_test.go index be954e301d..bebef1f6b5 100644 --- a/providers/terraform/provider/tfplan_test.go +++ b/providers/terraform/provider/tfplan_test.go @@ -10,9 +10,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/terraform/connection" - "go.mondoo.com/cnquery/v9/providers/terraform/resources" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/terraform/connection" + "go.mondoo.com/cnquery/v10/providers/terraform/resources" ) func TestResource_Tfplan(t *testing.T) { diff --git a/providers/terraform/provider/tfstate_test.go b/providers/terraform/provider/tfstate_test.go index b3fa72944b..72681947eb 100644 --- a/providers/terraform/provider/tfstate_test.go +++ b/providers/terraform/provider/tfstate_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" ) func TestResource_Tfstate(t *testing.T) { diff --git a/providers/terraform/resources/hcl.go b/providers/terraform/resources/hcl.go index 684c8f40db..7fe0a43567 100644 --- a/providers/terraform/resources/hcl.go +++ b/providers/terraform/resources/hcl.go @@ -18,10 +18,10 @@ import ( "github.com/zclconf/go-cty/cty" "github.com/zclconf/go-cty/cty/function" "github.com/zclconf/go-cty/cty/function/stdlib" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/terraform/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/terraform/connection" + "go.mondoo.com/cnquery/v10/types" ) type mqlTerraformInternal struct { diff --git a/providers/terraform/resources/terraform.lr b/providers/terraform/resources/terraform.lr index 017c3fb5ad..f0c3078ae7 100644 --- a/providers/terraform/resources/terraform.lr +++ b/providers/terraform/resources/terraform.lr @@ -2,7 +2,7 @@ // SPDX-License-Identifier: BUSL-1.1 option provider = "go.mondoo.com/cnquery/providers/terraform" -option go_package = "go.mondoo.com/cnquery/v9/providers/terraform/resources" +option go_package = "go.mondoo.com/cnquery/v10/providers/terraform/resources" // Terraform configuration files terraform { diff --git a/providers/terraform/resources/terraform.lr.go b/providers/terraform/resources/terraform.lr.go index eaab04ad6e..8dd054ace9 100644 --- a/providers/terraform/resources/terraform.lr.go +++ b/providers/terraform/resources/terraform.lr.go @@ -8,9 +8,9 @@ package resources import ( "errors" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/types" ) var resourceFactories map[string]plugin.ResourceFactory diff --git a/providers/terraform/resources/tfplan.go b/providers/terraform/resources/tfplan.go index d2b4c68957..56d575fa3c 100644 --- a/providers/terraform/resources/tfplan.go +++ b/providers/terraform/resources/tfplan.go @@ -6,11 +6,11 @@ package resources import ( "encoding/json" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/terraform/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/terraform/connection" + "go.mondoo.com/cnquery/v10/types" ) func (t *mqlTerraformPlan) id() (string, error) { diff --git a/providers/terraform/resources/tfstate.go b/providers/terraform/resources/tfstate.go index 03fb8ed4b4..186f00ec35 100644 --- a/providers/terraform/resources/tfstate.go +++ b/providers/terraform/resources/tfstate.go @@ -7,11 +7,11 @@ import ( "encoding/json" "errors" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/terraform/connection" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/terraform/connection" + "go.mondoo.com/cnquery/v10/types" ) func (t *mqlTerraformState) id() (string, error) { diff --git a/providers/vcd/config/config.go b/providers/vcd/config/config.go index 00f899ac49..363501d14f 100644 --- a/providers/vcd/config/config.go +++ b/providers/vcd/config/config.go @@ -4,8 +4,8 @@ package config import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/vcd/provider" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/vcd/provider" ) var Config = plugin.Provider{ diff --git a/providers/vcd/connection/connection.go b/providers/vcd/connection/connection.go index 8326527ed0..267e740382 100644 --- a/providers/vcd/connection/connection.go +++ b/providers/vcd/connection/connection.go @@ -10,8 +10,8 @@ import ( "github.com/rs/zerolog/log" "github.com/vmware/go-vcloud-director/v2/govcd" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" ) type VcdConnection struct { diff --git a/providers/vcd/connection/connection_test.go b/providers/vcd/connection/connection_test.go index 1a30fccd84..b7873411e2 100644 --- a/providers/vcd/connection/connection_test.go +++ b/providers/vcd/connection/connection_test.go @@ -11,8 +11,8 @@ import ( "testing" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" ) func TestApiAccess(t *testing.T) { diff --git a/providers/vcd/gen/main.go b/providers/vcd/gen/main.go index 8b3ae9206a..2c96c1b9d3 100644 --- a/providers/vcd/gen/main.go +++ b/providers/vcd/gen/main.go @@ -4,8 +4,8 @@ package main import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin/gen" - "go.mondoo.com/cnquery/v9/providers/vcd/config" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin/gen" + "go.mondoo.com/cnquery/v10/providers/vcd/config" ) func main() { diff --git a/providers/vcd/go.mod b/providers/vcd/go.mod index 63b00a2692..0034925c5c 100644 --- a/providers/vcd/go.mod +++ b/providers/vcd/go.mod @@ -1,6 +1,6 @@ -module go.mondoo.com/cnquery/v9/providers/vcd +module go.mondoo.com/cnquery/v10/providers/vcd -replace go.mondoo.com/cnquery/v9 => ../.. +replace go.mondoo.com/cnquery/v10 => ../.. go 1.21 @@ -10,7 +10,7 @@ require ( github.com/rs/zerolog v1.31.0 github.com/stretchr/testify v1.8.4 github.com/vmware/go-vcloud-director/v2 v2.22.0 - go.mondoo.com/cnquery/v9 v9.14.0 + go.mondoo.com/cnquery/v10 v10.0.0 ) require ( diff --git a/providers/vcd/main.go b/providers/vcd/main.go index 9a4c33d55a..d814a8b9af 100644 --- a/providers/vcd/main.go +++ b/providers/vcd/main.go @@ -6,8 +6,8 @@ package main import ( "os" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/vcd/provider" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/vcd/provider" ) func main() { diff --git a/providers/vcd/provider/provider.go b/providers/vcd/provider/provider.go index 41845f3150..aafd340c1a 100644 --- a/providers/vcd/provider/provider.go +++ b/providers/vcd/provider/provider.go @@ -9,13 +9,13 @@ import ( "strconv" "strings" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" - "go.mondoo.com/cnquery/v9/providers/vcd/connection" - "go.mondoo.com/cnquery/v9/providers/vcd/resources" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers/vcd/connection" + "go.mondoo.com/cnquery/v10/providers/vcd/resources" ) const ConnectionType = "vcd" diff --git a/providers/vcd/resources/externalnetworks.go b/providers/vcd/resources/externalnetworks.go index 2cf507182d..357abaa323 100644 --- a/providers/vcd/resources/externalnetworks.go +++ b/providers/vcd/resources/externalnetworks.go @@ -6,10 +6,10 @@ package resources import ( "github.com/vmware/go-vcloud-director/v2/govcd" "github.com/vmware/go-vcloud-director/v2/types/v56" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/vcd/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/vcd/connection" ) func (v *mqlVcd) externalNetworks() ([]interface{}, error) { diff --git a/providers/vcd/resources/networkpools.go b/providers/vcd/resources/networkpools.go index ad106106fa..4f2dbd81df 100644 --- a/providers/vcd/resources/networkpools.go +++ b/providers/vcd/resources/networkpools.go @@ -5,9 +5,9 @@ package resources import ( "github.com/vmware/go-vcloud-director/v2/types/v56" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/vcd/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/vcd/connection" ) // https://developer.vmware.com/apis/1260/vmware-cloud-director/doc/doc/types/QueryResultNetworkPoolRecordType.html diff --git a/providers/vcd/resources/organization.go b/providers/vcd/resources/organization.go index bb6d2bc46f..8b8769e42f 100644 --- a/providers/vcd/resources/organization.go +++ b/providers/vcd/resources/organization.go @@ -6,12 +6,12 @@ package resources import ( "strconv" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/vcd/connection" + "go.mondoo.com/cnquery/v10/providers/vcd/connection" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" "github.com/vmware/go-vcloud-director/v2/types/v56" diff --git a/providers/vcd/resources/provider.go b/providers/vcd/resources/provider.go index bab899068c..e654506966 100644 --- a/providers/vcd/resources/provider.go +++ b/providers/vcd/resources/provider.go @@ -5,9 +5,9 @@ package resources import ( "github.com/vmware/go-vcloud-director/v2/types/v56" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/vcd/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/vcd/connection" ) func (v *mqlVcd) providerVDCs() ([]interface{}, error) { diff --git a/providers/vcd/resources/serverinstance.go b/providers/vcd/resources/serverinstance.go index 677531bdd8..279258df90 100644 --- a/providers/vcd/resources/serverinstance.go +++ b/providers/vcd/resources/serverinstance.go @@ -6,9 +6,9 @@ package resources import ( "github.com/vmware/go-vcloud-director/v2/govcd" "github.com/vmware/go-vcloud-director/v2/types/v56" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/vcd/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/vcd/connection" ) // https://developer.vmware.com/apis/1260/vmware-cloud-director/doc/doc/types/VimServerType.html diff --git a/providers/vcd/resources/vcd.lr b/providers/vcd/resources/vcd.lr index 8535feb9ab..346196845b 100644 --- a/providers/vcd/resources/vcd.lr +++ b/providers/vcd/resources/vcd.lr @@ -2,7 +2,7 @@ // SPDX-License-Identifier: BUSL-1.1 option provider = "go.mondoo.com/cnquery/providers/vcd" -option go_package = "go.mondoo.com/cnquery/v9/providers/vcd/resources" +option go_package = "go.mondoo.com/cnquery/v10/providers/vcd/resources" // VMware Cloud Director vcd { diff --git a/providers/vcd/resources/vcd.lr.go b/providers/vcd/resources/vcd.lr.go index f8c8e86e73..9c768014e6 100644 --- a/providers/vcd/resources/vcd.lr.go +++ b/providers/vcd/resources/vcd.lr.go @@ -8,9 +8,9 @@ package resources import ( "errors" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/types" ) var resourceFactories map[string]plugin.ResourceFactory diff --git a/providers/vsphere/config/config.go b/providers/vsphere/config/config.go index 1357eeda2a..85f3b30c78 100644 --- a/providers/vsphere/config/config.go +++ b/providers/vsphere/config/config.go @@ -4,9 +4,9 @@ package config import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/vsphere/provider" - "go.mondoo.com/cnquery/v9/providers/vsphere/resources" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/vsphere/provider" + "go.mondoo.com/cnquery/v10/providers/vsphere/resources" ) var Config = plugin.Provider{ diff --git a/providers/vsphere/connection/connection.go b/providers/vsphere/connection/connection.go index dfd0e7f1a2..3f411a9736 100644 --- a/providers/vsphere/connection/connection.go +++ b/providers/vsphere/connection/connection.go @@ -9,10 +9,10 @@ import ( "net/url" "strconv" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" "github.com/vmware/govmomi" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" ) type VsphereConnection struct { diff --git a/providers/vsphere/connection/connection_test.go b/providers/vsphere/connection/connection_test.go index cc22ae4b40..ad0450ba07 100644 --- a/providers/vsphere/connection/connection_test.go +++ b/providers/vsphere/connection/connection_test.go @@ -9,9 +9,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" - "go.mondoo.com/cnquery/v9/providers/vsphere/connection/vsimulator" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers/vsphere/connection/vsimulator" ) func TestVSphereTransport(t *testing.T) { diff --git a/providers/vsphere/connection/platform.go b/providers/vsphere/connection/platform.go index 8f7f36dd9e..dfa92b0a0b 100644 --- a/providers/vsphere/connection/platform.go +++ b/providers/vsphere/connection/platform.go @@ -15,7 +15,7 @@ import ( "github.com/vmware/govmomi/govc/host/esxcli" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25/types" - "go.mondoo.com/cnquery/v9/mrn" + "go.mondoo.com/cnquery/v10/mrn" ) const ( diff --git a/providers/vsphere/gen/main.go b/providers/vsphere/gen/main.go index eed6b2844a..b317520a2a 100644 --- a/providers/vsphere/gen/main.go +++ b/providers/vsphere/gen/main.go @@ -4,8 +4,8 @@ package main import ( - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin/gen" - "go.mondoo.com/cnquery/v9/providers/vsphere/config" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin/gen" + "go.mondoo.com/cnquery/v10/providers/vsphere/config" ) func main() { diff --git a/providers/vsphere/go.mod b/providers/vsphere/go.mod index 24808457ab..11d7e734c1 100644 --- a/providers/vsphere/go.mod +++ b/providers/vsphere/go.mod @@ -1,6 +1,6 @@ -module go.mondoo.com/cnquery/v9/providers/vsphere +module go.mondoo.com/cnquery/v10/providers/vsphere -replace go.mondoo.com/cnquery/v9 => ../.. +replace go.mondoo.com/cnquery/v10 => ../.. go 1.21 @@ -11,7 +11,7 @@ require ( github.com/rs/zerolog v1.31.0 github.com/stretchr/testify v1.8.4 github.com/vmware/govmomi v0.34.2 - go.mondoo.com/cnquery/v9 v9.14.0 + go.mondoo.com/cnquery/v10 v10.0.0 go.mondoo.com/mondoo-go v0.0.0-20240103050411-fa7e920c6784 ) diff --git a/providers/vsphere/main.go b/providers/vsphere/main.go index 86ac116781..7bf7b1f418 100644 --- a/providers/vsphere/main.go +++ b/providers/vsphere/main.go @@ -6,8 +6,8 @@ package main import ( "os" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/vsphere/provider" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/vsphere/provider" ) func main() { diff --git a/providers/vsphere/provider/provider.go b/providers/vsphere/provider/provider.go index dd3151a8fd..0d8af9569c 100644 --- a/providers/vsphere/provider/provider.go +++ b/providers/vsphere/provider/provider.go @@ -9,13 +9,13 @@ import ( "strconv" "strings" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" - "go.mondoo.com/cnquery/v9/providers/vsphere/connection" - "go.mondoo.com/cnquery/v9/providers/vsphere/resources" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers/vsphere/connection" + "go.mondoo.com/cnquery/v10/providers/vsphere/resources" ) const ConnectionType = "vsphere" diff --git a/providers/vsphere/provider/provider_test.go b/providers/vsphere/provider/provider_test.go index dac0874f53..951bbb0107 100644 --- a/providers/vsphere/provider/provider_test.go +++ b/providers/vsphere/provider/provider_test.go @@ -10,10 +10,10 @@ import ( "github.com/stretchr/testify/require" "github.com/stretchr/testify/assert" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/vault" - "go.mondoo.com/cnquery/v9/providers/vsphere/connection/vsimulator" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/vault" + "go.mondoo.com/cnquery/v10/providers/vsphere/connection/vsimulator" ) func newTestService() (*vsimulator.VsphereSimulator, *Service, *plugin.ConnectRes) { diff --git a/providers/vsphere/resources/asset_advisories.go b/providers/vsphere/resources/asset_advisories.go index 7b45fcd821..3882cf7811 100644 --- a/providers/vsphere/resources/asset_advisories.go +++ b/providers/vsphere/resources/asset_advisories.go @@ -5,10 +5,10 @@ package resources import ( "context" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/resources" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream/mvd" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/vsphere/connection" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/resources" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream/mvd" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/vsphere/connection" ) // fetches the vulnerability report and returns the full report diff --git a/providers/vsphere/resources/asset_cpe.go b/providers/vsphere/resources/asset_cpe.go index 077fa31f02..631d069ae3 100644 --- a/providers/vsphere/resources/asset_cpe.go +++ b/providers/vsphere/resources/asset_cpe.go @@ -5,8 +5,8 @@ package resources import ( "github.com/facebookincubator/nvdtools/wfn" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers/vsphere/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers/vsphere/connection" ) func (a *mqlAsset) cpes() ([]interface{}, error) { diff --git a/providers/vsphere/resources/datacenter.go b/providers/vsphere/resources/datacenter.go index 6428457c8c..dccef22943 100644 --- a/providers/vsphere/resources/datacenter.go +++ b/providers/vsphere/resources/datacenter.go @@ -5,10 +5,10 @@ package resources import ( "github.com/vmware/govmomi/object" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/vsphere/connection" - "go.mondoo.com/cnquery/v9/providers/vsphere/resources/resourceclient" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/vsphere/connection" + "go.mondoo.com/cnquery/v10/providers/vsphere/resources/resourceclient" ) func newVsphereHostResources(vClient *resourceclient.Client, runtime *plugin.Runtime, vhosts []*object.HostSystem) ([]interface{}, error) { diff --git a/providers/vsphere/resources/discovery.go b/providers/vsphere/resources/discovery.go index 682d7aa63d..a96e9e2a19 100644 --- a/providers/vsphere/resources/discovery.go +++ b/providers/vsphere/resources/discovery.go @@ -6,11 +6,11 @@ package resources import ( "github.com/rs/zerolog/log" "github.com/vmware/govmomi/vim25/types" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/vsphere/connection" - "go.mondoo.com/cnquery/v9/utils/stringx" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/vsphere/connection" + "go.mondoo.com/cnquery/v10/utils/stringx" ) // Discovery Flags diff --git a/providers/vsphere/resources/host.go b/providers/vsphere/resources/host.go index 4b53366b47..47c5769e71 100644 --- a/providers/vsphere/resources/host.go +++ b/providers/vsphere/resources/host.go @@ -9,12 +9,12 @@ import ( "github.com/vmware/govmomi/vim25/mo" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" - "go.mondoo.com/cnquery/v9/providers/vsphere/connection" - "go.mondoo.com/cnquery/v9/providers/vsphere/resources/resourceclient" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers/vsphere/connection" + "go.mondoo.com/cnquery/v10/providers/vsphere/resources/resourceclient" + "go.mondoo.com/cnquery/v10/types" ) type mqlVsphereHostInternal struct { diff --git a/providers/vsphere/resources/network.go b/providers/vsphere/resources/network.go index 1fb3af19c7..e87aece8f0 100644 --- a/providers/vsphere/resources/network.go +++ b/providers/vsphere/resources/network.go @@ -7,8 +7,8 @@ import ( "errors" "reflect" - "go.mondoo.com/cnquery/v9/providers/vsphere/connection" - "go.mondoo.com/cnquery/v9/providers/vsphere/resources/resourceclient" + "go.mondoo.com/cnquery/v10/providers/vsphere/connection" + "go.mondoo.com/cnquery/v10/providers/vsphere/resources/resourceclient" ) type mqlVsphereVswitchStandardInternal struct { diff --git a/providers/vsphere/resources/resourceclient/esxi.go b/providers/vsphere/resources/resourceclient/esxi.go index a531df2f75..41c3f97668 100644 --- a/providers/vsphere/resources/resourceclient/esxi.go +++ b/providers/vsphere/resources/resourceclient/esxi.go @@ -8,7 +8,7 @@ import ( "regexp" "strings" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/util/convert" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/util/convert" "github.com/rs/zerolog/log" "github.com/vmware/govmomi" diff --git a/providers/vsphere/resources/resourceclient/vsphere_test.go b/providers/vsphere/resources/resourceclient/vsphere_test.go index 7379ea7c9d..be8281f2a8 100644 --- a/providers/vsphere/resources/resourceclient/vsphere_test.go +++ b/providers/vsphere/resources/resourceclient/vsphere_test.go @@ -12,7 +12,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/vmware/govmomi" - "go.mondoo.com/cnquery/v9/providers/vsphere/connection/vsimulator" + "go.mondoo.com/cnquery/v10/providers/vsphere/connection/vsimulator" ) func newClient(host string, user string, password string) (*Client, error) { diff --git a/providers/vsphere/resources/vm.go b/providers/vsphere/resources/vm.go index d6cd5503c4..77cc173b84 100644 --- a/providers/vsphere/resources/vm.go +++ b/providers/vsphere/resources/vm.go @@ -6,10 +6,10 @@ package resources import ( "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25/mo" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/vsphere/connection" - "go.mondoo.com/cnquery/v9/providers/vsphere/resources/resourceclient" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/vsphere/connection" + "go.mondoo.com/cnquery/v10/providers/vsphere/resources/resourceclient" ) func newMqlVm(runtime *plugin.Runtime, vm *object.VirtualMachine, vmInfo *mo.VirtualMachine) (*mqlVsphereVm, error) { diff --git a/providers/vsphere/resources/vsphere.go b/providers/vsphere/resources/vsphere.go index 83543403bc..27696ded42 100644 --- a/providers/vsphere/resources/vsphere.go +++ b/providers/vsphere/resources/vsphere.go @@ -8,10 +8,10 @@ import ( "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25/mo" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers/vsphere/connection" - "go.mondoo.com/cnquery/v9/providers/vsphere/resources/resourceclient" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers/vsphere/connection" + "go.mondoo.com/cnquery/v10/providers/vsphere/resources/resourceclient" ) func getClientInstance(conn *connection.VsphereConnection) *resourceclient.Client { diff --git a/providers/vsphere/resources/vsphere.lr b/providers/vsphere/resources/vsphere.lr index 26325f1667..7fe4e42f39 100644 --- a/providers/vsphere/resources/vsphere.lr +++ b/providers/vsphere/resources/vsphere.lr @@ -2,7 +2,7 @@ // SPDX-License-Identifier: BUSL-1.1 option provider = "go.mondoo.com/cnquery/providers/vsphere" -option go_package = "go.mondoo.com/cnquery/v9/providers/vsphere/resources" +option go_package = "go.mondoo.com/cnquery/v10/providers/vsphere/resources" // vSphere asset resource extend asset { diff --git a/providers/vsphere/resources/vsphere.lr.go b/providers/vsphere/resources/vsphere.lr.go index f56ab1a204..839c4e91b6 100644 --- a/providers/vsphere/resources/vsphere.lr.go +++ b/providers/vsphere/resources/vsphere.lr.go @@ -9,9 +9,9 @@ import ( "errors" "time" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/types" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/types" ) var resourceFactories map[string]plugin.ResourceFactory diff --git a/providers/vsphere/resources/vulnmgmt.go b/providers/vsphere/resources/vulnmgmt.go index c18a4d5649..6c1de8cb10 100644 --- a/providers/vsphere/resources/vulnmgmt.go +++ b/providers/vsphere/resources/vulnmgmt.go @@ -8,11 +8,11 @@ import ( "time" "github.com/rs/zerolog/log" - "go.mondoo.com/cnquery/v9/llx" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/resources" - "go.mondoo.com/cnquery/v9/providers-sdk/v1/upstream/gql" - "go.mondoo.com/cnquery/v9/providers/vsphere/connection" + "go.mondoo.com/cnquery/v10/llx" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/plugin" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/resources" + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream/gql" + "go.mondoo.com/cnquery/v10/providers/vsphere/connection" mondoogql "go.mondoo.com/mondoo-go" ) diff --git a/sbom/list.go b/sbom/list.go index 871d1e5658..11de1a0fe5 100644 --- a/sbom/list.go +++ b/sbom/list.go @@ -5,7 +5,7 @@ package sbom import ( "github.com/muesli/termenv" - "go.mondoo.com/cnquery/v9/cli/theme/colors" + "go.mondoo.com/cnquery/v10/cli/theme/colors" "io" "sort" "strings" diff --git a/sbom/sbom.go b/sbom/sbom.go index 3e996e19cb..3f341c7113 100644 --- a/sbom/sbom.go +++ b/sbom/sbom.go @@ -13,9 +13,9 @@ import ( "time" "github.com/mitchellh/hashstructure/v2" - "go.mondoo.com/cnquery/v9" - "go.mondoo.com/cnquery/v9/explorer" - "go.mondoo.com/cnquery/v9/mrn" + "go.mondoo.com/cnquery/v10" + "go.mondoo.com/cnquery/v10/explorer" + "go.mondoo.com/cnquery/v10/mrn" ) // SBOMQueryPack is a protobuf message that contains the SBOM query pack diff --git a/shared/grpc.go b/shared/grpc.go index 051115b958..e272cdc66a 100644 --- a/shared/grpc.go +++ b/shared/grpc.go @@ -8,8 +8,8 @@ import ( hclog "github.com/hashicorp/go-hclog" plugin "github.com/hashicorp/go-plugin" - "go.mondoo.com/cnquery/v9/providers" - "go.mondoo.com/cnquery/v9/shared/proto" + "go.mondoo.com/cnquery/v10/providers" + "go.mondoo.com/cnquery/v10/shared/proto" "golang.org/x/net/context" "google.golang.org/grpc" ) diff --git a/shared/interface.go b/shared/interface.go index 51127c5376..a9e4a78b39 100644 --- a/shared/interface.go +++ b/shared/interface.go @@ -6,8 +6,8 @@ package shared import ( "github.com/hashicorp/go-plugin" - "go.mondoo.com/cnquery/v9/providers" - "go.mondoo.com/cnquery/v9/shared/proto" + "go.mondoo.com/cnquery/v10/providers" + "go.mondoo.com/cnquery/v10/shared/proto" "golang.org/x/net/context" "google.golang.org/grpc" ) diff --git a/shared/proto/cnquery.pb.go b/shared/proto/cnquery.pb.go index dbf1cacd69..9d5faa0c47 100644 --- a/shared/proto/cnquery.pb.go +++ b/shared/proto/cnquery.pb.go @@ -10,7 +10,7 @@ package proto import ( - inventory "go.mondoo.com/cnquery/v9/providers-sdk/v1/inventory" + inventory "go.mondoo.com/cnquery/v10/providers-sdk/v1/inventory" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" diff --git a/shared/proto/cnquery.proto b/shared/proto/cnquery.proto index 1adda03179..1146077652 100644 --- a/shared/proto/cnquery.proto +++ b/shared/proto/cnquery.proto @@ -6,7 +6,7 @@ package proto; import "providers-sdk/v1/inventory/inventory.proto"; -option go_package = "go.mondoo.com/cnquery/v9/shared/proto"; +option go_package = "go.mondoo.com/cnquery/v10/shared/proto"; message RunQueryConfig { string command = 1; diff --git a/test/cli/cli_test.go b/test/cli/cli_test.go index cb40d6a55b..31cbc57c18 100644 --- a/test/cli/cli_test.go +++ b/test/cli/cli_test.go @@ -6,7 +6,7 @@ package cli import ( "github.com/spf13/cobra" "github.com/stretchr/testify/require" - "go.mondoo.com/cnquery/v9/apps/cnquery/cmd" + "go.mondoo.com/cnquery/v10/apps/cnquery/cmd" "os" "sync" "testing" diff --git a/utils/multierr/errors_test.go b/utils/multierr/errors_test.go index 7db5f7abcd..794d4f6667 100644 --- a/utils/multierr/errors_test.go +++ b/utils/multierr/errors_test.go @@ -8,7 +8,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - "go.mondoo.com/cnquery/v9/utils/multierr" + "go.mondoo.com/cnquery/v10/utils/multierr" ) func TestMultiErr(t *testing.T) { diff --git a/utils/stringx/contains_test.go b/utils/stringx/contains_test.go index dac4cd438f..38ebf790b4 100644 --- a/utils/stringx/contains_test.go +++ b/utils/stringx/contains_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - "go.mondoo.com/cnquery/v9/utils/stringx" + "go.mondoo.com/cnquery/v10/utils/stringx" ) func TestContains(t *testing.T) { diff --git a/utils/stringx/dedup_test.go b/utils/stringx/dedup_test.go index 29c80406de..45225c4faf 100644 --- a/utils/stringx/dedup_test.go +++ b/utils/stringx/dedup_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - "go.mondoo.com/cnquery/v9/utils/stringx" + "go.mondoo.com/cnquery/v10/utils/stringx" ) func TestDedupStringArray(t *testing.T) { diff --git a/utils/stringx/intersection_test.go b/utils/stringx/intersection_test.go index 34742758de..3d6e2c4574 100644 --- a/utils/stringx/intersection_test.go +++ b/utils/stringx/intersection_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - "go.mondoo.com/cnquery/v9/utils/stringx" + "go.mondoo.com/cnquery/v10/utils/stringx" ) func TestIntersection(t *testing.T) { diff --git a/utils/stringx/merge_test.go b/utils/stringx/merge_test.go index 3245ba55ac..f241917a54 100644 --- a/utils/stringx/merge_test.go +++ b/utils/stringx/merge_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - "go.mondoo.com/cnquery/v9/utils/stringx" + "go.mondoo.com/cnquery/v10/utils/stringx" ) func TestMerge(t *testing.T) { From 5d9429e508323e9a807f086d4b229e14baa121c1 Mon Sep 17 00:00:00 2001 From: Dominik Richter Date: Fri, 12 Jan 2024 10:16:16 -0800 Subject: [PATCH 04/11] =?UTF-8?q?=F0=9F=9F=A2=20remove=20unused=20tracer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Dominik Richter --- explorer/query_hub.go | 7 +------ go.mod | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/explorer/query_hub.go b/explorer/query_hub.go index 7075dfc29b..b10c57a40d 100644 --- a/explorer/query_hub.go +++ b/explorer/query_hub.go @@ -9,14 +9,11 @@ import ( "os" "path" + "go.mondoo.com/cnquery/v10/logger" "go.mondoo.com/cnquery/v10/mrn" - "go.mondoo.com/ranger-rpc" - - "go.mondoo.com/cnquery/v10/logger" "go.mondoo.com/ranger-rpc/codes" "go.mondoo.com/ranger-rpc/status" - "go.opentelemetry.io/otel" ) const ( @@ -26,8 +23,6 @@ const ( CollectionIDQueryPacks = "querypacks" ) -var tracer = otel.Tracer("go.mondoo.com/cnquery/v10/explorer") - func NewQueryPackMrn(namespace string, uid string) string { m := &mrn.MRN{ ServiceName: RegistryServiceName, diff --git a/go.mod b/go.mod index 97f9356b82..0afc8be169 100644 --- a/go.mod +++ b/go.mod @@ -90,7 +90,7 @@ require ( github.com/toravir/csd v0.0.0-20200911003203-13ae77ad849c github.com/ulikunitz/xz v0.5.11 go.mondoo.com/ranger-rpc v0.5.3 - go.opentelemetry.io/otel v1.21.0 + go.opentelemetry.io/otel v1.21.0 // indirect golang.org/x/crypto v0.18.0 golang.org/x/net v0.20.0 golang.org/x/sync v0.6.0 From f6396e83f388fe3a398a126ec8570d57bebe68b0 Mon Sep 17 00:00:00 2001 From: Dominik Richter Date: Fri, 12 Jan 2024 10:26:12 -0800 Subject: [PATCH 05/11] =?UTF-8?q?=F0=9F=9F=A2=20lint=20line=20length=20in?= =?UTF-8?q?=20proto?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Dominik Richter --- providers-sdk/v1/upstream/health/health.pb.go | 10 +++++----- providers-sdk/v1/upstream/health/health.proto | 3 ++- providers-sdk/v1/upstream/mvd/cvss/cvss.pb.go | 12 ++++++------ providers-sdk/v1/upstream/mvd/mvd.pb.go | 10 +++++----- providers-sdk/v1/upstream/upstream.pb.go | 10 +++++----- shared/proto/cnquery.pb.go | 6 +++--- 6 files changed, 26 insertions(+), 25 deletions(-) diff --git a/providers-sdk/v1/upstream/health/health.pb.go b/providers-sdk/v1/upstream/health/health.pb.go index 1d52fd23d6..7ed56f6cbe 100644 --- a/providers-sdk/v1/upstream/health/health.pb.go +++ b/providers-sdk/v1/upstream/health/health.pb.go @@ -248,11 +248,11 @@ var file_health_proto_rawDesc = []byte{ 0x74, 0x1a, 0x2d, 0x2e, 0x6d, 0x6f, 0x6e, 0x64, 0x6f, 0x6f, 0x2e, 0x63, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x42, 0x3b, 0x5a, 0x39, 0x67, 0x6f, 0x2e, 0x6d, 0x6f, 0x6e, 0x64, 0x6f, 0x6f, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x63, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x39, 0x2f, 0x70, 0x72, 0x6f, - 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, - 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x6f, 0x2e, 0x6d, 0x6f, 0x6e, 0x64, 0x6f, 0x6f, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x63, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x30, 0x2f, 0x70, 0x72, + 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x76, 0x31, 0x2f, 0x75, + 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/providers-sdk/v1/upstream/health/health.proto b/providers-sdk/v1/upstream/health/health.proto index 553cca8da1..a9e212c9f9 100644 --- a/providers-sdk/v1/upstream/health/health.proto +++ b/providers-sdk/v1/upstream/health/health.proto @@ -19,7 +19,8 @@ syntax = "proto3"; package mondoo.cnquery.health.v1; -option go_package = "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream/health"; +option go_package = + "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream/health"; service Health { rpc Check(HealthCheckRequest) returns (HealthCheckResponse); diff --git a/providers-sdk/v1/upstream/mvd/cvss/cvss.pb.go b/providers-sdk/v1/upstream/mvd/cvss/cvss.pb.go index 1efb3b3831..c56f0b8287 100644 --- a/providers-sdk/v1/upstream/mvd/cvss/cvss.pb.go +++ b/providers-sdk/v1/upstream/mvd/cvss/cvss.pb.go @@ -95,12 +95,12 @@ var file_cvss_proto_rawDesc = []byte{ 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x42, 0x3d, - 0x5a, 0x3b, 0x67, 0x6f, 0x2e, 0x6d, 0x6f, 0x6e, 0x64, 0x6f, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x63, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x39, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, - 0x64, 0x65, 0x72, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x73, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x2f, 0x6d, 0x76, 0x64, 0x2f, 0x63, 0x76, 0x73, 0x73, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x42, 0x3e, + 0x5a, 0x3c, 0x67, 0x6f, 0x2e, 0x6d, 0x6f, 0x6e, 0x64, 0x6f, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x63, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x30, 0x2f, 0x70, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2f, 0x6d, 0x76, 0x64, 0x2f, 0x63, 0x76, 0x73, 0x73, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/providers-sdk/v1/upstream/mvd/mvd.pb.go b/providers-sdk/v1/upstream/mvd/mvd.pb.go index b40e8bfbd7..188a766a60 100644 --- a/providers-sdk/v1/upstream/mvd/mvd.pb.go +++ b/providers-sdk/v1/upstream/mvd/mvd.pb.go @@ -1756,11 +1756,11 @@ var file_mvd_proto_rawDesc = []byte{ 0x6e, 0x64, 0x6f, 0x6f, 0x2e, 0x6d, 0x76, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x1a, 0x1e, 0x2e, 0x6d, 0x6f, 0x6e, 0x64, 0x6f, 0x6f, 0x2e, 0x6d, 0x76, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x6f, 0x6c, - 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x38, 0x5a, 0x36, 0x67, 0x6f, 0x2e, 0x6d, 0x6f, 0x6e, 0x64, 0x6f, - 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x39, - 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x76, - 0x31, 0x2f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2f, 0x6d, 0x76, 0x64, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x39, 0x5a, 0x37, 0x67, 0x6f, 0x2e, 0x6d, 0x6f, 0x6e, 0x64, 0x6f, + 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, + 0x30, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, + 0x76, 0x31, 0x2f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2f, 0x6d, 0x76, 0x64, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/providers-sdk/v1/upstream/upstream.pb.go b/providers-sdk/v1/upstream/upstream.pb.go index 695bfcc410..66f48aaa9f 100644 --- a/providers-sdk/v1/upstream/upstream.pb.go +++ b/providers-sdk/v1/upstream/upstream.pb.go @@ -1056,11 +1056,11 @@ var file_upstream_proto_rawDesc = []byte{ 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x6d, 0x6f, 0x6e, 0x64, 0x6f, 0x6f, 0x2e, 0x63, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x53, - 0x48, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x34, - 0x5a, 0x32, 0x67, 0x6f, 0x2e, 0x6d, 0x6f, 0x6e, 0x64, 0x6f, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x63, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x39, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, - 0x64, 0x65, 0x72, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x73, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x48, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x35, + 0x5a, 0x33, 0x67, 0x6f, 0x2e, 0x6d, 0x6f, 0x6e, 0x64, 0x6f, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x63, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x30, 0x2f, 0x70, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/shared/proto/cnquery.pb.go b/shared/proto/cnquery.pb.go index 9d5faa0c47..22609f5b27 100644 --- a/shared/proto/cnquery.pb.go +++ b/shared/proto/cnquery.pb.go @@ -294,10 +294,10 @@ var file_cnquery_proto_rawDesc = []byte{ 0x70, 0x74, 0x79, 0x32, 0x34, 0x0a, 0x0c, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x48, 0x65, 0x6c, 0x70, 0x65, 0x72, 0x12, 0x24, 0x0a, 0x05, 0x57, 0x72, 0x69, 0x74, 0x65, 0x12, 0x0d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x1a, 0x0c, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, 0x27, 0x5a, 0x25, 0x67, 0x6f, 0x2e, + 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, 0x28, 0x5a, 0x26, 0x67, 0x6f, 0x2e, 0x6d, 0x6f, 0x6e, 0x64, 0x6f, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x2f, 0x76, 0x39, 0x2f, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x79, 0x2f, 0x76, 0x31, 0x30, 0x2f, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( From 3ab5fb72b932c294eff446a34bcd0690fdcd4fd2 Mon Sep 17 00:00:00 2001 From: Christoph Hartmann Date: Sun, 14 Jan 2024 18:27:49 +0100 Subject: [PATCH 06/11] =?UTF-8?q?=F0=9F=A7=B9=20update=20generated=20files?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- explorer/cnquery_explorer.pb.go | 8 ++++---- explorer/scan/cnquery_explorer_scan.pb.go | 6 +++--- llx/llx.pb.go | 6 +++--- providers-sdk/v1/inventory/inventory.pb.go | 8 ++++---- providers-sdk/v1/plugin/plugin.pb.go | 8 ++++---- providers-sdk/v1/resources/resources.pb.go | 8 ++++---- providers-sdk/v1/vault/vault.pb.go | 8 ++++---- providers/aws/resources/aws.lr.manifest.yaml | 4 ++-- providers/builtin_dev.go | 1 + 9 files changed, 29 insertions(+), 28 deletions(-) diff --git a/explorer/cnquery_explorer.pb.go b/explorer/cnquery_explorer.pb.go index df855670b2..a97b7bbad6 100644 --- a/explorer/cnquery_explorer.pb.go +++ b/explorer/cnquery_explorer.pb.go @@ -3614,10 +3614,10 @@ var file_cnquery_explorer_proto_rawDesc = []byte{ 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x69, 0x7a, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x27, 0x2e, 0x63, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x72, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x69, 0x7a, - 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x42, 0x23, 0x5a, - 0x21, 0x67, 0x6f, 0x2e, 0x6d, 0x6f, 0x6e, 0x64, 0x6f, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, - 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x39, 0x2f, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x72, - 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x42, 0x24, 0x5a, + 0x22, 0x67, 0x6f, 0x2e, 0x6d, 0x6f, 0x6e, 0x64, 0x6f, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, + 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x30, 0x2f, 0x65, 0x78, 0x70, 0x6c, 0x6f, + 0x72, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/explorer/scan/cnquery_explorer_scan.pb.go b/explorer/scan/cnquery_explorer_scan.pb.go index 15b7d5c18d..b28f98f067 100644 --- a/explorer/scan/cnquery_explorer_scan.pb.go +++ b/explorer/scan/cnquery_explorer_scan.pb.go @@ -134,10 +134,10 @@ var file_cnquery_explorer_scan_proto_rawDesc = []byte{ 0x70, 0x73, 0x1a, 0x38, 0x0a, 0x0a, 0x50, 0x72, 0x6f, 0x70, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x28, 0x5a, 0x26, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x29, 0x5a, 0x27, 0x67, 0x6f, 0x2e, 0x6d, 0x6f, 0x6e, 0x64, 0x6f, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, - 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x39, 0x2f, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x72, 0x65, - 0x72, 0x2f, 0x73, 0x63, 0x61, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x30, 0x2f, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x72, + 0x65, 0x72, 0x2f, 0x73, 0x63, 0x61, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/llx/llx.pb.go b/llx/llx.pb.go index ad65e8baf7..8d3d14b9a8 100644 --- a/llx/llx.pb.go +++ b/llx/llx.pb.go @@ -1445,9 +1445,9 @@ var file_llx_proto_rawDesc = []byte{ 0x6c, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x6c, 0x6c, 0x78, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x73, 0x73, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x42, - 0x1e, 0x5a, 0x1c, 0x67, 0x6f, 0x2e, 0x6d, 0x6f, 0x6e, 0x64, 0x6f, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x63, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x39, 0x2f, 0x6c, 0x6c, 0x78, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x1f, 0x5a, 0x1d, 0x67, 0x6f, 0x2e, 0x6d, 0x6f, 0x6e, 0x64, 0x6f, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x63, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x30, 0x2f, 0x6c, 0x6c, 0x78, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/providers-sdk/v1/inventory/inventory.pb.go b/providers-sdk/v1/inventory/inventory.pb.go index 758dcdae64..ce79216393 100644 --- a/providers-sdk/v1/inventory/inventory.pb.go +++ b/providers-sdk/v1/inventory/inventory.pb.go @@ -1893,10 +1893,10 @@ var file_inventory_proto_rawDesc = []byte{ 0x43, 0x54, 0x10, 0x0c, 0x12, 0x13, 0x0a, 0x0f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x47, 0x43, 0x50, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x10, 0x0d, 0x12, 0x15, 0x0a, 0x11, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x41, 0x5a, 0x55, 0x52, 0x45, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x10, 0x0e, - 0x42, 0x35, 0x5a, 0x33, 0x67, 0x6f, 0x2e, 0x6d, 0x6f, 0x6e, 0x64, 0x6f, 0x6f, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x63, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x39, 0x2f, 0x70, 0x72, 0x6f, - 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e, - 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x42, 0x36, 0x5a, 0x34, 0x67, 0x6f, 0x2e, 0x6d, 0x6f, 0x6e, 0x64, 0x6f, 0x6f, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x63, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x30, 0x2f, 0x70, 0x72, + 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x76, 0x31, 0x2f, 0x69, + 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/providers-sdk/v1/plugin/plugin.pb.go b/providers-sdk/v1/plugin/plugin.pb.go index 4f18d947f3..65c358e324 100644 --- a/providers-sdk/v1/plugin/plugin.pb.go +++ b/providers-sdk/v1/plugin/plugin.pb.go @@ -945,11 +945,11 @@ var file_plugin_proto_rawDesc = []byte{ 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x1a, 0x1d, 0x2e, 0x63, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x44, - 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x42, 0x32, 0x5a, 0x30, 0x67, 0x6f, 0x2e, 0x6d, 0x6f, 0x6e, + 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x42, 0x33, 0x5a, 0x31, 0x67, 0x6f, 0x2e, 0x6d, 0x6f, 0x6e, 0x64, 0x6f, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, - 0x76, 0x39, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x2d, 0x73, 0x64, 0x6b, - 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x76, 0x31, 0x30, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x2d, 0x73, 0x64, + 0x6b, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/providers-sdk/v1/resources/resources.pb.go b/providers-sdk/v1/resources/resources.pb.go index 3c3f1ad535..4fbae71bb1 100644 --- a/providers-sdk/v1/resources/resources.pb.go +++ b/providers-sdk/v1/resources/resources.pb.go @@ -576,10 +576,10 @@ var file_resources_proto_rawDesc = []byte{ 0x64, 0x18, 0x19, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x45, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x65, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x42, - 0x35, 0x5a, 0x33, 0x67, 0x6f, 0x2e, 0x6d, 0x6f, 0x6e, 0x64, 0x6f, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x63, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x39, 0x2f, 0x70, 0x72, 0x6f, 0x76, - 0x69, 0x64, 0x65, 0x72, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x36, 0x5a, 0x34, 0x67, 0x6f, 0x2e, 0x6d, 0x6f, 0x6e, 0x64, 0x6f, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x63, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x30, 0x2f, 0x70, 0x72, 0x6f, + 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/providers-sdk/v1/vault/vault.pb.go b/providers-sdk/v1/vault/vault.pb.go index 3a3a5b85d2..f01783b784 100644 --- a/providers-sdk/v1/vault/vault.pb.go +++ b/providers-sdk/v1/vault/vault.pb.go @@ -707,10 +707,10 @@ var file_vault_proto_rawDesc = []byte{ 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x1a, 0x1e, 0x2e, 0x63, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x49, - 0x44, 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x6f, 0x2e, 0x6d, 0x6f, 0x6e, 0x64, 0x6f, 0x6f, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x39, 0x2f, 0x70, 0x72, - 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x76, 0x31, 0x2f, 0x76, - 0x61, 0x75, 0x6c, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x44, 0x42, 0x32, 0x5a, 0x30, 0x67, 0x6f, 0x2e, 0x6d, 0x6f, 0x6e, 0x64, 0x6f, 0x6f, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x30, 0x2f, 0x70, + 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x76, 0x31, 0x2f, + 0x76, 0x61, 0x75, 0x6c, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/providers/aws/resources/aws.lr.manifest.yaml b/providers/aws/resources/aws.lr.manifest.yaml index e0dcfe8af5..861aca6fe4 100755 --- a/providers/aws/resources/aws.lr.manifest.yaml +++ b/providers/aws/resources/aws.lr.manifest.yaml @@ -1707,7 +1707,7 @@ resources: fields: createdAt: {} is_private: true - min_mondoo_version: 10.0 + min_mondoo_version: "10" platform: name: - aws @@ -1778,7 +1778,7 @@ resources: groups: {} id: {} loginProfile: - min_mondoo_version: 10.0 + min_mondoo_version: "10" name: {} passwordLastUsed: {} policies: {} diff --git a/providers/builtin_dev.go b/providers/builtin_dev.go index c0b85bf3b4..a07cf64889 100644 --- a/providers/builtin_dev.go +++ b/providers/builtin_dev.go @@ -26,4 +26,5 @@ func init() { // }, // Config: &osconf.Config, // } + } From cf10bf789e223fa8ef6dab42b711f6a255a19ae6 Mon Sep 17 00:00:00 2001 From: Christoph Hartmann Date: Sun, 14 Jan 2024 18:36:14 +0100 Subject: [PATCH 07/11] =?UTF-8?q?=F0=9F=A7=B9=20fix=20spelling=20in=20make?= =?UTF-8?q?file?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 76d35e697b..93414024a2 100644 --- a/Makefile +++ b/Makefile @@ -56,7 +56,7 @@ prep/tools/windows: prep/tools/protolint: - # protobuf lintingng + # protobuf linting go install github.com/yoheimuta/protolint/cmd/protolint@latest prep/tools: prep/tools/protolint From 9efd4ad13ff1925bc6f1d1b6ad181fdf5d197494 Mon Sep 17 00:00:00 2001 From: Christoph Hartmann Date: Sun, 14 Jan 2024 18:54:22 +0100 Subject: [PATCH 08/11] =?UTF-8?q?=F0=9F=A7=B9=20use=20list=20of=20cross-co?= =?UTF-8?q?nnection=20provider?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- providers/runtime.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/providers/runtime.go b/providers/runtime.go index 5e9297bf88..ab2ad0e3f9 100644 --- a/providers/runtime.go +++ b/providers/runtime.go @@ -17,6 +17,7 @@ import ( "go.mondoo.com/cnquery/v10/providers-sdk/v1/upstream" "go.mondoo.com/cnquery/v10/types" "go.mondoo.com/cnquery/v10/utils/multierr" + "go.mondoo.com/cnquery/v10/utils/stringx" "google.golang.org/grpc/status" ) @@ -576,8 +577,15 @@ func (r *Runtime) lookupResourceProvider(resource string) (*ConnectedProvider, * } providerConn := r.Provider.Instance.ID - if info.Provider != providerConn && info.Provider != "go.mondoo.com/cnquery/providers/core" && info.Provider != "go.mondoo.com/cnquery/providers/network" { - return nil, nil, errors.New("incorrect provider for asset, not adding") + crossProviderList := []string{ + "go.mondoo.com/cnquery/providers/core", + "go.mondoo.com/cnquery/v9/providers/core", // for backwards compatibility + "go.mondoo.com/cnquery/providers/network", + "go.mondoo.com/cnquery/v9/providers/network", // for backwards compatibility + } + + if info.Provider != providerConn && !stringx.Contains(crossProviderList, info.Provider) { + return nil, nil, errors.New("incorrect provider for asset, not adding " + info.Provider) } res, err := r.addProvider(info.Provider, false) From fa8dac4c90a9b314c9aa9be0552e1c5696ca1c11 Mon Sep 17 00:00:00 2001 From: Christoph Hartmann Date: Sun, 14 Jan 2024 19:19:04 +0100 Subject: [PATCH 09/11] make network provider backwards-compatible --- providers/network/config/config.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/providers/network/config/config.go b/providers/network/config/config.go index a3e109894e..79ec480e75 100644 --- a/providers/network/config/config.go +++ b/providers/network/config/config.go @@ -17,6 +17,9 @@ var Config = plugin.Provider{ "go.mondoo.com/cnquery/providers/os", "go.mondoo.com/cnquery/providers/k8s", "go.mondoo.com/cnquery/providers/aws", + "go.mondoo.com/cnquery/v9/providers/os", + "go.mondoo.com/cnquery/v9/providers/k8s", + "go.mondoo.com/cnquery/v9/providers/aws", }, Connectors: []plugin.Connector{ { From 7390bd370ab4b024cd330b0348785a32b68805b9 Mon Sep 17 00:00:00 2001 From: Christoph Hartmann Date: Sun, 14 Jan 2024 20:24:16 +0100 Subject: [PATCH 10/11] =?UTF-8?q?=F0=9F=A7=B9=20remove=20k8s.kubelet=20ali?= =?UTF-8?q?as?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- providers/os/resources/kubelet_test.go | 52 +++++++++++++------------- providers/os/resources/os.lr | 1 - 2 files changed, 26 insertions(+), 27 deletions(-) diff --git a/providers/os/resources/kubelet_test.go b/providers/os/resources/kubelet_test.go index a892ec6061..9493a71b3a 100644 --- a/providers/os/resources/kubelet_test.go +++ b/providers/os/resources/kubelet_test.go @@ -13,65 +13,65 @@ import ( func TestResource_K8sKubelet(t *testing.T) { x := testutils.InitTester(testutils.KubeletMock()) - t.Run("k8s.kubelet resource", func(t *testing.T) { - res := x.TestQuery(t, "k8s.kubelet") + t.Run("kubelet resource", func(t *testing.T) { + res := x.TestQuery(t, "kubelet") assert.NotEmpty(t, res) assert.NoError(t, res[0].Data.Error) }) t.Run("kubelet configFile path", func(t *testing.T) { - res := x.TestQuery(t, "k8s.kubelet.configFile.path") + res := x.TestQuery(t, "kubelet.configFile.path") assert.NotEmpty(t, res) assert.NoError(t, res[0].Data.Error) }) t.Run("kubelet process executable", func(t *testing.T) { - res := x.TestQuery(t, "k8s.kubelet.process.executable") + res := x.TestQuery(t, "kubelet.process.executable") assert.NotEmpty(t, res) assert.NoError(t, res[0].Data.Error) assert.Equal(t, "/var/lib/minikube/binaries/v1.28.3/kubelet", res[0].Data.Value) }) t.Run("kubelet config file flag", func(t *testing.T) { - res := x.TestQuery(t, "k8s.kubelet.configuration[\"config\"]") + res := x.TestQuery(t, "kubelet.configuration[\"config\"]") assert.NotEmpty(t, res) assert.Empty(t, res[0].Result().Error) assert.Equal(t, "/var/lib/kubelet/config.yaml", res[0].Data.Value) }) t.Run("check for default value", func(t *testing.T) { - res := x.TestQuery(t, "k8s.kubelet.configuration[\"volumePluginDir\"]") + res := x.TestQuery(t, "kubelet.configuration[\"volumePluginDir\"]") assert.NotEmpty(t, res) assert.Empty(t, res[0].Result().Error) assert.Equal(t, "/usr/libexec/kubernetes/kubelet-plugins/volume/exec/", res[0].Data.Value) }) t.Run("check for config file param", func(t *testing.T) { - res := x.TestQuery(t, "k8s.kubelet.configuration[\"healthzBindAddress\"]") + res := x.TestQuery(t, "kubelet.configuration[\"healthzBindAddress\"]") assert.NotEmpty(t, res) assert.Empty(t, res[0].Result().Error) assert.Equal(t, "127.0.0.1", res[0].Data.Value) }) t.Run("check for cli flag overwrite", func(t *testing.T) { - res := x.TestQuery(t, "k8s.kubelet.process.flags[\"runtime-request-timeout\"]") + res := x.TestQuery(t, "kubelet.process.flags[\"runtime-request-timeout\"]") assert.NotEmpty(t, res) assert.Empty(t, res[0].Result().Error) assert.Equal(t, "7m", res[0].Data.Value) - res = x.TestQuery(t, "k8s.kubelet.configFile.content") + res = x.TestQuery(t, "kubelet.configFile.content") assert.NotEmpty(t, res) assert.Empty(t, res[0].Result().Error) assert.Contains(t, res[0].Data.Value, "runtimeRequestTimeout: 15m0s") - res = x.TestQuery(t, "k8s.kubelet.configuration[\"runtimeRequestTimeout\"]") + res = x.TestQuery(t, "kubelet.configuration[\"runtimeRequestTimeout\"]") assert.NotEmpty(t, res) assert.Empty(t, res[0].Result().Error) assert.Equal(t, "7m", res[0].Data.Value) }) t.Run("kubelet config clientCAFile", func(t *testing.T) { - res := x.TestQuery(t, "k8s.kubelet.configuration[\"authentication\"][\"x509\"][\"clientCAFile\"]") + res := x.TestQuery(t, "kubelet.configuration[\"authentication\"][\"x509\"][\"clientCAFile\"]") assert.NotEmpty(t, res) assert.Empty(t, res[0].Result().Error) assert.Contains(t, "/var/lib/minikube/certs/ca.crt", res[0].Data.Value) @@ -83,48 +83,48 @@ func TestResource_K8sKubeletAKS(t *testing.T) { // everything is configured via the kubelet process flags x := testutils.InitTester(testutils.KubeletAKSMock()) - t.Run("k8s.kubelet resource", func(t *testing.T) { - res := x.TestQuery(t, "k8s.kubelet") + t.Run("kubelet resource", func(t *testing.T) { + res := x.TestQuery(t, "kubelet") assert.NotEmpty(t, res) assert.NoError(t, res[0].Data.Error) }) t.Run("kubelet configFile path", func(t *testing.T) { - res := x.TestQuery(t, "k8s.kubelet.configFile") + res := x.TestQuery(t, "kubelet.configFile") assert.NotEmpty(t, res) assert.Error(t, res[0].Data.Error) }) t.Run("kubelet configFile exists", func(t *testing.T) { - res := x.TestQuery(t, "k8s.kubelet.configFile.exists") + res := x.TestQuery(t, "kubelet.configFile.exists") assert.NotEmpty(t, res) assert.NoError(t, res[0].Data.Error) assert.False(t, res[0].Data.Value.(bool)) }) t.Run("kubelet process executable", func(t *testing.T) { - res := x.TestQuery(t, "k8s.kubelet.process.executable") + res := x.TestQuery(t, "kubelet.process.executable") assert.NotEmpty(t, res) assert.NoError(t, res[0].Data.Error) assert.Equal(t, "/var/lib/minikube/binaries/v1.28.3/kubelet", res[0].Data.Value) }) t.Run("kubelet config file flag", func(t *testing.T) { - res := x.TestQuery(t, "k8s.kubelet.configuration[\"config\"]") + res := x.TestQuery(t, "kubelet.configuration[\"config\"]") assert.NotEmpty(t, res) assert.Empty(t, res[0].Result().Error) assert.Equal(t, nil, res[0].Data.Value) }) t.Run("kubelet flag anonymous-auth", func(t *testing.T) { - res := x.TestQuery(t, "k8s.kubelet.configuration[\"authentication\"][\"anonymous\"][\"enabled\"]") + res := x.TestQuery(t, "kubelet.configuration[\"authentication\"][\"anonymous\"][\"enabled\"]") assert.NotEmpty(t, res) assert.Empty(t, res[0].Result().Error) assert.Equal(t, "false", res[0].Data.Value) }) t.Run("kubelet flag tls-cipher-suites", func(t *testing.T) { - res := x.TestQuery(t, "k8s.kubelet.configuration[\"tlsCipherSuites\"]") + res := x.TestQuery(t, "kubelet.configuration[\"tlsCipherSuites\"]") assert.NotEmpty(t, res) assert.Empty(t, res[0].Result().Error) assert.Equal(t, 8, len(res[0].Data.Value.([]interface{}))) @@ -132,20 +132,20 @@ func TestResource_K8sKubeletAKS(t *testing.T) { }) t.Run("kubelet flag eviction-hard", func(t *testing.T) { - res := x.TestQuery(t, "k8s.kubelet.configuration[\"evictionHard\"][\"memory.available\"]") + res := x.TestQuery(t, "kubelet.configuration[\"evictionHard\"][\"memory.available\"]") assert.NotEmpty(t, res) assert.Empty(t, res[0].Result().Error) assert.Equal(t, "750Mi", res[0].Data.Value) }) t.Run("check for cli flag overwrite", func(t *testing.T) { - res := x.TestQuery(t, "k8s.kubelet.process.flags[\"read-only-port\"]") + res := x.TestQuery(t, "kubelet.process.flags[\"read-only-port\"]") assert.NotEmpty(t, res) assert.Empty(t, res[0].Result().Error) assert.Equal(t, "0", res[0].Data.Value) // default is 10250 - res = x.TestQuery(t, "k8s.kubelet.configuration[\"readOnlyPort\"]") + res = x.TestQuery(t, "kubelet.configuration[\"readOnlyPort\"]") assert.NotEmpty(t, res) assert.Empty(t, res[0].Result().Error) assert.Equal(t, "0", res[0].Data.Value) @@ -157,20 +157,20 @@ func TestResource_K8sKubeletEKS(t *testing.T) { // and set's the read-only-port to 0 x := testutils.InitTester(testutils.KubeletEKSMock()) - t.Run("k8s.kubelet resource", func(t *testing.T) { - res := x.TestQuery(t, "k8s.kubelet") + t.Run("kubelet resource", func(t *testing.T) { + res := x.TestQuery(t, "kubelet") assert.NotEmpty(t, res) assert.NoError(t, res[0].Data.Error) }) t.Run("kubelet configFile path", func(t *testing.T) { - res := x.TestQuery(t, "k8s.kubelet.configFile") + res := x.TestQuery(t, "kubelet.configFile") assert.NotEmpty(t, res) assert.NoError(t, res[0].Data.Error) }) t.Run("kubelet config readOnlyPort", func(t *testing.T) { - res := x.TestQuery(t, "k8s.kubelet.configuration[\"readOnlyPort\"]") + res := x.TestQuery(t, "kubelet.configuration[\"readOnlyPort\"]") assert.NotEmpty(t, res) assert.Empty(t, res[0].Result().Error) assert.Equal(t, 0.0, res[0].Data.Value) diff --git a/providers/os/resources/os.lr b/providers/os/resources/os.lr index f53576f1bc..6741498e13 100644 --- a/providers/os/resources/os.lr +++ b/providers/os/resources/os.lr @@ -15,7 +15,6 @@ alias os.base.packages = packages alias os.base.service = service alias os.base.services = services alias os.unix.sshd = sshd -alias k8s.kubelet = kubelet extend asset { // Common Platform Enumeration (CPE) for the asset From 84990112698641d9927df9d97088361659c5b9e0 Mon Sep 17 00:00:00 2001 From: Christoph Hartmann Date: Sun, 14 Jan 2024 21:07:52 +0100 Subject: [PATCH 11/11] =?UTF-8?q?=F0=9F=A7=B9=20update=20provider=20ids=20?= =?UTF-8?q?in=20recordings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- providers-sdk/v1/testutils/testdata/arch.json | 2 +- providers-sdk/v1/testutils/testdata/kubelet-aks.json | 2 +- providers-sdk/v1/testutils/testdata/kubelet-eks.json | 2 +- providers-sdk/v1/testutils/testdata/kubelet.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/providers-sdk/v1/testutils/testdata/arch.json b/providers-sdk/v1/testutils/testdata/arch.json index 32c7662ca3..66604deae6 100644 --- a/providers-sdk/v1/testutils/testdata/arch.json +++ b/providers-sdk/v1/testutils/testdata/arch.json @@ -21,7 +21,7 @@ "connections": [ { "url": "local://", - "provider": "go.mondoo.com/cnquery/v10/providers/os", + "provider": "go.mondoo.com/cnquery/providers/os", "connector": "local", "version": "" }, diff --git a/providers-sdk/v1/testutils/testdata/kubelet-aks.json b/providers-sdk/v1/testutils/testdata/kubelet-aks.json index e28d0a422c..669f0838de 100644 --- a/providers-sdk/v1/testutils/testdata/kubelet-aks.json +++ b/providers-sdk/v1/testutils/testdata/kubelet-aks.json @@ -1 +1 @@ -{"assets":[{"asset":{"id":"Buildroot 2021.02.12","platformIDs":["//platformid.api.mondoo.app/hostname/minikube","//platformid.api.mondoo.app/runtime/ssh/hostkey/SHA256-9GHnVr3zGaRkwyvFET6LOu0zq3k3j89XH/Xwb6r/vlI"],"name":"buildroot","arch":"x86_64","title":"Buildroot 2021.02.12","family":["linux","unix","os"],"version":"2021.02.12","kind":"baremetal","labels":{"distro-id":"buildroot"}},"connections":[{"url":"ssh://192.168.39.137","provider":"go.mondoo.com/cnquery/v10/providers/os","connector":"ssh","version":""}],"resources":[{"Resource":"file","ID":"/var/lib/kubelet/config.yaml","Fields":{"exists":{"type":"\u0004","value":false},"path":{"type":"\u0007","value":"/var/lib/kubelet/config.yaml"}}},{"Resource":"kubelet","ID":"","Fields":{"process":{"type":"\u001bprocess","value":{"Name":"process","ID":"107838"}}}},{"Resource":"process","ID":"1","Fields":{"executable":{"type":"\u0007","value":"/sbin/init"},"pid":{"type":"\u0005","value":1},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"10","Fields":{"executable":{"type":"\u0007","value":"[rcu_tasks_rude_]"},"pid":{"type":"\u0005","value":10},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1011","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/cri-dockerd"},"pid":{"type":"\u0005","value":1011},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"102330","Fields":{"executable":{"type":"\u0007","value":"[kworker/0:12-events_power_efficient]"},"pid":{"type":"\u0005","value":102330},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"104490","Fields":{"executable":{"type":"\u0007","value":"[kworker/u4:1-events_unbound]"},"pid":{"type":"\u0005","value":104490},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"104499","Fields":{"executable":{"type":"\u0007","value":"[kworker/1:0-cgroup_destroy]"},"pid":{"type":"\u0005","value":104499},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"104500","Fields":{"executable":{"type":"\u0007","value":"[kworker/1:1-mm_percpu_wq]"},"pid":{"type":"\u0005","value":104500},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"105573","Fields":{"executable":{"type":"\u0007","value":"[kworker/0:0-cgroup_pidlist_destroy]"},"pid":{"type":"\u0005","value":105573},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"107838","Fields":{"command":{"type":"\u0007","value":"/var/lib/minikube/binaries/v1.28.3/kubelet --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --container-runtime-endpoint=unix:///var/run/cri-dockerd.sock --hostname-override=minikube --kubeconfig=/etc/kubernetes/kubelet.conf --node-ip=192.168.39.137 --anonymous-auth=false --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_GCM_SHA256 --eviction-hard=memory.available\u003c750Mi,nodefs.available\u003c10%,nodefs.inodesFree\u003c5% --read-only-port=0"},"executable":{"type":"\u0007","value":"/var/lib/minikube/binaries/v1.28.3/kubelet"},"flags":{"type":"\u001a\u0007\u0007","value":{"anonymous-auth":"false","bootstrap-kubeconfig":"/etc/kubernetes/bootstrap-kubelet.conf","container-runtime-endpoint":"unix:///var/run/cri-dockerd.sock","eviction-hard":"memory.available\u003c750Mi,nodefs.available\u003c10%,nodefs.inodesFree\u003c5%","hostname-override":"minikube","kubeconfig":"/etc/kubernetes/kubelet.conf","node-ip":"192.168.39.137","read-only-port":"0","tls-cipher-suites":"TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_GCM_SHA256"}},"pid":{"type":"\u0005","value":107838},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"11","Fields":{"executable":{"type":"\u0007","value":"[rcu_tasks_trace]"},"pid":{"type":"\u0005","value":11},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1116","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/dockerd"},"pid":{"type":"\u0005","value":1116},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1122","Fields":{"executable":{"type":"\u0007","value":"containerd"},"pid":{"type":"\u0005","value":1122},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"116801","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":116801},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"116803","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":116803},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"116807","Fields":{"executable":{"type":"\u0007","value":"/usr/libexec/sftp-server"},"pid":{"type":"\u0005","value":116807},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"116814","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":116814},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"116816","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":116816},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"116819","Fields":{"executable":{"type":"\u0007","value":"/usr/libexec/sftp-server"},"pid":{"type":"\u0005","value":116819},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"116820","Fields":{"executable":{"type":"\u0007","value":"/usr/libexec/sftp-server"},"pid":{"type":"\u0005","value":116820},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"116821","Fields":{"executable":{"type":"\u0007","value":"/usr/libexec/sftp-server"},"pid":{"type":"\u0005","value":116821},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"116905","Fields":{"executable":{"type":"\u0007","value":"ps"},"pid":{"type":"\u0005","value":116905},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"12","Fields":{"executable":{"type":"\u0007","value":"[ksoftirqd/0]"},"pid":{"type":"\u0005","value":12},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"13","Fields":{"executable":{"type":"\u0007","value":"[rcu_sched]"},"pid":{"type":"\u0005","value":13},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"14","Fields":{"executable":{"type":"\u0007","value":"[migration/0]"},"pid":{"type":"\u0005","value":14},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"15","Fields":{"executable":{"type":"\u0007","value":"[cpuhp/0]"},"pid":{"type":"\u0005","value":15},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16","Fields":{"executable":{"type":"\u0007","value":"[cpuhp/1]"},"pid":{"type":"\u0005","value":16},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16211","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-timesyncd"},"pid":{"type":"\u0005","value":16211},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16220","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-udevd"},"pid":{"type":"\u0005","value":16220},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16229","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-journald"},"pid":{"type":"\u0005","value":16229},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16233","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-logind"},"pid":{"type":"\u0005","value":16233},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16314","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-networkd"},"pid":{"type":"\u0005","value":16314},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16317","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-resolved"},"pid":{"type":"\u0005","value":16317},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"17","Fields":{"executable":{"type":"\u0007","value":"[migration/1]"},"pid":{"type":"\u0005","value":17},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"18","Fields":{"executable":{"type":"\u0007","value":"[ksoftirqd/1]"},"pid":{"type":"\u0005","value":18},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"2","Fields":{"executable":{"type":"\u0007","value":"[kthreadd]"},"pid":{"type":"\u0005","value":2},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"20","Fields":{"executable":{"type":"\u0007","value":"[kworker/1:0H-events_highpri]"},"pid":{"type":"\u0005","value":20},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"21","Fields":{"executable":{"type":"\u0007","value":"[kdevtmpfs]"},"pid":{"type":"\u0005","value":21},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"22","Fields":{"executable":{"type":"\u0007","value":"[netns]"},"pid":{"type":"\u0005","value":22},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"221","Fields":{"executable":{"type":"\u0007","value":"/usr/sbin/acpid"},"pid":{"type":"\u0005","value":221},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"222","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/dbus-daemon"},"pid":{"type":"\u0005","value":222},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"224","Fields":{"executable":{"type":"\u0007","value":"/sbin/agetty"},"pid":{"type":"\u0005","value":224},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"23","Fields":{"executable":{"type":"\u0007","value":"[kauditd]"},"pid":{"type":"\u0005","value":23},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"232","Fields":{"executable":{"type":"\u0007","value":"/sbin/agetty"},"pid":{"type":"\u0005","value":232},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"24","Fields":{"executable":{"type":"\u0007","value":"[oom_reaper]"},"pid":{"type":"\u0005","value":24},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"25","Fields":{"executable":{"type":"\u0007","value":"[writeback]"},"pid":{"type":"\u0005","value":25},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"26","Fields":{"executable":{"type":"\u0007","value":"[kcompactd0]"},"pid":{"type":"\u0005","value":26},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"27","Fields":{"executable":{"type":"\u0007","value":"[khugepaged]"},"pid":{"type":"\u0005","value":27},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"292","Fields":{"executable":{"type":"\u0007","value":"[jbd2/vda1-8]"},"pid":{"type":"\u0005","value":292},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"293","Fields":{"executable":{"type":"\u0007","value":"[ext4-rsv-conver]"},"pid":{"type":"\u0005","value":293},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3","Fields":{"executable":{"type":"\u0007","value":"[rcu_gp]"},"pid":{"type":"\u0005","value":3},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3166","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3166},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3186","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":3186},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3208","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3208},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3228","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":3228},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3242","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3242},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3264","Fields":{"executable":{"type":"\u0007","value":"/usr/local/bin/kube-proxy"},"pid":{"type":"\u0005","value":3264},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"341","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":341},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3438","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3438},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3459","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":3459},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3529","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3529},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3551","Fields":{"executable":{"type":"\u0007","value":"/coredns"},"pid":{"type":"\u0005","value":3551},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"380","Fields":{"executable":{"type":"\u0007","value":"/usr/sbin/rpc.statd"},"pid":{"type":"\u0005","value":380},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"386","Fields":{"executable":{"type":"\u0007","value":"/usr/sbin/rpcbind"},"pid":{"type":"\u0005","value":386},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"387","Fields":{"executable":{"type":"\u0007","value":"/usr/sbin/rpc.mountd"},"pid":{"type":"\u0005","value":387},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"393","Fields":{"executable":{"type":"\u0007","value":"[kworker/u5:1-xprtiod]"},"pid":{"type":"\u0005","value":393},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"394","Fields":{"executable":{"type":"\u0007","value":"[lockd]"},"pid":{"type":"\u0005","value":394},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"4","Fields":{"executable":{"type":"\u0007","value":"[rcu_par_gp]"},"pid":{"type":"\u0005","value":4},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"41","Fields":{"executable":{"type":"\u0007","value":"[cryptd]"},"pid":{"type":"\u0005","value":41},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"434","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":434},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"435","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":435},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"436","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":436},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"437","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":437},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"438","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":438},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"439","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":439},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"440","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":440},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"441","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":441},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"53","Fields":{"executable":{"type":"\u0007","value":"[kblockd]"},"pid":{"type":"\u0005","value":53},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"54","Fields":{"executable":{"type":"\u0007","value":"[blkcg_punt_bio]"},"pid":{"type":"\u0005","value":54},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"55","Fields":{"executable":{"type":"\u0007","value":"[ata_sff]"},"pid":{"type":"\u0005","value":55},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"55460","Fields":{"executable":{"type":"\u0007","value":"[kworker/u4:0-events_unbound]"},"pid":{"type":"\u0005","value":55460},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"56","Fields":{"executable":{"type":"\u0007","value":"[md]"},"pid":{"type":"\u0005","value":56},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"57","Fields":{"executable":{"type":"\u0007","value":"[kworker/0:1H-kblockd]"},"pid":{"type":"\u0005","value":57},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"58","Fields":{"executable":{"type":"\u0007","value":"[rpciod]"},"pid":{"type":"\u0005","value":58},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"59","Fields":{"executable":{"type":"\u0007","value":"[kworker/u5:0-xprtiod]"},"pid":{"type":"\u0005","value":59},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"6","Fields":{"executable":{"type":"\u0007","value":"[kworker/0:0H-events_highpri]"},"pid":{"type":"\u0005","value":6},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"60","Fields":{"executable":{"type":"\u0007","value":"[xprtiod]"},"pid":{"type":"\u0005","value":60},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"61","Fields":{"executable":{"type":"\u0007","value":"[cfg80211]"},"pid":{"type":"\u0005","value":61},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"63","Fields":{"executable":{"type":"\u0007","value":"[kswapd0]"},"pid":{"type":"\u0005","value":63},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"64","Fields":{"executable":{"type":"\u0007","value":"[nfsiod]"},"pid":{"type":"\u0005","value":64},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"65","Fields":{"executable":{"type":"\u0007","value":"[cifsiod]"},"pid":{"type":"\u0005","value":65},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"66","Fields":{"executable":{"type":"\u0007","value":"[smb3decryptd]"},"pid":{"type":"\u0005","value":66},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"67","Fields":{"executable":{"type":"\u0007","value":"[cifsfileinfoput]"},"pid":{"type":"\u0005","value":67},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"68","Fields":{"executable":{"type":"\u0007","value":"[cifsoplockd]"},"pid":{"type":"\u0005","value":68},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"69","Fields":{"executable":{"type":"\u0007","value":"[xfsalloc]"},"pid":{"type":"\u0005","value":69},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"70","Fields":{"executable":{"type":"\u0007","value":"[xfs_mru_cache]"},"pid":{"type":"\u0005","value":70},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"72","Fields":{"executable":{"type":"\u0007","value":"[acpi_thermal_pm]"},"pid":{"type":"\u0005","value":72},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"74","Fields":{"executable":{"type":"\u0007","value":"[hwrng]"},"pid":{"type":"\u0005","value":74},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"75","Fields":{"executable":{"type":"\u0007","value":"[scsi_eh_0]"},"pid":{"type":"\u0005","value":75},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"76","Fields":{"executable":{"type":"\u0007","value":"[scsi_tmf_0]"},"pid":{"type":"\u0005","value":76},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"77","Fields":{"executable":{"type":"\u0007","value":"[scsi_eh_1]"},"pid":{"type":"\u0005","value":77},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"78","Fields":{"executable":{"type":"\u0007","value":"[scsi_tmf_1]"},"pid":{"type":"\u0005","value":78},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"81","Fields":{"executable":{"type":"\u0007","value":"[dm_bufio_cache]"},"pid":{"type":"\u0005","value":81},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"82","Fields":{"executable":{"type":"\u0007","value":"[kworker/1:1H-kblockd]"},"pid":{"type":"\u0005","value":82},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"83","Fields":{"executable":{"type":"\u0007","value":"[ipv6_addrconf]"},"pid":{"type":"\u0005","value":83},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"84","Fields":{"executable":{"type":"\u0007","value":"[ceph-msgr]"},"pid":{"type":"\u0005","value":84},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"9","Fields":{"executable":{"type":"\u0007","value":"[mm_percpu_wq]"},"pid":{"type":"\u0005","value":9},"state":{"type":"\u0007","value":""}}},{"Resource":"processes","ID":"","Fields":{"list":{"type":"\u0019\u001bprocess","value":[{"Name":"process","ID":"1"},{"Name":"process","ID":"2"},{"Name":"process","ID":"3"},{"Name":"process","ID":"4"},{"Name":"process","ID":"6"},{"Name":"process","ID":"9"},{"Name":"process","ID":"10"},{"Name":"process","ID":"11"},{"Name":"process","ID":"12"},{"Name":"process","ID":"13"},{"Name":"process","ID":"14"},{"Name":"process","ID":"15"},{"Name":"process","ID":"16"},{"Name":"process","ID":"17"},{"Name":"process","ID":"18"},{"Name":"process","ID":"20"},{"Name":"process","ID":"21"},{"Name":"process","ID":"22"},{"Name":"process","ID":"23"},{"Name":"process","ID":"24"},{"Name":"process","ID":"25"},{"Name":"process","ID":"26"},{"Name":"process","ID":"27"},{"Name":"process","ID":"41"},{"Name":"process","ID":"53"},{"Name":"process","ID":"54"},{"Name":"process","ID":"55"},{"Name":"process","ID":"56"},{"Name":"process","ID":"57"},{"Name":"process","ID":"58"},{"Name":"process","ID":"59"},{"Name":"process","ID":"60"},{"Name":"process","ID":"61"},{"Name":"process","ID":"63"},{"Name":"process","ID":"64"},{"Name":"process","ID":"65"},{"Name":"process","ID":"66"},{"Name":"process","ID":"67"},{"Name":"process","ID":"68"},{"Name":"process","ID":"69"},{"Name":"process","ID":"70"},{"Name":"process","ID":"72"},{"Name":"process","ID":"74"},{"Name":"process","ID":"75"},{"Name":"process","ID":"76"},{"Name":"process","ID":"77"},{"Name":"process","ID":"78"},{"Name":"process","ID":"81"},{"Name":"process","ID":"82"},{"Name":"process","ID":"83"},{"Name":"process","ID":"84"},{"Name":"process","ID":"221"},{"Name":"process","ID":"222"},{"Name":"process","ID":"224"},{"Name":"process","ID":"232"},{"Name":"process","ID":"292"},{"Name":"process","ID":"293"},{"Name":"process","ID":"341"},{"Name":"process","ID":"380"},{"Name":"process","ID":"386"},{"Name":"process","ID":"387"},{"Name":"process","ID":"393"},{"Name":"process","ID":"394"},{"Name":"process","ID":"434"},{"Name":"process","ID":"435"},{"Name":"process","ID":"436"},{"Name":"process","ID":"437"},{"Name":"process","ID":"438"},{"Name":"process","ID":"439"},{"Name":"process","ID":"440"},{"Name":"process","ID":"441"},{"Name":"process","ID":"1011"},{"Name":"process","ID":"1116"},{"Name":"process","ID":"1122"},{"Name":"process","ID":"3166"},{"Name":"process","ID":"3186"},{"Name":"process","ID":"3208"},{"Name":"process","ID":"3228"},{"Name":"process","ID":"3242"},{"Name":"process","ID":"3264"},{"Name":"process","ID":"3438"},{"Name":"process","ID":"3459"},{"Name":"process","ID":"3529"},{"Name":"process","ID":"3551"},{"Name":"process","ID":"16211"},{"Name":"process","ID":"16220"},{"Name":"process","ID":"16229"},{"Name":"process","ID":"16233"},{"Name":"process","ID":"16314"},{"Name":"process","ID":"16317"},{"Name":"process","ID":"55460"},{"Name":"process","ID":"102330"},{"Name":"process","ID":"104490"},{"Name":"process","ID":"104499"},{"Name":"process","ID":"104500"},{"Name":"process","ID":"105573"},{"Name":"process","ID":"107838"},{"Name":"process","ID":"116801"},{"Name":"process","ID":"116803"},{"Name":"process","ID":"116807"},{"Name":"process","ID":"116814"},{"Name":"process","ID":"116816"},{"Name":"process","ID":"116819"},{"Name":"process","ID":"116820"},{"Name":"process","ID":"116821"},{"Name":"process","ID":"116905"}]}}}]}]} \ No newline at end of file +{"assets":[{"asset":{"id":"Buildroot 2021.02.12","platformIDs":["//platformid.api.mondoo.app/hostname/minikube","//platformid.api.mondoo.app/runtime/ssh/hostkey/SHA256-9GHnVr3zGaRkwyvFET6LOu0zq3k3j89XH/Xwb6r/vlI"],"name":"buildroot","arch":"x86_64","title":"Buildroot 2021.02.12","family":["linux","unix","os"],"version":"2021.02.12","kind":"baremetal","labels":{"distro-id":"buildroot"}},"connections":[{"url":"ssh://192.168.39.137","provider":"go.mondoo.com/cnquery/providers/os","connector":"ssh","version":""}],"resources":[{"Resource":"file","ID":"/var/lib/kubelet/config.yaml","Fields":{"exists":{"type":"\u0004","value":false},"path":{"type":"\u0007","value":"/var/lib/kubelet/config.yaml"}}},{"Resource":"kubelet","ID":"","Fields":{"process":{"type":"\u001bprocess","value":{"Name":"process","ID":"107838"}}}},{"Resource":"process","ID":"1","Fields":{"executable":{"type":"\u0007","value":"/sbin/init"},"pid":{"type":"\u0005","value":1},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"10","Fields":{"executable":{"type":"\u0007","value":"[rcu_tasks_rude_]"},"pid":{"type":"\u0005","value":10},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1011","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/cri-dockerd"},"pid":{"type":"\u0005","value":1011},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"102330","Fields":{"executable":{"type":"\u0007","value":"[kworker/0:12-events_power_efficient]"},"pid":{"type":"\u0005","value":102330},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"104490","Fields":{"executable":{"type":"\u0007","value":"[kworker/u4:1-events_unbound]"},"pid":{"type":"\u0005","value":104490},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"104499","Fields":{"executable":{"type":"\u0007","value":"[kworker/1:0-cgroup_destroy]"},"pid":{"type":"\u0005","value":104499},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"104500","Fields":{"executable":{"type":"\u0007","value":"[kworker/1:1-mm_percpu_wq]"},"pid":{"type":"\u0005","value":104500},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"105573","Fields":{"executable":{"type":"\u0007","value":"[kworker/0:0-cgroup_pidlist_destroy]"},"pid":{"type":"\u0005","value":105573},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"107838","Fields":{"command":{"type":"\u0007","value":"/var/lib/minikube/binaries/v1.28.3/kubelet --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --container-runtime-endpoint=unix:///var/run/cri-dockerd.sock --hostname-override=minikube --kubeconfig=/etc/kubernetes/kubelet.conf --node-ip=192.168.39.137 --anonymous-auth=false --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_GCM_SHA256 --eviction-hard=memory.available\u003c750Mi,nodefs.available\u003c10%,nodefs.inodesFree\u003c5% --read-only-port=0"},"executable":{"type":"\u0007","value":"/var/lib/minikube/binaries/v1.28.3/kubelet"},"flags":{"type":"\u001a\u0007\u0007","value":{"anonymous-auth":"false","bootstrap-kubeconfig":"/etc/kubernetes/bootstrap-kubelet.conf","container-runtime-endpoint":"unix:///var/run/cri-dockerd.sock","eviction-hard":"memory.available\u003c750Mi,nodefs.available\u003c10%,nodefs.inodesFree\u003c5%","hostname-override":"minikube","kubeconfig":"/etc/kubernetes/kubelet.conf","node-ip":"192.168.39.137","read-only-port":"0","tls-cipher-suites":"TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_GCM_SHA256"}},"pid":{"type":"\u0005","value":107838},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"11","Fields":{"executable":{"type":"\u0007","value":"[rcu_tasks_trace]"},"pid":{"type":"\u0005","value":11},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1116","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/dockerd"},"pid":{"type":"\u0005","value":1116},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1122","Fields":{"executable":{"type":"\u0007","value":"containerd"},"pid":{"type":"\u0005","value":1122},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"116801","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":116801},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"116803","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":116803},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"116807","Fields":{"executable":{"type":"\u0007","value":"/usr/libexec/sftp-server"},"pid":{"type":"\u0005","value":116807},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"116814","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":116814},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"116816","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":116816},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"116819","Fields":{"executable":{"type":"\u0007","value":"/usr/libexec/sftp-server"},"pid":{"type":"\u0005","value":116819},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"116820","Fields":{"executable":{"type":"\u0007","value":"/usr/libexec/sftp-server"},"pid":{"type":"\u0005","value":116820},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"116821","Fields":{"executable":{"type":"\u0007","value":"/usr/libexec/sftp-server"},"pid":{"type":"\u0005","value":116821},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"116905","Fields":{"executable":{"type":"\u0007","value":"ps"},"pid":{"type":"\u0005","value":116905},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"12","Fields":{"executable":{"type":"\u0007","value":"[ksoftirqd/0]"},"pid":{"type":"\u0005","value":12},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"13","Fields":{"executable":{"type":"\u0007","value":"[rcu_sched]"},"pid":{"type":"\u0005","value":13},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"14","Fields":{"executable":{"type":"\u0007","value":"[migration/0]"},"pid":{"type":"\u0005","value":14},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"15","Fields":{"executable":{"type":"\u0007","value":"[cpuhp/0]"},"pid":{"type":"\u0005","value":15},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16","Fields":{"executable":{"type":"\u0007","value":"[cpuhp/1]"},"pid":{"type":"\u0005","value":16},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16211","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-timesyncd"},"pid":{"type":"\u0005","value":16211},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16220","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-udevd"},"pid":{"type":"\u0005","value":16220},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16229","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-journald"},"pid":{"type":"\u0005","value":16229},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16233","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-logind"},"pid":{"type":"\u0005","value":16233},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16314","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-networkd"},"pid":{"type":"\u0005","value":16314},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16317","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-resolved"},"pid":{"type":"\u0005","value":16317},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"17","Fields":{"executable":{"type":"\u0007","value":"[migration/1]"},"pid":{"type":"\u0005","value":17},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"18","Fields":{"executable":{"type":"\u0007","value":"[ksoftirqd/1]"},"pid":{"type":"\u0005","value":18},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"2","Fields":{"executable":{"type":"\u0007","value":"[kthreadd]"},"pid":{"type":"\u0005","value":2},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"20","Fields":{"executable":{"type":"\u0007","value":"[kworker/1:0H-events_highpri]"},"pid":{"type":"\u0005","value":20},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"21","Fields":{"executable":{"type":"\u0007","value":"[kdevtmpfs]"},"pid":{"type":"\u0005","value":21},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"22","Fields":{"executable":{"type":"\u0007","value":"[netns]"},"pid":{"type":"\u0005","value":22},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"221","Fields":{"executable":{"type":"\u0007","value":"/usr/sbin/acpid"},"pid":{"type":"\u0005","value":221},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"222","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/dbus-daemon"},"pid":{"type":"\u0005","value":222},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"224","Fields":{"executable":{"type":"\u0007","value":"/sbin/agetty"},"pid":{"type":"\u0005","value":224},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"23","Fields":{"executable":{"type":"\u0007","value":"[kauditd]"},"pid":{"type":"\u0005","value":23},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"232","Fields":{"executable":{"type":"\u0007","value":"/sbin/agetty"},"pid":{"type":"\u0005","value":232},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"24","Fields":{"executable":{"type":"\u0007","value":"[oom_reaper]"},"pid":{"type":"\u0005","value":24},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"25","Fields":{"executable":{"type":"\u0007","value":"[writeback]"},"pid":{"type":"\u0005","value":25},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"26","Fields":{"executable":{"type":"\u0007","value":"[kcompactd0]"},"pid":{"type":"\u0005","value":26},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"27","Fields":{"executable":{"type":"\u0007","value":"[khugepaged]"},"pid":{"type":"\u0005","value":27},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"292","Fields":{"executable":{"type":"\u0007","value":"[jbd2/vda1-8]"},"pid":{"type":"\u0005","value":292},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"293","Fields":{"executable":{"type":"\u0007","value":"[ext4-rsv-conver]"},"pid":{"type":"\u0005","value":293},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3","Fields":{"executable":{"type":"\u0007","value":"[rcu_gp]"},"pid":{"type":"\u0005","value":3},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3166","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3166},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3186","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":3186},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3208","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3208},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3228","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":3228},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3242","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3242},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3264","Fields":{"executable":{"type":"\u0007","value":"/usr/local/bin/kube-proxy"},"pid":{"type":"\u0005","value":3264},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"341","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":341},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3438","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3438},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3459","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":3459},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3529","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3529},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3551","Fields":{"executable":{"type":"\u0007","value":"/coredns"},"pid":{"type":"\u0005","value":3551},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"380","Fields":{"executable":{"type":"\u0007","value":"/usr/sbin/rpc.statd"},"pid":{"type":"\u0005","value":380},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"386","Fields":{"executable":{"type":"\u0007","value":"/usr/sbin/rpcbind"},"pid":{"type":"\u0005","value":386},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"387","Fields":{"executable":{"type":"\u0007","value":"/usr/sbin/rpc.mountd"},"pid":{"type":"\u0005","value":387},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"393","Fields":{"executable":{"type":"\u0007","value":"[kworker/u5:1-xprtiod]"},"pid":{"type":"\u0005","value":393},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"394","Fields":{"executable":{"type":"\u0007","value":"[lockd]"},"pid":{"type":"\u0005","value":394},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"4","Fields":{"executable":{"type":"\u0007","value":"[rcu_par_gp]"},"pid":{"type":"\u0005","value":4},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"41","Fields":{"executable":{"type":"\u0007","value":"[cryptd]"},"pid":{"type":"\u0005","value":41},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"434","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":434},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"435","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":435},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"436","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":436},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"437","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":437},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"438","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":438},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"439","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":439},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"440","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":440},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"441","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":441},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"53","Fields":{"executable":{"type":"\u0007","value":"[kblockd]"},"pid":{"type":"\u0005","value":53},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"54","Fields":{"executable":{"type":"\u0007","value":"[blkcg_punt_bio]"},"pid":{"type":"\u0005","value":54},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"55","Fields":{"executable":{"type":"\u0007","value":"[ata_sff]"},"pid":{"type":"\u0005","value":55},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"55460","Fields":{"executable":{"type":"\u0007","value":"[kworker/u4:0-events_unbound]"},"pid":{"type":"\u0005","value":55460},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"56","Fields":{"executable":{"type":"\u0007","value":"[md]"},"pid":{"type":"\u0005","value":56},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"57","Fields":{"executable":{"type":"\u0007","value":"[kworker/0:1H-kblockd]"},"pid":{"type":"\u0005","value":57},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"58","Fields":{"executable":{"type":"\u0007","value":"[rpciod]"},"pid":{"type":"\u0005","value":58},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"59","Fields":{"executable":{"type":"\u0007","value":"[kworker/u5:0-xprtiod]"},"pid":{"type":"\u0005","value":59},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"6","Fields":{"executable":{"type":"\u0007","value":"[kworker/0:0H-events_highpri]"},"pid":{"type":"\u0005","value":6},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"60","Fields":{"executable":{"type":"\u0007","value":"[xprtiod]"},"pid":{"type":"\u0005","value":60},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"61","Fields":{"executable":{"type":"\u0007","value":"[cfg80211]"},"pid":{"type":"\u0005","value":61},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"63","Fields":{"executable":{"type":"\u0007","value":"[kswapd0]"},"pid":{"type":"\u0005","value":63},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"64","Fields":{"executable":{"type":"\u0007","value":"[nfsiod]"},"pid":{"type":"\u0005","value":64},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"65","Fields":{"executable":{"type":"\u0007","value":"[cifsiod]"},"pid":{"type":"\u0005","value":65},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"66","Fields":{"executable":{"type":"\u0007","value":"[smb3decryptd]"},"pid":{"type":"\u0005","value":66},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"67","Fields":{"executable":{"type":"\u0007","value":"[cifsfileinfoput]"},"pid":{"type":"\u0005","value":67},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"68","Fields":{"executable":{"type":"\u0007","value":"[cifsoplockd]"},"pid":{"type":"\u0005","value":68},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"69","Fields":{"executable":{"type":"\u0007","value":"[xfsalloc]"},"pid":{"type":"\u0005","value":69},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"70","Fields":{"executable":{"type":"\u0007","value":"[xfs_mru_cache]"},"pid":{"type":"\u0005","value":70},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"72","Fields":{"executable":{"type":"\u0007","value":"[acpi_thermal_pm]"},"pid":{"type":"\u0005","value":72},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"74","Fields":{"executable":{"type":"\u0007","value":"[hwrng]"},"pid":{"type":"\u0005","value":74},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"75","Fields":{"executable":{"type":"\u0007","value":"[scsi_eh_0]"},"pid":{"type":"\u0005","value":75},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"76","Fields":{"executable":{"type":"\u0007","value":"[scsi_tmf_0]"},"pid":{"type":"\u0005","value":76},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"77","Fields":{"executable":{"type":"\u0007","value":"[scsi_eh_1]"},"pid":{"type":"\u0005","value":77},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"78","Fields":{"executable":{"type":"\u0007","value":"[scsi_tmf_1]"},"pid":{"type":"\u0005","value":78},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"81","Fields":{"executable":{"type":"\u0007","value":"[dm_bufio_cache]"},"pid":{"type":"\u0005","value":81},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"82","Fields":{"executable":{"type":"\u0007","value":"[kworker/1:1H-kblockd]"},"pid":{"type":"\u0005","value":82},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"83","Fields":{"executable":{"type":"\u0007","value":"[ipv6_addrconf]"},"pid":{"type":"\u0005","value":83},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"84","Fields":{"executable":{"type":"\u0007","value":"[ceph-msgr]"},"pid":{"type":"\u0005","value":84},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"9","Fields":{"executable":{"type":"\u0007","value":"[mm_percpu_wq]"},"pid":{"type":"\u0005","value":9},"state":{"type":"\u0007","value":""}}},{"Resource":"processes","ID":"","Fields":{"list":{"type":"\u0019\u001bprocess","value":[{"Name":"process","ID":"1"},{"Name":"process","ID":"2"},{"Name":"process","ID":"3"},{"Name":"process","ID":"4"},{"Name":"process","ID":"6"},{"Name":"process","ID":"9"},{"Name":"process","ID":"10"},{"Name":"process","ID":"11"},{"Name":"process","ID":"12"},{"Name":"process","ID":"13"},{"Name":"process","ID":"14"},{"Name":"process","ID":"15"},{"Name":"process","ID":"16"},{"Name":"process","ID":"17"},{"Name":"process","ID":"18"},{"Name":"process","ID":"20"},{"Name":"process","ID":"21"},{"Name":"process","ID":"22"},{"Name":"process","ID":"23"},{"Name":"process","ID":"24"},{"Name":"process","ID":"25"},{"Name":"process","ID":"26"},{"Name":"process","ID":"27"},{"Name":"process","ID":"41"},{"Name":"process","ID":"53"},{"Name":"process","ID":"54"},{"Name":"process","ID":"55"},{"Name":"process","ID":"56"},{"Name":"process","ID":"57"},{"Name":"process","ID":"58"},{"Name":"process","ID":"59"},{"Name":"process","ID":"60"},{"Name":"process","ID":"61"},{"Name":"process","ID":"63"},{"Name":"process","ID":"64"},{"Name":"process","ID":"65"},{"Name":"process","ID":"66"},{"Name":"process","ID":"67"},{"Name":"process","ID":"68"},{"Name":"process","ID":"69"},{"Name":"process","ID":"70"},{"Name":"process","ID":"72"},{"Name":"process","ID":"74"},{"Name":"process","ID":"75"},{"Name":"process","ID":"76"},{"Name":"process","ID":"77"},{"Name":"process","ID":"78"},{"Name":"process","ID":"81"},{"Name":"process","ID":"82"},{"Name":"process","ID":"83"},{"Name":"process","ID":"84"},{"Name":"process","ID":"221"},{"Name":"process","ID":"222"},{"Name":"process","ID":"224"},{"Name":"process","ID":"232"},{"Name":"process","ID":"292"},{"Name":"process","ID":"293"},{"Name":"process","ID":"341"},{"Name":"process","ID":"380"},{"Name":"process","ID":"386"},{"Name":"process","ID":"387"},{"Name":"process","ID":"393"},{"Name":"process","ID":"394"},{"Name":"process","ID":"434"},{"Name":"process","ID":"435"},{"Name":"process","ID":"436"},{"Name":"process","ID":"437"},{"Name":"process","ID":"438"},{"Name":"process","ID":"439"},{"Name":"process","ID":"440"},{"Name":"process","ID":"441"},{"Name":"process","ID":"1011"},{"Name":"process","ID":"1116"},{"Name":"process","ID":"1122"},{"Name":"process","ID":"3166"},{"Name":"process","ID":"3186"},{"Name":"process","ID":"3208"},{"Name":"process","ID":"3228"},{"Name":"process","ID":"3242"},{"Name":"process","ID":"3264"},{"Name":"process","ID":"3438"},{"Name":"process","ID":"3459"},{"Name":"process","ID":"3529"},{"Name":"process","ID":"3551"},{"Name":"process","ID":"16211"},{"Name":"process","ID":"16220"},{"Name":"process","ID":"16229"},{"Name":"process","ID":"16233"},{"Name":"process","ID":"16314"},{"Name":"process","ID":"16317"},{"Name":"process","ID":"55460"},{"Name":"process","ID":"102330"},{"Name":"process","ID":"104490"},{"Name":"process","ID":"104499"},{"Name":"process","ID":"104500"},{"Name":"process","ID":"105573"},{"Name":"process","ID":"107838"},{"Name":"process","ID":"116801"},{"Name":"process","ID":"116803"},{"Name":"process","ID":"116807"},{"Name":"process","ID":"116814"},{"Name":"process","ID":"116816"},{"Name":"process","ID":"116819"},{"Name":"process","ID":"116820"},{"Name":"process","ID":"116821"},{"Name":"process","ID":"116905"}]}}}]}]} \ No newline at end of file diff --git a/providers-sdk/v1/testutils/testdata/kubelet-eks.json b/providers-sdk/v1/testutils/testdata/kubelet-eks.json index bb85e53505..ecf401bb43 100644 --- a/providers-sdk/v1/testutils/testdata/kubelet-eks.json +++ b/providers-sdk/v1/testutils/testdata/kubelet-eks.json @@ -1 +1 @@ -{"assets":[{"asset":{"id":"Buildroot 2021.02.12","platformIDs":["//platformid.api.mondoo.app/hostname/minikube","//platformid.api.mondoo.app/runtime/ssh/hostkey/SHA256-9GHnVr3zGaRkwyvFET6LOu0zq3k3j89XH/Xwb6r/vlI"],"name":"buildroot","arch":"x86_64","title":"Buildroot 2021.02.12","family":["linux","unix","os"],"version":"2021.02.12","kind":"baremetal","labels":{"distro-id":"buildroot"}},"connections":[{"url":"ssh://192.168.39.137","provider":"go.mondoo.com/cnquery/v10/providers/os","connector":"ssh","version":""}],"resources":[{"Resource":"file","ID":"/etc/kubernetes/kubelet/kubelet-config.json","Fields":{"basename":{"type":"\u0007","value":"kubelet-config.json"},"content":{"type":"\u0007","value":"{\n \"kind\": \"KubeletConfiguration\",\n \"apiVersion\": \"kubelet.config.k8s.io/v1beta1\",\n \"address\": \"0.0.0.0\",\n \"authentication\": {\n \"anonymous\": {\n \"enabled\": false\n },\n \"webhook\": {\n \"cacheTTL\": \"2m0s\",\n \"enabled\": true\n },\n \"x509\": {\n \"clientCAFile\": \"/var/lib/minikube/certs/ca.crt\"\n }\n },\n \"authorization\": {\n \"mode\": \"Webhook\",\n \"webhook\": {\n \"cacheAuthorizedTTL\": \"5m0s\",\n \"cacheUnauthorizedTTL\": \"30s\"\n }\n },\n \"clusterDomain\": \"cluster.local\",\n \"hairpinMode\": \"hairpin-veth\",\n \"readOnlyPort\": 0,\n \"cgroupDriver\": \"cgroupfs\",\n \"cgroupRoot\": \"/\",\n \"featureGates\": {\n \"RotateKubeletServerCertificate\": true\n },\n \"protectKernelDefaults\": true,\n \"serializeImagePulls\": false,\n \"serverTLSBootstrap\": true,\n \"tlsCipherSuites\": [\"TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256\", \"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256\", \"TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305\", \"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384\", \"TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305\", \"TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384\", \"TLS_RSA_WITH_AES_256_GCM_SHA384\", \"TLS_RSA_WITH_AES_128_GCM_SHA256\"]\n}\n"},"dirname":{"type":"\u0007","value":"/etc/kubernetes/kubelet"},"empty":{"type":"\u0004","value":false},"exists":{"type":"\u0004","value":true},"group":{"type":"\u001bgroup","value":{"Name":"group","ID":"group/0/root"}},"path":{"type":"\u0007","value":"/etc/kubernetes/kubelet/kubelet-config.json"},"permissions":{"type":"\u001bfile.permissions","value":{"Name":"file.permissions","ID":"-rw-r--r--"}},"size":{"type":"\u0005","value":1124},"user":{"type":"\u001buser","value":{"Name":"user","ID":"user/0/root"}}}},{"Resource":"file.permissions","ID":"-rw-r--r--","Fields":{"string":{"type":"\u0007","value":"-rw-r--r--"}}},{"Resource":"group","ID":"group/0/root","Fields":{"gid":{"type":"\u0005","value":0},"name":{"type":"\u0007","value":"root"}}},{"Resource":"kubelet","ID":"","Fields":{"configFile":{"type":"\u001bfile","value":{"Name":"file","ID":"/etc/kubernetes/kubelet/kubelet-config.json"}},"process":{"type":"\u001bprocess","value":{"Name":"process","ID":"153347"}}}},{"Resource":"process","ID":"1","Fields":{"executable":{"type":"\u0007","value":"/sbin/init"},"pid":{"type":"\u0005","value":1},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"10","Fields":{"executable":{"type":"\u0007","value":"[rcu_tasks_rude_]"},"pid":{"type":"\u0005","value":10},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1011","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/cri-dockerd"},"pid":{"type":"\u0005","value":1011},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"102330","Fields":{"executable":{"type":"\u0007","value":"[kworker/0:12-events_power_efficient]"},"pid":{"type":"\u0005","value":102330},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"104490","Fields":{"executable":{"type":"\u0007","value":"[kworker/u4:1-events_unbound]"},"pid":{"type":"\u0005","value":104490},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"104500","Fields":{"executable":{"type":"\u0007","value":"[kworker/1:1-events_power_efficient]"},"pid":{"type":"\u0005","value":104500},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"11","Fields":{"executable":{"type":"\u0007","value":"[rcu_tasks_trace]"},"pid":{"type":"\u0005","value":11},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1116","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/dockerd"},"pid":{"type":"\u0005","value":1116},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1122","Fields":{"executable":{"type":"\u0007","value":"containerd"},"pid":{"type":"\u0005","value":1122},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"12","Fields":{"executable":{"type":"\u0007","value":"[ksoftirqd/0]"},"pid":{"type":"\u0005","value":12},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"13","Fields":{"executable":{"type":"\u0007","value":"[rcu_sched]"},"pid":{"type":"\u0005","value":13},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"14","Fields":{"executable":{"type":"\u0007","value":"[migration/0]"},"pid":{"type":"\u0005","value":14},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"15","Fields":{"executable":{"type":"\u0007","value":"[cpuhp/0]"},"pid":{"type":"\u0005","value":15},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"151749","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":151749},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"151751","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":151751},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"151756","Fields":{"executable":{"type":"\u0007","value":"-bash"},"pid":{"type":"\u0005","value":151756},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"152409","Fields":{"executable":{"type":"\u0007","value":"[kworker/1:3-cgroup_destroy]"},"pid":{"type":"\u0005","value":152409},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"152412","Fields":{"executable":{"type":"\u0007","value":"[kworker/0:1-cgroup_destroy]"},"pid":{"type":"\u0005","value":152412},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"153347","Fields":{"command":{"type":"\u0007","value":"/var/lib/minikube/binaries/v1.28.3/kubelet --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --config /etc/kubernetes/kubelet/kubelet-config.json --container-runtime-endpoint=unix:///var/run/cri-dockerd.sock --hostname-override=minikube --kubeconfig=/etc/kubernetes/kubelet.conf --node-ip=192.168.39.137 --runtime-request-timeout=7m"},"executable":{"type":"\u0007","value":"/var/lib/minikube/binaries/v1.28.3/kubelet"},"flags":{"type":"\u001a\u0007\u0007","value":{"bootstrap-kubeconfig":"/etc/kubernetes/bootstrap-kubelet.conf","config":"/etc/kubernetes/kubelet/kubelet-config.json","container-runtime-endpoint":"unix:///var/run/cri-dockerd.sock","hostname-override":"minikube","kubeconfig":"/etc/kubernetes/kubelet.conf","node-ip":"192.168.39.137","runtime-request-timeout":"7m"}},"pid":{"type":"\u0005","value":153347},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16","Fields":{"executable":{"type":"\u0007","value":"[cpuhp/1]"},"pid":{"type":"\u0005","value":16},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16211","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-timesyncd"},"pid":{"type":"\u0005","value":16211},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16220","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-udevd"},"pid":{"type":"\u0005","value":16220},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16229","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-journald"},"pid":{"type":"\u0005","value":16229},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16233","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-logind"},"pid":{"type":"\u0005","value":16233},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"162687","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":162687},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"162689","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":162689},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"162693","Fields":{"executable":{"type":"\u0007","value":"/usr/libexec/sftp-server"},"pid":{"type":"\u0005","value":162693},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"162700","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":162700},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"162702","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":162702},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"162705","Fields":{"executable":{"type":"\u0007","value":"/usr/libexec/sftp-server"},"pid":{"type":"\u0005","value":162705},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"162706","Fields":{"executable":{"type":"\u0007","value":"/usr/libexec/sftp-server"},"pid":{"type":"\u0005","value":162706},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"162707","Fields":{"executable":{"type":"\u0007","value":"/usr/libexec/sftp-server"},"pid":{"type":"\u0005","value":162707},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"162723","Fields":{"executable":{"type":"\u0007","value":"ps"},"pid":{"type":"\u0005","value":162723},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16314","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-networkd"},"pid":{"type":"\u0005","value":16314},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16317","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-resolved"},"pid":{"type":"\u0005","value":16317},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"17","Fields":{"executable":{"type":"\u0007","value":"[migration/1]"},"pid":{"type":"\u0005","value":17},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"18","Fields":{"executable":{"type":"\u0007","value":"[ksoftirqd/1]"},"pid":{"type":"\u0005","value":18},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"2","Fields":{"executable":{"type":"\u0007","value":"[kthreadd]"},"pid":{"type":"\u0005","value":2},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"20","Fields":{"executable":{"type":"\u0007","value":"[kworker/1:0H-events_highpri]"},"pid":{"type":"\u0005","value":20},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"21","Fields":{"executable":{"type":"\u0007","value":"[kdevtmpfs]"},"pid":{"type":"\u0005","value":21},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"22","Fields":{"executable":{"type":"\u0007","value":"[netns]"},"pid":{"type":"\u0005","value":22},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"221","Fields":{"executable":{"type":"\u0007","value":"/usr/sbin/acpid"},"pid":{"type":"\u0005","value":221},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"222","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/dbus-daemon"},"pid":{"type":"\u0005","value":222},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"224","Fields":{"executable":{"type":"\u0007","value":"/sbin/agetty"},"pid":{"type":"\u0005","value":224},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"23","Fields":{"executable":{"type":"\u0007","value":"[kauditd]"},"pid":{"type":"\u0005","value":23},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"232","Fields":{"executable":{"type":"\u0007","value":"/sbin/agetty"},"pid":{"type":"\u0005","value":232},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"24","Fields":{"executable":{"type":"\u0007","value":"[oom_reaper]"},"pid":{"type":"\u0005","value":24},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"25","Fields":{"executable":{"type":"\u0007","value":"[writeback]"},"pid":{"type":"\u0005","value":25},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"26","Fields":{"executable":{"type":"\u0007","value":"[kcompactd0]"},"pid":{"type":"\u0005","value":26},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"27","Fields":{"executable":{"type":"\u0007","value":"[khugepaged]"},"pid":{"type":"\u0005","value":27},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"292","Fields":{"executable":{"type":"\u0007","value":"[jbd2/vda1-8]"},"pid":{"type":"\u0005","value":292},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"293","Fields":{"executable":{"type":"\u0007","value":"[ext4-rsv-conver]"},"pid":{"type":"\u0005","value":293},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3","Fields":{"executable":{"type":"\u0007","value":"[rcu_gp]"},"pid":{"type":"\u0005","value":3},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3166","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3166},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3186","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":3186},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3208","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3208},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3228","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":3228},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3242","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3242},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3264","Fields":{"executable":{"type":"\u0007","value":"/usr/local/bin/kube-proxy"},"pid":{"type":"\u0005","value":3264},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"341","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":341},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3438","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3438},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3459","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":3459},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3529","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3529},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3551","Fields":{"executable":{"type":"\u0007","value":"/coredns"},"pid":{"type":"\u0005","value":3551},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"380","Fields":{"executable":{"type":"\u0007","value":"/usr/sbin/rpc.statd"},"pid":{"type":"\u0005","value":380},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"386","Fields":{"executable":{"type":"\u0007","value":"/usr/sbin/rpcbind"},"pid":{"type":"\u0005","value":386},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"387","Fields":{"executable":{"type":"\u0007","value":"/usr/sbin/rpc.mountd"},"pid":{"type":"\u0005","value":387},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"393","Fields":{"executable":{"type":"\u0007","value":"[kworker/u5:1-xprtiod]"},"pid":{"type":"\u0005","value":393},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"394","Fields":{"executable":{"type":"\u0007","value":"[lockd]"},"pid":{"type":"\u0005","value":394},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"4","Fields":{"executable":{"type":"\u0007","value":"[rcu_par_gp]"},"pid":{"type":"\u0005","value":4},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"41","Fields":{"executable":{"type":"\u0007","value":"[cryptd]"},"pid":{"type":"\u0005","value":41},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"434","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":434},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"435","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":435},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"436","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":436},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"437","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":437},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"438","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":438},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"439","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":439},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"440","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":440},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"441","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":441},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"53","Fields":{"executable":{"type":"\u0007","value":"[kblockd]"},"pid":{"type":"\u0005","value":53},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"54","Fields":{"executable":{"type":"\u0007","value":"[blkcg_punt_bio]"},"pid":{"type":"\u0005","value":54},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"55","Fields":{"executable":{"type":"\u0007","value":"[ata_sff]"},"pid":{"type":"\u0005","value":55},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"55460","Fields":{"executable":{"type":"\u0007","value":"[kworker/u4:0-events_unbound]"},"pid":{"type":"\u0005","value":55460},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"56","Fields":{"executable":{"type":"\u0007","value":"[md]"},"pid":{"type":"\u0005","value":56},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"57","Fields":{"executable":{"type":"\u0007","value":"[kworker/0:1H-kblockd]"},"pid":{"type":"\u0005","value":57},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"58","Fields":{"executable":{"type":"\u0007","value":"[rpciod]"},"pid":{"type":"\u0005","value":58},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"59","Fields":{"executable":{"type":"\u0007","value":"[kworker/u5:0-xprtiod]"},"pid":{"type":"\u0005","value":59},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"6","Fields":{"executable":{"type":"\u0007","value":"[kworker/0:0H-events_highpri]"},"pid":{"type":"\u0005","value":6},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"60","Fields":{"executable":{"type":"\u0007","value":"[xprtiod]"},"pid":{"type":"\u0005","value":60},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"61","Fields":{"executable":{"type":"\u0007","value":"[cfg80211]"},"pid":{"type":"\u0005","value":61},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"63","Fields":{"executable":{"type":"\u0007","value":"[kswapd0]"},"pid":{"type":"\u0005","value":63},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"64","Fields":{"executable":{"type":"\u0007","value":"[nfsiod]"},"pid":{"type":"\u0005","value":64},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"65","Fields":{"executable":{"type":"\u0007","value":"[cifsiod]"},"pid":{"type":"\u0005","value":65},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"66","Fields":{"executable":{"type":"\u0007","value":"[smb3decryptd]"},"pid":{"type":"\u0005","value":66},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"67","Fields":{"executable":{"type":"\u0007","value":"[cifsfileinfoput]"},"pid":{"type":"\u0005","value":67},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"68","Fields":{"executable":{"type":"\u0007","value":"[cifsoplockd]"},"pid":{"type":"\u0005","value":68},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"69","Fields":{"executable":{"type":"\u0007","value":"[xfsalloc]"},"pid":{"type":"\u0005","value":69},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"70","Fields":{"executable":{"type":"\u0007","value":"[xfs_mru_cache]"},"pid":{"type":"\u0005","value":70},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"72","Fields":{"executable":{"type":"\u0007","value":"[acpi_thermal_pm]"},"pid":{"type":"\u0005","value":72},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"74","Fields":{"executable":{"type":"\u0007","value":"[hwrng]"},"pid":{"type":"\u0005","value":74},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"75","Fields":{"executable":{"type":"\u0007","value":"[scsi_eh_0]"},"pid":{"type":"\u0005","value":75},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"76","Fields":{"executable":{"type":"\u0007","value":"[scsi_tmf_0]"},"pid":{"type":"\u0005","value":76},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"77","Fields":{"executable":{"type":"\u0007","value":"[scsi_eh_1]"},"pid":{"type":"\u0005","value":77},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"78","Fields":{"executable":{"type":"\u0007","value":"[scsi_tmf_1]"},"pid":{"type":"\u0005","value":78},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"81","Fields":{"executable":{"type":"\u0007","value":"[dm_bufio_cache]"},"pid":{"type":"\u0005","value":81},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"82","Fields":{"executable":{"type":"\u0007","value":"[kworker/1:1H-kblockd]"},"pid":{"type":"\u0005","value":82},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"83","Fields":{"executable":{"type":"\u0007","value":"[ipv6_addrconf]"},"pid":{"type":"\u0005","value":83},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"84","Fields":{"executable":{"type":"\u0007","value":"[ceph-msgr]"},"pid":{"type":"\u0005","value":84},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"9","Fields":{"executable":{"type":"\u0007","value":"[mm_percpu_wq]"},"pid":{"type":"\u0005","value":9},"state":{"type":"\u0007","value":""}}},{"Resource":"processes","ID":"","Fields":{"list":{"type":"\u0019\u001bprocess","value":[{"Name":"process","ID":"1"},{"Name":"process","ID":"2"},{"Name":"process","ID":"3"},{"Name":"process","ID":"4"},{"Name":"process","ID":"6"},{"Name":"process","ID":"9"},{"Name":"process","ID":"10"},{"Name":"process","ID":"11"},{"Name":"process","ID":"12"},{"Name":"process","ID":"13"},{"Name":"process","ID":"14"},{"Name":"process","ID":"15"},{"Name":"process","ID":"16"},{"Name":"process","ID":"17"},{"Name":"process","ID":"18"},{"Name":"process","ID":"20"},{"Name":"process","ID":"21"},{"Name":"process","ID":"22"},{"Name":"process","ID":"23"},{"Name":"process","ID":"24"},{"Name":"process","ID":"25"},{"Name":"process","ID":"26"},{"Name":"process","ID":"27"},{"Name":"process","ID":"41"},{"Name":"process","ID":"53"},{"Name":"process","ID":"54"},{"Name":"process","ID":"55"},{"Name":"process","ID":"56"},{"Name":"process","ID":"57"},{"Name":"process","ID":"58"},{"Name":"process","ID":"59"},{"Name":"process","ID":"60"},{"Name":"process","ID":"61"},{"Name":"process","ID":"63"},{"Name":"process","ID":"64"},{"Name":"process","ID":"65"},{"Name":"process","ID":"66"},{"Name":"process","ID":"67"},{"Name":"process","ID":"68"},{"Name":"process","ID":"69"},{"Name":"process","ID":"70"},{"Name":"process","ID":"72"},{"Name":"process","ID":"74"},{"Name":"process","ID":"75"},{"Name":"process","ID":"76"},{"Name":"process","ID":"77"},{"Name":"process","ID":"78"},{"Name":"process","ID":"81"},{"Name":"process","ID":"82"},{"Name":"process","ID":"83"},{"Name":"process","ID":"84"},{"Name":"process","ID":"221"},{"Name":"process","ID":"222"},{"Name":"process","ID":"224"},{"Name":"process","ID":"232"},{"Name":"process","ID":"292"},{"Name":"process","ID":"293"},{"Name":"process","ID":"341"},{"Name":"process","ID":"380"},{"Name":"process","ID":"386"},{"Name":"process","ID":"387"},{"Name":"process","ID":"393"},{"Name":"process","ID":"394"},{"Name":"process","ID":"434"},{"Name":"process","ID":"435"},{"Name":"process","ID":"436"},{"Name":"process","ID":"437"},{"Name":"process","ID":"438"},{"Name":"process","ID":"439"},{"Name":"process","ID":"440"},{"Name":"process","ID":"441"},{"Name":"process","ID":"1011"},{"Name":"process","ID":"1116"},{"Name":"process","ID":"1122"},{"Name":"process","ID":"3166"},{"Name":"process","ID":"3186"},{"Name":"process","ID":"3208"},{"Name":"process","ID":"3228"},{"Name":"process","ID":"3242"},{"Name":"process","ID":"3264"},{"Name":"process","ID":"3438"},{"Name":"process","ID":"3459"},{"Name":"process","ID":"3529"},{"Name":"process","ID":"3551"},{"Name":"process","ID":"16211"},{"Name":"process","ID":"16220"},{"Name":"process","ID":"16229"},{"Name":"process","ID":"16233"},{"Name":"process","ID":"16314"},{"Name":"process","ID":"16317"},{"Name":"process","ID":"55460"},{"Name":"process","ID":"102330"},{"Name":"process","ID":"104490"},{"Name":"process","ID":"104500"},{"Name":"process","ID":"151749"},{"Name":"process","ID":"151751"},{"Name":"process","ID":"151756"},{"Name":"process","ID":"152409"},{"Name":"process","ID":"152412"},{"Name":"process","ID":"153347"},{"Name":"process","ID":"162687"},{"Name":"process","ID":"162689"},{"Name":"process","ID":"162693"},{"Name":"process","ID":"162700"},{"Name":"process","ID":"162702"},{"Name":"process","ID":"162705"},{"Name":"process","ID":"162706"},{"Name":"process","ID":"162707"},{"Name":"process","ID":"162723"}]}}},{"Resource":"user","ID":"user/0/root","Fields":{"gid":{"type":"\u0005","value":0},"name":{"type":"\u0007","value":"root"},"uid":{"type":"\u0005","value":0}}}]}]} \ No newline at end of file +{"assets":[{"asset":{"id":"Buildroot 2021.02.12","platformIDs":["//platformid.api.mondoo.app/hostname/minikube","//platformid.api.mondoo.app/runtime/ssh/hostkey/SHA256-9GHnVr3zGaRkwyvFET6LOu0zq3k3j89XH/Xwb6r/vlI"],"name":"buildroot","arch":"x86_64","title":"Buildroot 2021.02.12","family":["linux","unix","os"],"version":"2021.02.12","kind":"baremetal","labels":{"distro-id":"buildroot"}},"connections":[{"url":"ssh://192.168.39.137","provider":"go.mondoo.com/cnquery/providers/os","connector":"ssh","version":""}],"resources":[{"Resource":"file","ID":"/etc/kubernetes/kubelet/kubelet-config.json","Fields":{"basename":{"type":"\u0007","value":"kubelet-config.json"},"content":{"type":"\u0007","value":"{\n \"kind\": \"KubeletConfiguration\",\n \"apiVersion\": \"kubelet.config.k8s.io/v1beta1\",\n \"address\": \"0.0.0.0\",\n \"authentication\": {\n \"anonymous\": {\n \"enabled\": false\n },\n \"webhook\": {\n \"cacheTTL\": \"2m0s\",\n \"enabled\": true\n },\n \"x509\": {\n \"clientCAFile\": \"/var/lib/minikube/certs/ca.crt\"\n }\n },\n \"authorization\": {\n \"mode\": \"Webhook\",\n \"webhook\": {\n \"cacheAuthorizedTTL\": \"5m0s\",\n \"cacheUnauthorizedTTL\": \"30s\"\n }\n },\n \"clusterDomain\": \"cluster.local\",\n \"hairpinMode\": \"hairpin-veth\",\n \"readOnlyPort\": 0,\n \"cgroupDriver\": \"cgroupfs\",\n \"cgroupRoot\": \"/\",\n \"featureGates\": {\n \"RotateKubeletServerCertificate\": true\n },\n \"protectKernelDefaults\": true,\n \"serializeImagePulls\": false,\n \"serverTLSBootstrap\": true,\n \"tlsCipherSuites\": [\"TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256\", \"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256\", \"TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305\", \"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384\", \"TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305\", \"TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384\", \"TLS_RSA_WITH_AES_256_GCM_SHA384\", \"TLS_RSA_WITH_AES_128_GCM_SHA256\"]\n}\n"},"dirname":{"type":"\u0007","value":"/etc/kubernetes/kubelet"},"empty":{"type":"\u0004","value":false},"exists":{"type":"\u0004","value":true},"group":{"type":"\u001bgroup","value":{"Name":"group","ID":"group/0/root"}},"path":{"type":"\u0007","value":"/etc/kubernetes/kubelet/kubelet-config.json"},"permissions":{"type":"\u001bfile.permissions","value":{"Name":"file.permissions","ID":"-rw-r--r--"}},"size":{"type":"\u0005","value":1124},"user":{"type":"\u001buser","value":{"Name":"user","ID":"user/0/root"}}}},{"Resource":"file.permissions","ID":"-rw-r--r--","Fields":{"string":{"type":"\u0007","value":"-rw-r--r--"}}},{"Resource":"group","ID":"group/0/root","Fields":{"gid":{"type":"\u0005","value":0},"name":{"type":"\u0007","value":"root"}}},{"Resource":"kubelet","ID":"","Fields":{"configFile":{"type":"\u001bfile","value":{"Name":"file","ID":"/etc/kubernetes/kubelet/kubelet-config.json"}},"process":{"type":"\u001bprocess","value":{"Name":"process","ID":"153347"}}}},{"Resource":"process","ID":"1","Fields":{"executable":{"type":"\u0007","value":"/sbin/init"},"pid":{"type":"\u0005","value":1},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"10","Fields":{"executable":{"type":"\u0007","value":"[rcu_tasks_rude_]"},"pid":{"type":"\u0005","value":10},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1011","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/cri-dockerd"},"pid":{"type":"\u0005","value":1011},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"102330","Fields":{"executable":{"type":"\u0007","value":"[kworker/0:12-events_power_efficient]"},"pid":{"type":"\u0005","value":102330},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"104490","Fields":{"executable":{"type":"\u0007","value":"[kworker/u4:1-events_unbound]"},"pid":{"type":"\u0005","value":104490},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"104500","Fields":{"executable":{"type":"\u0007","value":"[kworker/1:1-events_power_efficient]"},"pid":{"type":"\u0005","value":104500},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"11","Fields":{"executable":{"type":"\u0007","value":"[rcu_tasks_trace]"},"pid":{"type":"\u0005","value":11},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1116","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/dockerd"},"pid":{"type":"\u0005","value":1116},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1122","Fields":{"executable":{"type":"\u0007","value":"containerd"},"pid":{"type":"\u0005","value":1122},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"12","Fields":{"executable":{"type":"\u0007","value":"[ksoftirqd/0]"},"pid":{"type":"\u0005","value":12},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"13","Fields":{"executable":{"type":"\u0007","value":"[rcu_sched]"},"pid":{"type":"\u0005","value":13},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"14","Fields":{"executable":{"type":"\u0007","value":"[migration/0]"},"pid":{"type":"\u0005","value":14},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"15","Fields":{"executable":{"type":"\u0007","value":"[cpuhp/0]"},"pid":{"type":"\u0005","value":15},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"151749","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":151749},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"151751","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":151751},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"151756","Fields":{"executable":{"type":"\u0007","value":"-bash"},"pid":{"type":"\u0005","value":151756},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"152409","Fields":{"executable":{"type":"\u0007","value":"[kworker/1:3-cgroup_destroy]"},"pid":{"type":"\u0005","value":152409},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"152412","Fields":{"executable":{"type":"\u0007","value":"[kworker/0:1-cgroup_destroy]"},"pid":{"type":"\u0005","value":152412},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"153347","Fields":{"command":{"type":"\u0007","value":"/var/lib/minikube/binaries/v1.28.3/kubelet --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --config /etc/kubernetes/kubelet/kubelet-config.json --container-runtime-endpoint=unix:///var/run/cri-dockerd.sock --hostname-override=minikube --kubeconfig=/etc/kubernetes/kubelet.conf --node-ip=192.168.39.137 --runtime-request-timeout=7m"},"executable":{"type":"\u0007","value":"/var/lib/minikube/binaries/v1.28.3/kubelet"},"flags":{"type":"\u001a\u0007\u0007","value":{"bootstrap-kubeconfig":"/etc/kubernetes/bootstrap-kubelet.conf","config":"/etc/kubernetes/kubelet/kubelet-config.json","container-runtime-endpoint":"unix:///var/run/cri-dockerd.sock","hostname-override":"minikube","kubeconfig":"/etc/kubernetes/kubelet.conf","node-ip":"192.168.39.137","runtime-request-timeout":"7m"}},"pid":{"type":"\u0005","value":153347},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16","Fields":{"executable":{"type":"\u0007","value":"[cpuhp/1]"},"pid":{"type":"\u0005","value":16},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16211","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-timesyncd"},"pid":{"type":"\u0005","value":16211},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16220","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-udevd"},"pid":{"type":"\u0005","value":16220},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16229","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-journald"},"pid":{"type":"\u0005","value":16229},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16233","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-logind"},"pid":{"type":"\u0005","value":16233},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"162687","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":162687},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"162689","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":162689},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"162693","Fields":{"executable":{"type":"\u0007","value":"/usr/libexec/sftp-server"},"pid":{"type":"\u0005","value":162693},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"162700","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":162700},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"162702","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":162702},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"162705","Fields":{"executable":{"type":"\u0007","value":"/usr/libexec/sftp-server"},"pid":{"type":"\u0005","value":162705},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"162706","Fields":{"executable":{"type":"\u0007","value":"/usr/libexec/sftp-server"},"pid":{"type":"\u0005","value":162706},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"162707","Fields":{"executable":{"type":"\u0007","value":"/usr/libexec/sftp-server"},"pid":{"type":"\u0005","value":162707},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"162723","Fields":{"executable":{"type":"\u0007","value":"ps"},"pid":{"type":"\u0005","value":162723},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16314","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-networkd"},"pid":{"type":"\u0005","value":16314},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16317","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-resolved"},"pid":{"type":"\u0005","value":16317},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"17","Fields":{"executable":{"type":"\u0007","value":"[migration/1]"},"pid":{"type":"\u0005","value":17},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"18","Fields":{"executable":{"type":"\u0007","value":"[ksoftirqd/1]"},"pid":{"type":"\u0005","value":18},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"2","Fields":{"executable":{"type":"\u0007","value":"[kthreadd]"},"pid":{"type":"\u0005","value":2},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"20","Fields":{"executable":{"type":"\u0007","value":"[kworker/1:0H-events_highpri]"},"pid":{"type":"\u0005","value":20},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"21","Fields":{"executable":{"type":"\u0007","value":"[kdevtmpfs]"},"pid":{"type":"\u0005","value":21},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"22","Fields":{"executable":{"type":"\u0007","value":"[netns]"},"pid":{"type":"\u0005","value":22},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"221","Fields":{"executable":{"type":"\u0007","value":"/usr/sbin/acpid"},"pid":{"type":"\u0005","value":221},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"222","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/dbus-daemon"},"pid":{"type":"\u0005","value":222},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"224","Fields":{"executable":{"type":"\u0007","value":"/sbin/agetty"},"pid":{"type":"\u0005","value":224},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"23","Fields":{"executable":{"type":"\u0007","value":"[kauditd]"},"pid":{"type":"\u0005","value":23},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"232","Fields":{"executable":{"type":"\u0007","value":"/sbin/agetty"},"pid":{"type":"\u0005","value":232},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"24","Fields":{"executable":{"type":"\u0007","value":"[oom_reaper]"},"pid":{"type":"\u0005","value":24},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"25","Fields":{"executable":{"type":"\u0007","value":"[writeback]"},"pid":{"type":"\u0005","value":25},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"26","Fields":{"executable":{"type":"\u0007","value":"[kcompactd0]"},"pid":{"type":"\u0005","value":26},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"27","Fields":{"executable":{"type":"\u0007","value":"[khugepaged]"},"pid":{"type":"\u0005","value":27},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"292","Fields":{"executable":{"type":"\u0007","value":"[jbd2/vda1-8]"},"pid":{"type":"\u0005","value":292},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"293","Fields":{"executable":{"type":"\u0007","value":"[ext4-rsv-conver]"},"pid":{"type":"\u0005","value":293},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3","Fields":{"executable":{"type":"\u0007","value":"[rcu_gp]"},"pid":{"type":"\u0005","value":3},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3166","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3166},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3186","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":3186},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3208","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3208},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3228","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":3228},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3242","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3242},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3264","Fields":{"executable":{"type":"\u0007","value":"/usr/local/bin/kube-proxy"},"pid":{"type":"\u0005","value":3264},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"341","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":341},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3438","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3438},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3459","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":3459},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3529","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3529},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3551","Fields":{"executable":{"type":"\u0007","value":"/coredns"},"pid":{"type":"\u0005","value":3551},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"380","Fields":{"executable":{"type":"\u0007","value":"/usr/sbin/rpc.statd"},"pid":{"type":"\u0005","value":380},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"386","Fields":{"executable":{"type":"\u0007","value":"/usr/sbin/rpcbind"},"pid":{"type":"\u0005","value":386},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"387","Fields":{"executable":{"type":"\u0007","value":"/usr/sbin/rpc.mountd"},"pid":{"type":"\u0005","value":387},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"393","Fields":{"executable":{"type":"\u0007","value":"[kworker/u5:1-xprtiod]"},"pid":{"type":"\u0005","value":393},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"394","Fields":{"executable":{"type":"\u0007","value":"[lockd]"},"pid":{"type":"\u0005","value":394},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"4","Fields":{"executable":{"type":"\u0007","value":"[rcu_par_gp]"},"pid":{"type":"\u0005","value":4},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"41","Fields":{"executable":{"type":"\u0007","value":"[cryptd]"},"pid":{"type":"\u0005","value":41},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"434","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":434},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"435","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":435},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"436","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":436},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"437","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":437},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"438","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":438},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"439","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":439},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"440","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":440},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"441","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":441},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"53","Fields":{"executable":{"type":"\u0007","value":"[kblockd]"},"pid":{"type":"\u0005","value":53},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"54","Fields":{"executable":{"type":"\u0007","value":"[blkcg_punt_bio]"},"pid":{"type":"\u0005","value":54},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"55","Fields":{"executable":{"type":"\u0007","value":"[ata_sff]"},"pid":{"type":"\u0005","value":55},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"55460","Fields":{"executable":{"type":"\u0007","value":"[kworker/u4:0-events_unbound]"},"pid":{"type":"\u0005","value":55460},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"56","Fields":{"executable":{"type":"\u0007","value":"[md]"},"pid":{"type":"\u0005","value":56},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"57","Fields":{"executable":{"type":"\u0007","value":"[kworker/0:1H-kblockd]"},"pid":{"type":"\u0005","value":57},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"58","Fields":{"executable":{"type":"\u0007","value":"[rpciod]"},"pid":{"type":"\u0005","value":58},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"59","Fields":{"executable":{"type":"\u0007","value":"[kworker/u5:0-xprtiod]"},"pid":{"type":"\u0005","value":59},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"6","Fields":{"executable":{"type":"\u0007","value":"[kworker/0:0H-events_highpri]"},"pid":{"type":"\u0005","value":6},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"60","Fields":{"executable":{"type":"\u0007","value":"[xprtiod]"},"pid":{"type":"\u0005","value":60},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"61","Fields":{"executable":{"type":"\u0007","value":"[cfg80211]"},"pid":{"type":"\u0005","value":61},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"63","Fields":{"executable":{"type":"\u0007","value":"[kswapd0]"},"pid":{"type":"\u0005","value":63},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"64","Fields":{"executable":{"type":"\u0007","value":"[nfsiod]"},"pid":{"type":"\u0005","value":64},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"65","Fields":{"executable":{"type":"\u0007","value":"[cifsiod]"},"pid":{"type":"\u0005","value":65},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"66","Fields":{"executable":{"type":"\u0007","value":"[smb3decryptd]"},"pid":{"type":"\u0005","value":66},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"67","Fields":{"executable":{"type":"\u0007","value":"[cifsfileinfoput]"},"pid":{"type":"\u0005","value":67},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"68","Fields":{"executable":{"type":"\u0007","value":"[cifsoplockd]"},"pid":{"type":"\u0005","value":68},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"69","Fields":{"executable":{"type":"\u0007","value":"[xfsalloc]"},"pid":{"type":"\u0005","value":69},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"70","Fields":{"executable":{"type":"\u0007","value":"[xfs_mru_cache]"},"pid":{"type":"\u0005","value":70},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"72","Fields":{"executable":{"type":"\u0007","value":"[acpi_thermal_pm]"},"pid":{"type":"\u0005","value":72},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"74","Fields":{"executable":{"type":"\u0007","value":"[hwrng]"},"pid":{"type":"\u0005","value":74},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"75","Fields":{"executable":{"type":"\u0007","value":"[scsi_eh_0]"},"pid":{"type":"\u0005","value":75},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"76","Fields":{"executable":{"type":"\u0007","value":"[scsi_tmf_0]"},"pid":{"type":"\u0005","value":76},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"77","Fields":{"executable":{"type":"\u0007","value":"[scsi_eh_1]"},"pid":{"type":"\u0005","value":77},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"78","Fields":{"executable":{"type":"\u0007","value":"[scsi_tmf_1]"},"pid":{"type":"\u0005","value":78},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"81","Fields":{"executable":{"type":"\u0007","value":"[dm_bufio_cache]"},"pid":{"type":"\u0005","value":81},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"82","Fields":{"executable":{"type":"\u0007","value":"[kworker/1:1H-kblockd]"},"pid":{"type":"\u0005","value":82},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"83","Fields":{"executable":{"type":"\u0007","value":"[ipv6_addrconf]"},"pid":{"type":"\u0005","value":83},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"84","Fields":{"executable":{"type":"\u0007","value":"[ceph-msgr]"},"pid":{"type":"\u0005","value":84},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"9","Fields":{"executable":{"type":"\u0007","value":"[mm_percpu_wq]"},"pid":{"type":"\u0005","value":9},"state":{"type":"\u0007","value":""}}},{"Resource":"processes","ID":"","Fields":{"list":{"type":"\u0019\u001bprocess","value":[{"Name":"process","ID":"1"},{"Name":"process","ID":"2"},{"Name":"process","ID":"3"},{"Name":"process","ID":"4"},{"Name":"process","ID":"6"},{"Name":"process","ID":"9"},{"Name":"process","ID":"10"},{"Name":"process","ID":"11"},{"Name":"process","ID":"12"},{"Name":"process","ID":"13"},{"Name":"process","ID":"14"},{"Name":"process","ID":"15"},{"Name":"process","ID":"16"},{"Name":"process","ID":"17"},{"Name":"process","ID":"18"},{"Name":"process","ID":"20"},{"Name":"process","ID":"21"},{"Name":"process","ID":"22"},{"Name":"process","ID":"23"},{"Name":"process","ID":"24"},{"Name":"process","ID":"25"},{"Name":"process","ID":"26"},{"Name":"process","ID":"27"},{"Name":"process","ID":"41"},{"Name":"process","ID":"53"},{"Name":"process","ID":"54"},{"Name":"process","ID":"55"},{"Name":"process","ID":"56"},{"Name":"process","ID":"57"},{"Name":"process","ID":"58"},{"Name":"process","ID":"59"},{"Name":"process","ID":"60"},{"Name":"process","ID":"61"},{"Name":"process","ID":"63"},{"Name":"process","ID":"64"},{"Name":"process","ID":"65"},{"Name":"process","ID":"66"},{"Name":"process","ID":"67"},{"Name":"process","ID":"68"},{"Name":"process","ID":"69"},{"Name":"process","ID":"70"},{"Name":"process","ID":"72"},{"Name":"process","ID":"74"},{"Name":"process","ID":"75"},{"Name":"process","ID":"76"},{"Name":"process","ID":"77"},{"Name":"process","ID":"78"},{"Name":"process","ID":"81"},{"Name":"process","ID":"82"},{"Name":"process","ID":"83"},{"Name":"process","ID":"84"},{"Name":"process","ID":"221"},{"Name":"process","ID":"222"},{"Name":"process","ID":"224"},{"Name":"process","ID":"232"},{"Name":"process","ID":"292"},{"Name":"process","ID":"293"},{"Name":"process","ID":"341"},{"Name":"process","ID":"380"},{"Name":"process","ID":"386"},{"Name":"process","ID":"387"},{"Name":"process","ID":"393"},{"Name":"process","ID":"394"},{"Name":"process","ID":"434"},{"Name":"process","ID":"435"},{"Name":"process","ID":"436"},{"Name":"process","ID":"437"},{"Name":"process","ID":"438"},{"Name":"process","ID":"439"},{"Name":"process","ID":"440"},{"Name":"process","ID":"441"},{"Name":"process","ID":"1011"},{"Name":"process","ID":"1116"},{"Name":"process","ID":"1122"},{"Name":"process","ID":"3166"},{"Name":"process","ID":"3186"},{"Name":"process","ID":"3208"},{"Name":"process","ID":"3228"},{"Name":"process","ID":"3242"},{"Name":"process","ID":"3264"},{"Name":"process","ID":"3438"},{"Name":"process","ID":"3459"},{"Name":"process","ID":"3529"},{"Name":"process","ID":"3551"},{"Name":"process","ID":"16211"},{"Name":"process","ID":"16220"},{"Name":"process","ID":"16229"},{"Name":"process","ID":"16233"},{"Name":"process","ID":"16314"},{"Name":"process","ID":"16317"},{"Name":"process","ID":"55460"},{"Name":"process","ID":"102330"},{"Name":"process","ID":"104490"},{"Name":"process","ID":"104500"},{"Name":"process","ID":"151749"},{"Name":"process","ID":"151751"},{"Name":"process","ID":"151756"},{"Name":"process","ID":"152409"},{"Name":"process","ID":"152412"},{"Name":"process","ID":"153347"},{"Name":"process","ID":"162687"},{"Name":"process","ID":"162689"},{"Name":"process","ID":"162693"},{"Name":"process","ID":"162700"},{"Name":"process","ID":"162702"},{"Name":"process","ID":"162705"},{"Name":"process","ID":"162706"},{"Name":"process","ID":"162707"},{"Name":"process","ID":"162723"}]}}},{"Resource":"user","ID":"user/0/root","Fields":{"gid":{"type":"\u0005","value":0},"name":{"type":"\u0007","value":"root"},"uid":{"type":"\u0005","value":0}}}]}]} \ No newline at end of file diff --git a/providers-sdk/v1/testutils/testdata/kubelet.json b/providers-sdk/v1/testutils/testdata/kubelet.json index b3cbbf18a7..37dee9fb5c 100644 --- a/providers-sdk/v1/testutils/testdata/kubelet.json +++ b/providers-sdk/v1/testutils/testdata/kubelet.json @@ -1 +1 @@ -{"assets":[{"asset":{"id":"Buildroot 2021.02.12","platformIDs":["//platformid.api.mondoo.app/hostname/minikube","//platformid.api.mondoo.app/runtime/ssh/hostkey/SHA256-9GHnVr3zGaRkwyvFET6LOu0zq3k3j89XH/Xwb6r/vlI"],"name":"buildroot","arch":"x86_64","title":"Buildroot 2021.02.12","family":["linux","unix","os"],"version":"2021.02.12","kind":"baremetal","labels":{"distro-id":"buildroot"}},"connections":[{"url":"ssh://192.168.39.137","provider":"go.mondoo.com/cnquery/v10/providers/os","connector":"ssh","version":""}],"resources":[{"Resource":"file","ID":"/var/lib/kubelet/config.yaml","Fields":{"basename":{"type":"\u0007","value":"config.yaml"},"content":{"type":"\u0007","value":"apiVersion: kubelet.config.k8s.io/v1beta1\nauthentication:\n anonymous:\n enabled: false\n webhook:\n cacheTTL: 0s\n enabled: true\n x509:\n clientCAFile: /var/lib/minikube/certs/ca.crt\nauthorization:\n mode: Webhook\n webhook:\n cacheAuthorizedTTL: 0s\n cacheUnauthorizedTTL: 0s\ncgroupDriver: cgroupfs\nclusterDNS:\n- 10.96.0.10\nclusterDomain: cluster.local\ncontainerRuntimeEndpoint: \"\"\ncpuManagerReconcilePeriod: 0s\nevictionHard:\n imagefs.available: 0%\n nodefs.available: 0%\n nodefs.inodesFree: 0%\nevictionPressureTransitionPeriod: 0s\nfailSwapOn: false\nfileCheckFrequency: 0s\nhairpinMode: hairpin-veth\nhealthzBindAddress: 127.0.0.1\nhealthzPort: 10248\nhttpCheckFrequency: 0s\nimageGCHighThresholdPercent: 100\nimageMinimumGCAge: 0s\nkind: KubeletConfiguration\nlogging:\n flushFrequency: 0\n options:\n json:\n infoBufferSize: \"0\"\n verbosity: 0\nmemorySwap: {}\nnodeStatusReportFrequency: 0s\nnodeStatusUpdateFrequency: 0s\nresolvConf: /run/systemd/resolve/resolv.conf\nrotateCertificates: true\nruntimeRequestTimeout: 15m0s\nshutdownGracePeriod: 0s\nshutdownGracePeriodCriticalPods: 0s\nstaticPodPath: /etc/kubernetes/manifests\nstreamingConnectionIdleTimeout: 0s\nsyncFrequency: 0s\nvolumeStatsAggPeriod: 0s\n"},"dirname":{"type":"\u0007","value":"/var/lib/kubelet"},"empty":{"type":"\u0004","value":false},"exists":{"type":"\u0004","value":true},"group":{"type":"\u001bgroup","value":{"Name":"group","ID":"group/0/root"}},"path":{"type":"\u0007","value":"/var/lib/kubelet/config.yaml"},"permissions":{"type":"\u001bfile.permissions","value":{"Name":"file.permissions","ID":"-rw-r--r--"}},"size":{"type":"\u0005","value":1214},"user":{"type":"\u001buser","value":{"Name":"user","ID":"user/0/root"}}}},{"Resource":"file.permissions","ID":"-rw-r--r--","Fields":{"string":{"type":"\u0007","value":"-rw-r--r--"}}},{"Resource":"group","ID":"group/0/root","Fields":{"gid":{"type":"\u0005","value":0},"name":{"type":"\u0007","value":"root"}}},{"Resource":"kubelet","ID":"","Fields":{"configFile":{"type":"\u001bfile","value":{"Name":"file","ID":"/var/lib/kubelet/config.yaml"}},"process":{"type":"\u001bprocess","value":{"Name":"process","ID":"57742"}}}},{"Resource":"process","ID":"1","Fields":{"executable":{"type":"\u0007","value":"/sbin/init"},"pid":{"type":"\u0005","value":1},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"10","Fields":{"executable":{"type":"\u0007","value":"[rcu_tasks_rude_]"},"pid":{"type":"\u0005","value":10},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1011","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/cri-dockerd"},"pid":{"type":"\u0005","value":1011},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"11","Fields":{"executable":{"type":"\u0007","value":"[rcu_tasks_trace]"},"pid":{"type":"\u0005","value":11},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1116","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/dockerd"},"pid":{"type":"\u0005","value":1116},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1122","Fields":{"executable":{"type":"\u0007","value":"containerd"},"pid":{"type":"\u0005","value":1122},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"11504","Fields":{"executable":{"type":"\u0007","value":"[kworker/1:0-cgroup_pidlist_destroy]"},"pid":{"type":"\u0005","value":11504},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"12","Fields":{"executable":{"type":"\u0007","value":"[ksoftirqd/0]"},"pid":{"type":"\u0005","value":12},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"13","Fields":{"executable":{"type":"\u0007","value":"[rcu_sched]"},"pid":{"type":"\u0005","value":13},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"14","Fields":{"executable":{"type":"\u0007","value":"[migration/0]"},"pid":{"type":"\u0005","value":14},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"15","Fields":{"executable":{"type":"\u0007","value":"[cpuhp/0]"},"pid":{"type":"\u0005","value":15},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16","Fields":{"executable":{"type":"\u0007","value":"[cpuhp/1]"},"pid":{"type":"\u0005","value":16},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16206","Fields":{"executable":{"type":"\u0007","value":"[kworker/0:1-cgroup_pidlist_destroy]"},"pid":{"type":"\u0005","value":16206},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16211","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-timesyncd"},"pid":{"type":"\u0005","value":16211},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16220","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-udevd"},"pid":{"type":"\u0005","value":16220},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16229","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-journald"},"pid":{"type":"\u0005","value":16229},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16233","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-logind"},"pid":{"type":"\u0005","value":16233},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16251","Fields":{"executable":{"type":"\u0007","value":"[kworker/u4:4-flush-253:0]"},"pid":{"type":"\u0005","value":16251},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1628","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":1628},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16314","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-networkd"},"pid":{"type":"\u0005","value":16314},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16317","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-resolved"},"pid":{"type":"\u0005","value":16317},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1638","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":1638},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1670","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":1670},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"17","Fields":{"executable":{"type":"\u0007","value":"[migration/1]"},"pid":{"type":"\u0005","value":17},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1702","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":1702},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1708","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":1708},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1723","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":1723},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1743","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":1743},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1754","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":1754},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"18","Fields":{"executable":{"type":"\u0007","value":"[ksoftirqd/1]"},"pid":{"type":"\u0005","value":18},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1803","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":1803},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1823","Fields":{"executable":{"type":"\u0007","value":"kube-controller-manager"},"pid":{"type":"\u0005","value":1823},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1850","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":1850},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1871","Fields":{"executable":{"type":"\u0007","value":"kube-apiserver"},"pid":{"type":"\u0005","value":1871},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1886","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":1886},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1921","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":1921},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1936","Fields":{"executable":{"type":"\u0007","value":"etcd"},"pid":{"type":"\u0005","value":1936},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1953","Fields":{"executable":{"type":"\u0007","value":"kube-scheduler"},"pid":{"type":"\u0005","value":1953},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"2","Fields":{"executable":{"type":"\u0007","value":"[kthreadd]"},"pid":{"type":"\u0005","value":2},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"20","Fields":{"executable":{"type":"\u0007","value":"[kworker/1:0H-events_highpri]"},"pid":{"type":"\u0005","value":20},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"21","Fields":{"executable":{"type":"\u0007","value":"[kdevtmpfs]"},"pid":{"type":"\u0005","value":21},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"22","Fields":{"executable":{"type":"\u0007","value":"[netns]"},"pid":{"type":"\u0005","value":22},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"221","Fields":{"executable":{"type":"\u0007","value":"/usr/sbin/acpid"},"pid":{"type":"\u0005","value":221},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"222","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/dbus-daemon"},"pid":{"type":"\u0005","value":222},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"25","Fields":{"executable":{"type":"\u0007","value":"[writeback]"},"pid":{"type":"\u0005","value":25},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"26","Fields":{"executable":{"type":"\u0007","value":"[kcompactd0]"},"pid":{"type":"\u0005","value":26},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"27","Fields":{"executable":{"type":"\u0007","value":"[khugepaged]"},"pid":{"type":"\u0005","value":27},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"292","Fields":{"executable":{"type":"\u0007","value":"[jbd2/vda1-8]"},"pid":{"type":"\u0005","value":292},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"293","Fields":{"executable":{"type":"\u0007","value":"[ext4-rsv-conver]"},"pid":{"type":"\u0005","value":293},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3","Fields":{"executable":{"type":"\u0007","value":"[rcu_gp]"},"pid":{"type":"\u0005","value":3},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3166","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3166},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3186","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":3186},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3208","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3208},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3228","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":3228},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3242","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3242},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3264","Fields":{"executable":{"type":"\u0007","value":"/usr/local/bin/kube-proxy"},"pid":{"type":"\u0005","value":3264},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3391","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3391},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"341","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":341},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3411","Fields":{"executable":{"type":"\u0007","value":"/storage-provisioner"},"pid":{"type":"\u0005","value":3411},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3438","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3438},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3459","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":3459},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3529","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3529},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3551","Fields":{"executable":{"type":"\u0007","value":"/coredns"},"pid":{"type":"\u0005","value":3551},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"380","Fields":{"executable":{"type":"\u0007","value":"/usr/sbin/rpc.statd"},"pid":{"type":"\u0005","value":380},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"386","Fields":{"executable":{"type":"\u0007","value":"/usr/sbin/rpcbind"},"pid":{"type":"\u0005","value":386},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"387","Fields":{"executable":{"type":"\u0007","value":"/usr/sbin/rpc.mountd"},"pid":{"type":"\u0005","value":387},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"393","Fields":{"executable":{"type":"\u0007","value":"[kworker/u5:1-xprtiod]"},"pid":{"type":"\u0005","value":393},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"394","Fields":{"executable":{"type":"\u0007","value":"[lockd]"},"pid":{"type":"\u0005","value":394},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"4","Fields":{"executable":{"type":"\u0007","value":"[rcu_par_gp]"},"pid":{"type":"\u0005","value":4},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"41","Fields":{"executable":{"type":"\u0007","value":"[cryptd]"},"pid":{"type":"\u0005","value":41},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"434","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":434},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"435","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":435},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"436","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":436},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"437","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":437},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"438","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":438},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"439","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":439},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"440","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":440},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"441","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":441},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"53","Fields":{"executable":{"type":"\u0007","value":"[kblockd]"},"pid":{"type":"\u0005","value":53},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"54","Fields":{"executable":{"type":"\u0007","value":"[blkcg_punt_bio]"},"pid":{"type":"\u0005","value":54},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"55","Fields":{"executable":{"type":"\u0007","value":"[ata_sff]"},"pid":{"type":"\u0005","value":55},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"55460","Fields":{"executable":{"type":"\u0007","value":"[kworker/u4:0-flush-253:0]"},"pid":{"type":"\u0005","value":55460},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"56","Fields":{"executable":{"type":"\u0007","value":"[md]"},"pid":{"type":"\u0005","value":56},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"57","Fields":{"executable":{"type":"\u0007","value":"[kworker/0:1H-kblockd]"},"pid":{"type":"\u0005","value":57},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"57503","Fields":{"executable":{"type":"\u0007","value":"[kworker/0:0-events_power_efficient]"},"pid":{"type":"\u0005","value":57503},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"57741","Fields":{"executable":{"type":"\u0007","value":"[kworker/1:1-events_power_efficient]"},"pid":{"type":"\u0005","value":57741},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"57742","Fields":{"command":{"type":"\u0007","value":"/var/lib/minikube/binaries/v1.28.3/kubelet --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --config=/var/lib/kubelet/config.yaml --container-runtime-endpoint=unix:///var/run/cri-dockerd.sock --hostname-override=minikube --kubeconfig=/etc/kubernetes/kubelet.conf --node-ip=192.168.39.137 --runtime-request-timeout=7m"},"executable":{"type":"\u0007","value":"/var/lib/minikube/binaries/v1.28.3/kubelet"},"flags":{"type":"\u001a\u0007\u0007","value":{"bootstrap-kubeconfig":"/etc/kubernetes/bootstrap-kubelet.conf","config":"/var/lib/kubelet/config.yaml","container-runtime-endpoint":"unix:///var/run/cri-dockerd.sock","hostname-override":"minikube","kubeconfig":"/etc/kubernetes/kubelet.conf","node-ip":"192.168.39.137","runtime-request-timeout":"7m"}},"pid":{"type":"\u0005","value":57742},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"58","Fields":{"executable":{"type":"\u0007","value":"[rpciod]"},"pid":{"type":"\u0005","value":58},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"59","Fields":{"executable":{"type":"\u0007","value":"[kworker/u5:0-xprtiod]"},"pid":{"type":"\u0005","value":59},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"6","Fields":{"executable":{"type":"\u0007","value":"[kworker/0:0H-events_highpri]"},"pid":{"type":"\u0005","value":6},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"60","Fields":{"executable":{"type":"\u0007","value":"[xprtiod]"},"pid":{"type":"\u0005","value":60},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"61","Fields":{"executable":{"type":"\u0007","value":"[cfg80211]"},"pid":{"type":"\u0005","value":61},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"61098","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":61098},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"61100","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":61100},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"61104","Fields":{"executable":{"type":"\u0007","value":"/usr/libexec/sftp-server"},"pid":{"type":"\u0005","value":61104},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"61111","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":61111},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"61113","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":61113},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"61116","Fields":{"executable":{"type":"\u0007","value":"/usr/libexec/sftp-server"},"pid":{"type":"\u0005","value":61116},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"61117","Fields":{"executable":{"type":"\u0007","value":"/usr/libexec/sftp-server"},"pid":{"type":"\u0005","value":61117},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"61118","Fields":{"executable":{"type":"\u0007","value":"/usr/libexec/sftp-server"},"pid":{"type":"\u0005","value":61118},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"61188","Fields":{"executable":{"type":"\u0007","value":"ps"},"pid":{"type":"\u0005","value":61188},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"63","Fields":{"executable":{"type":"\u0007","value":"[kswapd0]"},"pid":{"type":"\u0005","value":63},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"64","Fields":{"executable":{"type":"\u0007","value":"[nfsiod]"},"pid":{"type":"\u0005","value":64},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"65","Fields":{"executable":{"type":"\u0007","value":"[cifsiod]"},"pid":{"type":"\u0005","value":65},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"66","Fields":{"executable":{"type":"\u0007","value":"[smb3decryptd]"},"pid":{"type":"\u0005","value":66},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"67","Fields":{"executable":{"type":"\u0007","value":"[cifsfileinfoput]"},"pid":{"type":"\u0005","value":67},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"68","Fields":{"executable":{"type":"\u0007","value":"[cifsoplockd]"},"pid":{"type":"\u0005","value":68},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"69","Fields":{"executable":{"type":"\u0007","value":"[xfsalloc]"},"pid":{"type":"\u0005","value":69},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"70","Fields":{"executable":{"type":"\u0007","value":"[xfs_mru_cache]"},"pid":{"type":"\u0005","value":70},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"72","Fields":{"executable":{"type":"\u0007","value":"[acpi_thermal_pm]"},"pid":{"type":"\u0005","value":72},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"74","Fields":{"executable":{"type":"\u0007","value":"[hwrng]"},"pid":{"type":"\u0005","value":74},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"75","Fields":{"executable":{"type":"\u0007","value":"[scsi_eh_0]"},"pid":{"type":"\u0005","value":75},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"76","Fields":{"executable":{"type":"\u0007","value":"[scsi_tmf_0]"},"pid":{"type":"\u0005","value":76},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"77","Fields":{"executable":{"type":"\u0007","value":"[scsi_eh_1]"},"pid":{"type":"\u0005","value":77},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"78","Fields":{"executable":{"type":"\u0007","value":"[scsi_tmf_1]"},"pid":{"type":"\u0005","value":78},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"81","Fields":{"executable":{"type":"\u0007","value":"[dm_bufio_cache]"},"pid":{"type":"\u0005","value":81},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"82","Fields":{"executable":{"type":"\u0007","value":"[kworker/1:1H-kblockd]"},"pid":{"type":"\u0005","value":82},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"83","Fields":{"executable":{"type":"\u0007","value":"[ipv6_addrconf]"},"pid":{"type":"\u0005","value":83},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"84","Fields":{"executable":{"type":"\u0007","value":"[ceph-msgr]"},"pid":{"type":"\u0005","value":84},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"9","Fields":{"executable":{"type":"\u0007","value":"[mm_percpu_wq]"},"pid":{"type":"\u0005","value":9},"state":{"type":"\u0007","value":""}}},{"Resource":"processes","ID":"","Fields":{"list":{"type":"\u0019\u001bprocess","value":[{"Name":"process","ID":"1"},{"Name":"process","ID":"2"},{"Name":"process","ID":"3"},{"Name":"process","ID":"4"},{"Name":"process","ID":"6"},{"Name":"process","ID":"9"},{"Name":"process","ID":"10"},{"Name":"process","ID":"11"},{"Name":"process","ID":"12"},{"Name":"process","ID":"13"},{"Name":"process","ID":"14"},{"Name":"process","ID":"15"},{"Name":"process","ID":"16"},{"Name":"process","ID":"17"},{"Name":"process","ID":"18"},{"Name":"process","ID":"20"},{"Name":"process","ID":"21"},{"Name":"process","ID":"22"},{"Name":"process","ID":"23"},{"Name":"process","ID":"24"},{"Name":"process","ID":"25"},{"Name":"process","ID":"26"},{"Name":"process","ID":"27"},{"Name":"process","ID":"41"},{"Name":"process","ID":"53"},{"Name":"process","ID":"54"},{"Name":"process","ID":"55"},{"Name":"process","ID":"56"},{"Name":"process","ID":"57"},{"Name":"process","ID":"58"},{"Name":"process","ID":"59"},{"Name":"process","ID":"60"},{"Name":"process","ID":"61"},{"Name":"process","ID":"63"},{"Name":"process","ID":"64"},{"Name":"process","ID":"65"},{"Name":"process","ID":"66"},{"Name":"process","ID":"67"},{"Name":"process","ID":"68"},{"Name":"process","ID":"69"},{"Name":"process","ID":"70"},{"Name":"process","ID":"72"},{"Name":"process","ID":"74"},{"Name":"process","ID":"75"},{"Name":"process","ID":"76"},{"Name":"process","ID":"77"},{"Name":"process","ID":"78"},{"Name":"process","ID":"81"},{"Name":"process","ID":"82"},{"Name":"process","ID":"83"},{"Name":"process","ID":"84"},{"Name":"process","ID":"221"},{"Name":"process","ID":"222"},{"Name":"process","ID":"224"},{"Name":"process","ID":"232"},{"Name":"process","ID":"292"},{"Name":"process","ID":"293"},{"Name":"process","ID":"341"},{"Name":"process","ID":"380"},{"Name":"process","ID":"386"},{"Name":"process","ID":"387"},{"Name":"process","ID":"393"},{"Name":"process","ID":"394"},{"Name":"process","ID":"434"},{"Name":"process","ID":"435"},{"Name":"process","ID":"436"},{"Name":"process","ID":"437"},{"Name":"process","ID":"438"},{"Name":"process","ID":"439"},{"Name":"process","ID":"440"},{"Name":"process","ID":"441"},{"Name":"process","ID":"1011"},{"Name":"process","ID":"1116"},{"Name":"process","ID":"1122"},{"Name":"process","ID":"1628"},{"Name":"process","ID":"1638"},{"Name":"process","ID":"1670"},{"Name":"process","ID":"1702"},{"Name":"process","ID":"1708"},{"Name":"process","ID":"1723"},{"Name":"process","ID":"1743"},{"Name":"process","ID":"1754"},{"Name":"process","ID":"1803"},{"Name":"process","ID":"1823"},{"Name":"process","ID":"1850"},{"Name":"process","ID":"1871"},{"Name":"process","ID":"1886"},{"Name":"process","ID":"1921"},{"Name":"process","ID":"1936"},{"Name":"process","ID":"1953"},{"Name":"process","ID":"3166"},{"Name":"process","ID":"3186"},{"Name":"process","ID":"3208"},{"Name":"process","ID":"3228"},{"Name":"process","ID":"3242"},{"Name":"process","ID":"3264"},{"Name":"process","ID":"3391"},{"Name":"process","ID":"3411"},{"Name":"process","ID":"3438"},{"Name":"process","ID":"3459"},{"Name":"process","ID":"3529"},{"Name":"process","ID":"3551"},{"Name":"process","ID":"11504"},{"Name":"process","ID":"16206"},{"Name":"process","ID":"16211"},{"Name":"process","ID":"16220"},{"Name":"process","ID":"16229"},{"Name":"process","ID":"16233"},{"Name":"process","ID":"16251"},{"Name":"process","ID":"16314"},{"Name":"process","ID":"16317"},{"Name":"process","ID":"55460"},{"Name":"process","ID":"57503"},{"Name":"process","ID":"57741"},{"Name":"process","ID":"57742"},{"Name":"process","ID":"61098"},{"Name":"process","ID":"61100"},{"Name":"process","ID":"61104"},{"Name":"process","ID":"61111"},{"Name":"process","ID":"61113"},{"Name":"process","ID":"61116"},{"Name":"process","ID":"61117"},{"Name":"process","ID":"61118"},{"Name":"process","ID":"61188"}]}}},{"Resource":"user","ID":"user/0/root","Fields":{"gid":{"type":"\u0005","value":0},"name":{"type":"\u0007","value":"root"},"uid":{"type":"\u0005","value":0}}}]}]} \ No newline at end of file +{"assets":[{"asset":{"id":"Buildroot 2021.02.12","platformIDs":["//platformid.api.mondoo.app/hostname/minikube","//platformid.api.mondoo.app/runtime/ssh/hostkey/SHA256-9GHnVr3zGaRkwyvFET6LOu0zq3k3j89XH/Xwb6r/vlI"],"name":"buildroot","arch":"x86_64","title":"Buildroot 2021.02.12","family":["linux","unix","os"],"version":"2021.02.12","kind":"baremetal","labels":{"distro-id":"buildroot"}},"connections":[{"url":"ssh://192.168.39.137","provider":"go.mondoo.com/cnquery/providers/os","connector":"ssh","version":""}],"resources":[{"Resource":"file","ID":"/var/lib/kubelet/config.yaml","Fields":{"basename":{"type":"\u0007","value":"config.yaml"},"content":{"type":"\u0007","value":"apiVersion: kubelet.config.k8s.io/v1beta1\nauthentication:\n anonymous:\n enabled: false\n webhook:\n cacheTTL: 0s\n enabled: true\n x509:\n clientCAFile: /var/lib/minikube/certs/ca.crt\nauthorization:\n mode: Webhook\n webhook:\n cacheAuthorizedTTL: 0s\n cacheUnauthorizedTTL: 0s\ncgroupDriver: cgroupfs\nclusterDNS:\n- 10.96.0.10\nclusterDomain: cluster.local\ncontainerRuntimeEndpoint: \"\"\ncpuManagerReconcilePeriod: 0s\nevictionHard:\n imagefs.available: 0%\n nodefs.available: 0%\n nodefs.inodesFree: 0%\nevictionPressureTransitionPeriod: 0s\nfailSwapOn: false\nfileCheckFrequency: 0s\nhairpinMode: hairpin-veth\nhealthzBindAddress: 127.0.0.1\nhealthzPort: 10248\nhttpCheckFrequency: 0s\nimageGCHighThresholdPercent: 100\nimageMinimumGCAge: 0s\nkind: KubeletConfiguration\nlogging:\n flushFrequency: 0\n options:\n json:\n infoBufferSize: \"0\"\n verbosity: 0\nmemorySwap: {}\nnodeStatusReportFrequency: 0s\nnodeStatusUpdateFrequency: 0s\nresolvConf: /run/systemd/resolve/resolv.conf\nrotateCertificates: true\nruntimeRequestTimeout: 15m0s\nshutdownGracePeriod: 0s\nshutdownGracePeriodCriticalPods: 0s\nstaticPodPath: /etc/kubernetes/manifests\nstreamingConnectionIdleTimeout: 0s\nsyncFrequency: 0s\nvolumeStatsAggPeriod: 0s\n"},"dirname":{"type":"\u0007","value":"/var/lib/kubelet"},"empty":{"type":"\u0004","value":false},"exists":{"type":"\u0004","value":true},"group":{"type":"\u001bgroup","value":{"Name":"group","ID":"group/0/root"}},"path":{"type":"\u0007","value":"/var/lib/kubelet/config.yaml"},"permissions":{"type":"\u001bfile.permissions","value":{"Name":"file.permissions","ID":"-rw-r--r--"}},"size":{"type":"\u0005","value":1214},"user":{"type":"\u001buser","value":{"Name":"user","ID":"user/0/root"}}}},{"Resource":"file.permissions","ID":"-rw-r--r--","Fields":{"string":{"type":"\u0007","value":"-rw-r--r--"}}},{"Resource":"group","ID":"group/0/root","Fields":{"gid":{"type":"\u0005","value":0},"name":{"type":"\u0007","value":"root"}}},{"Resource":"kubelet","ID":"","Fields":{"configFile":{"type":"\u001bfile","value":{"Name":"file","ID":"/var/lib/kubelet/config.yaml"}},"process":{"type":"\u001bprocess","value":{"Name":"process","ID":"57742"}}}},{"Resource":"process","ID":"1","Fields":{"executable":{"type":"\u0007","value":"/sbin/init"},"pid":{"type":"\u0005","value":1},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"10","Fields":{"executable":{"type":"\u0007","value":"[rcu_tasks_rude_]"},"pid":{"type":"\u0005","value":10},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1011","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/cri-dockerd"},"pid":{"type":"\u0005","value":1011},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"11","Fields":{"executable":{"type":"\u0007","value":"[rcu_tasks_trace]"},"pid":{"type":"\u0005","value":11},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1116","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/dockerd"},"pid":{"type":"\u0005","value":1116},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1122","Fields":{"executable":{"type":"\u0007","value":"containerd"},"pid":{"type":"\u0005","value":1122},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"11504","Fields":{"executable":{"type":"\u0007","value":"[kworker/1:0-cgroup_pidlist_destroy]"},"pid":{"type":"\u0005","value":11504},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"12","Fields":{"executable":{"type":"\u0007","value":"[ksoftirqd/0]"},"pid":{"type":"\u0005","value":12},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"13","Fields":{"executable":{"type":"\u0007","value":"[rcu_sched]"},"pid":{"type":"\u0005","value":13},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"14","Fields":{"executable":{"type":"\u0007","value":"[migration/0]"},"pid":{"type":"\u0005","value":14},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"15","Fields":{"executable":{"type":"\u0007","value":"[cpuhp/0]"},"pid":{"type":"\u0005","value":15},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16","Fields":{"executable":{"type":"\u0007","value":"[cpuhp/1]"},"pid":{"type":"\u0005","value":16},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16206","Fields":{"executable":{"type":"\u0007","value":"[kworker/0:1-cgroup_pidlist_destroy]"},"pid":{"type":"\u0005","value":16206},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16211","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-timesyncd"},"pid":{"type":"\u0005","value":16211},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16220","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-udevd"},"pid":{"type":"\u0005","value":16220},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16229","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-journald"},"pid":{"type":"\u0005","value":16229},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16233","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-logind"},"pid":{"type":"\u0005","value":16233},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16251","Fields":{"executable":{"type":"\u0007","value":"[kworker/u4:4-flush-253:0]"},"pid":{"type":"\u0005","value":16251},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1628","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":1628},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16314","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-networkd"},"pid":{"type":"\u0005","value":16314},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"16317","Fields":{"executable":{"type":"\u0007","value":"/usr/lib/systemd/systemd-resolved"},"pid":{"type":"\u0005","value":16317},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1638","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":1638},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1670","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":1670},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"17","Fields":{"executable":{"type":"\u0007","value":"[migration/1]"},"pid":{"type":"\u0005","value":17},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1702","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":1702},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1708","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":1708},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1723","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":1723},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1743","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":1743},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1754","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":1754},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"18","Fields":{"executable":{"type":"\u0007","value":"[ksoftirqd/1]"},"pid":{"type":"\u0005","value":18},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1803","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":1803},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1823","Fields":{"executable":{"type":"\u0007","value":"kube-controller-manager"},"pid":{"type":"\u0005","value":1823},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1850","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":1850},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1871","Fields":{"executable":{"type":"\u0007","value":"kube-apiserver"},"pid":{"type":"\u0005","value":1871},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1886","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":1886},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1921","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":1921},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1936","Fields":{"executable":{"type":"\u0007","value":"etcd"},"pid":{"type":"\u0005","value":1936},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"1953","Fields":{"executable":{"type":"\u0007","value":"kube-scheduler"},"pid":{"type":"\u0005","value":1953},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"2","Fields":{"executable":{"type":"\u0007","value":"[kthreadd]"},"pid":{"type":"\u0005","value":2},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"20","Fields":{"executable":{"type":"\u0007","value":"[kworker/1:0H-events_highpri]"},"pid":{"type":"\u0005","value":20},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"21","Fields":{"executable":{"type":"\u0007","value":"[kdevtmpfs]"},"pid":{"type":"\u0005","value":21},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"22","Fields":{"executable":{"type":"\u0007","value":"[netns]"},"pid":{"type":"\u0005","value":22},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"221","Fields":{"executable":{"type":"\u0007","value":"/usr/sbin/acpid"},"pid":{"type":"\u0005","value":221},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"222","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/dbus-daemon"},"pid":{"type":"\u0005","value":222},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"25","Fields":{"executable":{"type":"\u0007","value":"[writeback]"},"pid":{"type":"\u0005","value":25},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"26","Fields":{"executable":{"type":"\u0007","value":"[kcompactd0]"},"pid":{"type":"\u0005","value":26},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"27","Fields":{"executable":{"type":"\u0007","value":"[khugepaged]"},"pid":{"type":"\u0005","value":27},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"292","Fields":{"executable":{"type":"\u0007","value":"[jbd2/vda1-8]"},"pid":{"type":"\u0005","value":292},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"293","Fields":{"executable":{"type":"\u0007","value":"[ext4-rsv-conver]"},"pid":{"type":"\u0005","value":293},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3","Fields":{"executable":{"type":"\u0007","value":"[rcu_gp]"},"pid":{"type":"\u0005","value":3},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3166","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3166},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3186","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":3186},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3208","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3208},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3228","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":3228},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3242","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3242},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3264","Fields":{"executable":{"type":"\u0007","value":"/usr/local/bin/kube-proxy"},"pid":{"type":"\u0005","value":3264},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3391","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3391},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"341","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":341},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3411","Fields":{"executable":{"type":"\u0007","value":"/storage-provisioner"},"pid":{"type":"\u0005","value":3411},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3438","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3438},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3459","Fields":{"executable":{"type":"\u0007","value":"/pause"},"pid":{"type":"\u0005","value":3459},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3529","Fields":{"executable":{"type":"\u0007","value":"/usr/bin/containerd-shim-runc-v2"},"pid":{"type":"\u0005","value":3529},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"3551","Fields":{"executable":{"type":"\u0007","value":"/coredns"},"pid":{"type":"\u0005","value":3551},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"380","Fields":{"executable":{"type":"\u0007","value":"/usr/sbin/rpc.statd"},"pid":{"type":"\u0005","value":380},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"386","Fields":{"executable":{"type":"\u0007","value":"/usr/sbin/rpcbind"},"pid":{"type":"\u0005","value":386},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"387","Fields":{"executable":{"type":"\u0007","value":"/usr/sbin/rpc.mountd"},"pid":{"type":"\u0005","value":387},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"393","Fields":{"executable":{"type":"\u0007","value":"[kworker/u5:1-xprtiod]"},"pid":{"type":"\u0005","value":393},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"394","Fields":{"executable":{"type":"\u0007","value":"[lockd]"},"pid":{"type":"\u0005","value":394},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"4","Fields":{"executable":{"type":"\u0007","value":"[rcu_par_gp]"},"pid":{"type":"\u0005","value":4},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"41","Fields":{"executable":{"type":"\u0007","value":"[cryptd]"},"pid":{"type":"\u0005","value":41},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"434","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":434},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"435","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":435},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"436","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":436},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"437","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":437},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"438","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":438},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"439","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":439},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"440","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":440},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"441","Fields":{"executable":{"type":"\u0007","value":"[nfsd]"},"pid":{"type":"\u0005","value":441},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"53","Fields":{"executable":{"type":"\u0007","value":"[kblockd]"},"pid":{"type":"\u0005","value":53},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"54","Fields":{"executable":{"type":"\u0007","value":"[blkcg_punt_bio]"},"pid":{"type":"\u0005","value":54},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"55","Fields":{"executable":{"type":"\u0007","value":"[ata_sff]"},"pid":{"type":"\u0005","value":55},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"55460","Fields":{"executable":{"type":"\u0007","value":"[kworker/u4:0-flush-253:0]"},"pid":{"type":"\u0005","value":55460},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"56","Fields":{"executable":{"type":"\u0007","value":"[md]"},"pid":{"type":"\u0005","value":56},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"57","Fields":{"executable":{"type":"\u0007","value":"[kworker/0:1H-kblockd]"},"pid":{"type":"\u0005","value":57},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"57503","Fields":{"executable":{"type":"\u0007","value":"[kworker/0:0-events_power_efficient]"},"pid":{"type":"\u0005","value":57503},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"57741","Fields":{"executable":{"type":"\u0007","value":"[kworker/1:1-events_power_efficient]"},"pid":{"type":"\u0005","value":57741},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"57742","Fields":{"command":{"type":"\u0007","value":"/var/lib/minikube/binaries/v1.28.3/kubelet --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --config=/var/lib/kubelet/config.yaml --container-runtime-endpoint=unix:///var/run/cri-dockerd.sock --hostname-override=minikube --kubeconfig=/etc/kubernetes/kubelet.conf --node-ip=192.168.39.137 --runtime-request-timeout=7m"},"executable":{"type":"\u0007","value":"/var/lib/minikube/binaries/v1.28.3/kubelet"},"flags":{"type":"\u001a\u0007\u0007","value":{"bootstrap-kubeconfig":"/etc/kubernetes/bootstrap-kubelet.conf","config":"/var/lib/kubelet/config.yaml","container-runtime-endpoint":"unix:///var/run/cri-dockerd.sock","hostname-override":"minikube","kubeconfig":"/etc/kubernetes/kubelet.conf","node-ip":"192.168.39.137","runtime-request-timeout":"7m"}},"pid":{"type":"\u0005","value":57742},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"58","Fields":{"executable":{"type":"\u0007","value":"[rpciod]"},"pid":{"type":"\u0005","value":58},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"59","Fields":{"executable":{"type":"\u0007","value":"[kworker/u5:0-xprtiod]"},"pid":{"type":"\u0005","value":59},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"6","Fields":{"executable":{"type":"\u0007","value":"[kworker/0:0H-events_highpri]"},"pid":{"type":"\u0005","value":6},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"60","Fields":{"executable":{"type":"\u0007","value":"[xprtiod]"},"pid":{"type":"\u0005","value":60},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"61","Fields":{"executable":{"type":"\u0007","value":"[cfg80211]"},"pid":{"type":"\u0005","value":61},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"61098","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":61098},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"61100","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":61100},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"61104","Fields":{"executable":{"type":"\u0007","value":"/usr/libexec/sftp-server"},"pid":{"type":"\u0005","value":61104},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"61111","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":61111},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"61113","Fields":{"executable":{"type":"\u0007","value":"sshd:"},"pid":{"type":"\u0005","value":61113},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"61116","Fields":{"executable":{"type":"\u0007","value":"/usr/libexec/sftp-server"},"pid":{"type":"\u0005","value":61116},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"61117","Fields":{"executable":{"type":"\u0007","value":"/usr/libexec/sftp-server"},"pid":{"type":"\u0005","value":61117},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"61118","Fields":{"executable":{"type":"\u0007","value":"/usr/libexec/sftp-server"},"pid":{"type":"\u0005","value":61118},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"61188","Fields":{"executable":{"type":"\u0007","value":"ps"},"pid":{"type":"\u0005","value":61188},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"63","Fields":{"executable":{"type":"\u0007","value":"[kswapd0]"},"pid":{"type":"\u0005","value":63},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"64","Fields":{"executable":{"type":"\u0007","value":"[nfsiod]"},"pid":{"type":"\u0005","value":64},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"65","Fields":{"executable":{"type":"\u0007","value":"[cifsiod]"},"pid":{"type":"\u0005","value":65},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"66","Fields":{"executable":{"type":"\u0007","value":"[smb3decryptd]"},"pid":{"type":"\u0005","value":66},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"67","Fields":{"executable":{"type":"\u0007","value":"[cifsfileinfoput]"},"pid":{"type":"\u0005","value":67},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"68","Fields":{"executable":{"type":"\u0007","value":"[cifsoplockd]"},"pid":{"type":"\u0005","value":68},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"69","Fields":{"executable":{"type":"\u0007","value":"[xfsalloc]"},"pid":{"type":"\u0005","value":69},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"70","Fields":{"executable":{"type":"\u0007","value":"[xfs_mru_cache]"},"pid":{"type":"\u0005","value":70},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"72","Fields":{"executable":{"type":"\u0007","value":"[acpi_thermal_pm]"},"pid":{"type":"\u0005","value":72},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"74","Fields":{"executable":{"type":"\u0007","value":"[hwrng]"},"pid":{"type":"\u0005","value":74},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"75","Fields":{"executable":{"type":"\u0007","value":"[scsi_eh_0]"},"pid":{"type":"\u0005","value":75},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"76","Fields":{"executable":{"type":"\u0007","value":"[scsi_tmf_0]"},"pid":{"type":"\u0005","value":76},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"77","Fields":{"executable":{"type":"\u0007","value":"[scsi_eh_1]"},"pid":{"type":"\u0005","value":77},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"78","Fields":{"executable":{"type":"\u0007","value":"[scsi_tmf_1]"},"pid":{"type":"\u0005","value":78},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"81","Fields":{"executable":{"type":"\u0007","value":"[dm_bufio_cache]"},"pid":{"type":"\u0005","value":81},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"82","Fields":{"executable":{"type":"\u0007","value":"[kworker/1:1H-kblockd]"},"pid":{"type":"\u0005","value":82},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"83","Fields":{"executable":{"type":"\u0007","value":"[ipv6_addrconf]"},"pid":{"type":"\u0005","value":83},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"84","Fields":{"executable":{"type":"\u0007","value":"[ceph-msgr]"},"pid":{"type":"\u0005","value":84},"state":{"type":"\u0007","value":""}}},{"Resource":"process","ID":"9","Fields":{"executable":{"type":"\u0007","value":"[mm_percpu_wq]"},"pid":{"type":"\u0005","value":9},"state":{"type":"\u0007","value":""}}},{"Resource":"processes","ID":"","Fields":{"list":{"type":"\u0019\u001bprocess","value":[{"Name":"process","ID":"1"},{"Name":"process","ID":"2"},{"Name":"process","ID":"3"},{"Name":"process","ID":"4"},{"Name":"process","ID":"6"},{"Name":"process","ID":"9"},{"Name":"process","ID":"10"},{"Name":"process","ID":"11"},{"Name":"process","ID":"12"},{"Name":"process","ID":"13"},{"Name":"process","ID":"14"},{"Name":"process","ID":"15"},{"Name":"process","ID":"16"},{"Name":"process","ID":"17"},{"Name":"process","ID":"18"},{"Name":"process","ID":"20"},{"Name":"process","ID":"21"},{"Name":"process","ID":"22"},{"Name":"process","ID":"23"},{"Name":"process","ID":"24"},{"Name":"process","ID":"25"},{"Name":"process","ID":"26"},{"Name":"process","ID":"27"},{"Name":"process","ID":"41"},{"Name":"process","ID":"53"},{"Name":"process","ID":"54"},{"Name":"process","ID":"55"},{"Name":"process","ID":"56"},{"Name":"process","ID":"57"},{"Name":"process","ID":"58"},{"Name":"process","ID":"59"},{"Name":"process","ID":"60"},{"Name":"process","ID":"61"},{"Name":"process","ID":"63"},{"Name":"process","ID":"64"},{"Name":"process","ID":"65"},{"Name":"process","ID":"66"},{"Name":"process","ID":"67"},{"Name":"process","ID":"68"},{"Name":"process","ID":"69"},{"Name":"process","ID":"70"},{"Name":"process","ID":"72"},{"Name":"process","ID":"74"},{"Name":"process","ID":"75"},{"Name":"process","ID":"76"},{"Name":"process","ID":"77"},{"Name":"process","ID":"78"},{"Name":"process","ID":"81"},{"Name":"process","ID":"82"},{"Name":"process","ID":"83"},{"Name":"process","ID":"84"},{"Name":"process","ID":"221"},{"Name":"process","ID":"222"},{"Name":"process","ID":"224"},{"Name":"process","ID":"232"},{"Name":"process","ID":"292"},{"Name":"process","ID":"293"},{"Name":"process","ID":"341"},{"Name":"process","ID":"380"},{"Name":"process","ID":"386"},{"Name":"process","ID":"387"},{"Name":"process","ID":"393"},{"Name":"process","ID":"394"},{"Name":"process","ID":"434"},{"Name":"process","ID":"435"},{"Name":"process","ID":"436"},{"Name":"process","ID":"437"},{"Name":"process","ID":"438"},{"Name":"process","ID":"439"},{"Name":"process","ID":"440"},{"Name":"process","ID":"441"},{"Name":"process","ID":"1011"},{"Name":"process","ID":"1116"},{"Name":"process","ID":"1122"},{"Name":"process","ID":"1628"},{"Name":"process","ID":"1638"},{"Name":"process","ID":"1670"},{"Name":"process","ID":"1702"},{"Name":"process","ID":"1708"},{"Name":"process","ID":"1723"},{"Name":"process","ID":"1743"},{"Name":"process","ID":"1754"},{"Name":"process","ID":"1803"},{"Name":"process","ID":"1823"},{"Name":"process","ID":"1850"},{"Name":"process","ID":"1871"},{"Name":"process","ID":"1886"},{"Name":"process","ID":"1921"},{"Name":"process","ID":"1936"},{"Name":"process","ID":"1953"},{"Name":"process","ID":"3166"},{"Name":"process","ID":"3186"},{"Name":"process","ID":"3208"},{"Name":"process","ID":"3228"},{"Name":"process","ID":"3242"},{"Name":"process","ID":"3264"},{"Name":"process","ID":"3391"},{"Name":"process","ID":"3411"},{"Name":"process","ID":"3438"},{"Name":"process","ID":"3459"},{"Name":"process","ID":"3529"},{"Name":"process","ID":"3551"},{"Name":"process","ID":"11504"},{"Name":"process","ID":"16206"},{"Name":"process","ID":"16211"},{"Name":"process","ID":"16220"},{"Name":"process","ID":"16229"},{"Name":"process","ID":"16233"},{"Name":"process","ID":"16251"},{"Name":"process","ID":"16314"},{"Name":"process","ID":"16317"},{"Name":"process","ID":"55460"},{"Name":"process","ID":"57503"},{"Name":"process","ID":"57741"},{"Name":"process","ID":"57742"},{"Name":"process","ID":"61098"},{"Name":"process","ID":"61100"},{"Name":"process","ID":"61104"},{"Name":"process","ID":"61111"},{"Name":"process","ID":"61113"},{"Name":"process","ID":"61116"},{"Name":"process","ID":"61117"},{"Name":"process","ID":"61118"},{"Name":"process","ID":"61188"}]}}},{"Resource":"user","ID":"user/0/root","Fields":{"gid":{"type":"\u0005","value":0},"name":{"type":"\u0007","value":"root"},"uid":{"type":"\u0005","value":0}}}]}]} \ No newline at end of file