From 3378039443d5462280974d9623dd8cf75253625d Mon Sep 17 00:00:00 2001 From: Teodora Sandu Date: Mon, 25 Mar 2024 14:55:42 +0000 Subject: [PATCH] refactor: use code-client-go without gaf --- application/di/init.go | 8 +++++--- go.mod | 2 +- go.sum | 2 ++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/application/di/init.go b/application/di/init.go index 5905b7d1e..cc6431a67 100644 --- a/application/di/init.go +++ b/application/di/init.go @@ -150,9 +150,11 @@ func initInfrastructure() { snykCodeClient = code.NewSnykCodeHTTPClient(codeInstrumentor, codeErrorReporter, networkAccess.GetHttpClient) snykCodeBundleUploader = code.NewBundler(snykCodeClient, codeInstrumentor) - httpClient := codeClientHTTP.NewHTTPClient(engine, networkAccess.GetHttpClient, codeInstrumentor, codeErrorReporter) - snykCode := codeClientDeepCode.NewSnykCodeClient(engine, httpClient, codeInstrumentor) - bundleManager := codeClientBundle.NewBundleManager(engine, snykCode, codeInstrumentor, codeErrorReporter) + httpClient := codeClientHTTP.NewHTTPClient(engine.GetLogger(), config.CurrentConfig(), + networkAccess.GetHttpClient, codeInstrumentor, + codeErrorReporter) + snykCode := codeClientDeepCode.NewSnykCodeClient(engine.GetLogger(), httpClient, codeInstrumentor) + bundleManager := codeClientBundle.NewBundleManager(engine.GetLogger(), snykCode, codeInstrumentor, codeErrorReporter) codeClientScanner := codeClient.NewCodeScanner( bundleManager, codeInstrumentor, diff --git a/go.mod b/go.mod index c6723a89d..c4319b94f 100644 --- a/go.mod +++ b/go.mod @@ -22,7 +22,7 @@ require ( github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 github.com/segmentio/analytics-go v3.1.0+incompatible github.com/shirou/gopsutil v3.21.11+incompatible - github.com/snyk/code-client-go v0.4.2 + github.com/snyk/code-client-go v1.0.0 github.com/snyk/go-application-framework v0.0.0-20240111143643-fa847b8a9a3b github.com/sourcegraph/go-lsp v0.0.0-20240223163137-f80c5dd31dfd github.com/stretchr/testify v1.8.4 diff --git a/go.sum b/go.sum index 0a8671a22..79e9c4080 100644 --- a/go.sum +++ b/go.sum @@ -309,6 +309,8 @@ github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1 github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/snyk/code-client-go v0.4.2 h1:xxdRgmvrJmIwEnJPv6Jzi4jnypsjN2j2gSkneRmgA4M= github.com/snyk/code-client-go v0.4.2/go.mod h1:h+4316SCrU7i2WzTYcEdwH8XxjJgGVWfuFXazXGG5VA= +github.com/snyk/code-client-go v1.0.0 h1:/EoDkXMSRahxhlGeGevIpe9y0y87+kQEhqresY4Vp7U= +github.com/snyk/code-client-go v1.0.0/go.mod h1:+1AS/NlWgDcyJcl/2yOPmrvMhg27Lh5uDCSOFWkdDsg= github.com/snyk/go-application-framework v0.0.0-20240111143643-fa847b8a9a3b h1:8fFjcaUZpjLV06AtIqtB7QRMYBH/5dxv2CJp319q2Gs= github.com/snyk/go-application-framework v0.0.0-20240111143643-fa847b8a9a3b/go.mod h1:Yz/qxFyfhf0xbA+z8Vzr5IM9IDG+BS+2PiGaP1yAsEw= github.com/snyk/go-httpauth v0.0.0-20240307114523-1f5ea3f55c65 h1:CEQuYv0Go6MEyRCD3YjLYM2u3Oxkx8GpCpFBd4rUTUk=