diff --git a/providers-sdk/v1/upstream/gql/client.go b/providers-sdk/v1/upstream/gql/client.go index cfec0ae131..f03a0d317c 100644 --- a/providers-sdk/v1/upstream/gql/client.go +++ b/providers-sdk/v1/upstream/gql/client.go @@ -18,7 +18,7 @@ type MondooClient struct { // NewClient creates a new GraphQL client for the Mondoo API // provide the http client used for rpc, to also pass in the proxy settings -func NewClient(upstream upstream.UpstreamConfig, httpClient *http.Client) (*MondooClient, error) { +func NewClient(upstream *upstream.UpstreamConfig, httpClient *http.Client) (*MondooClient, error) { gqlEndpoint := upstream.ApiEndpoint + "/query" creds, err := json.Marshal(upstream.Creds) if err != nil { diff --git a/providers/os/resources/asset_vuln.go b/providers/os/resources/asset_vuln.go index 278b9a3e08..359a2f6066 100644 --- a/providers/os/resources/asset_vuln.go +++ b/providers/os/resources/asset_vuln.go @@ -122,7 +122,7 @@ func getAdvisoryReport(runtime *plugin.Runtime) (*mvd.VulnReport, error) { } // get new gql client - mondooClient, err := gql.NewClient(mcc.UpstreamConfig, mcc.HttpClient) + mondooClient, err := gql.NewClient(&mcc.UpstreamConfig, mcc.HttpClient) if err != nil { return nil, err } diff --git a/providers/os/resources/vulnmgmt.go b/providers/os/resources/vulnmgmt.go index 7c74303f1f..85a095b28c 100644 --- a/providers/os/resources/vulnmgmt.go +++ b/providers/os/resources/vulnmgmt.go @@ -32,7 +32,7 @@ func (v *mqlVulnmgmt) lastAssessment() (*time.Time, error) { mondooClient = v.gqlClient } else { // get new gql client - mondooClient, err = gql.NewClient(mcc.UpstreamConfig, mcc.HttpClient) + mondooClient, err = gql.NewClient(&mcc.UpstreamConfig, mcc.HttpClient) if err != nil { return nil, err } @@ -203,7 +203,7 @@ func (v *mqlVulnmgmt) getReport() (*gql.VulnReport, error) { mondooClient = v.gqlClient } else { // get new gql client - mondooClient, err = gql.NewClient(mcc.UpstreamConfig, mcc.HttpClient) + mondooClient, err = gql.NewClient(&mcc.UpstreamConfig, mcc.HttpClient) if err != nil { return nil, err } diff --git a/providers/vsphere/resources/vulnmgmt.go b/providers/vsphere/resources/vulnmgmt.go index a2e6d5c9fa..c18a4d5649 100644 --- a/providers/vsphere/resources/vulnmgmt.go +++ b/providers/vsphere/resources/vulnmgmt.go @@ -32,7 +32,7 @@ func (v *mqlVulnmgmt) lastAssessment() (*time.Time, error) { mondooClient = v.gqlClient } else { // get new gql client - mondooClient, err = gql.NewClient(mcc.UpstreamConfig, mcc.HttpClient) + mondooClient, err = gql.NewClient(&mcc.UpstreamConfig, mcc.HttpClient) if err != nil { return nil, err } @@ -176,7 +176,7 @@ func (v *mqlVulnmgmt) getReport() (*gql.VulnReport, error) { mondooClient = v.gqlClient } else { // get new gql client - mondooClient, err = gql.NewClient(mcc.UpstreamConfig, mcc.HttpClient) + mondooClient, err = gql.NewClient(&mcc.UpstreamConfig, mcc.HttpClient) if err != nil { return nil, err }