From 24d903dcfa2e5d608284182fcf1316f918728398 Mon Sep 17 00:00:00 2001 From: Omer Zidkoni Date: Wed, 12 Jul 2023 14:43:23 +0300 Subject: [PATCH 01/34] Promoted version to 2.43.0 --- build/npm/v2-jf/package-lock.json | 2 +- build/npm/v2-jf/package.json | 2 +- build/npm/v2/package-lock.json | 2 +- build/npm/v2/package.json | 2 +- go.mod | 8 ++++---- go.sum | 13 ++++--------- utils/cliutils/cli_consts.go | 2 +- 7 files changed, 13 insertions(+), 18 deletions(-) diff --git a/build/npm/v2-jf/package-lock.json b/build/npm/v2-jf/package-lock.json index 6a02eeb2a..416e139e4 100644 --- a/build/npm/v2-jf/package-lock.json +++ b/build/npm/v2-jf/package-lock.json @@ -1,5 +1,5 @@ { "name": "jfrog-cli-v2-jf", - "version": "2.42.1", + "version": "2.43.0", "lockfileVersion": 1 } diff --git a/build/npm/v2-jf/package.json b/build/npm/v2-jf/package.json index eaef6b839..c669ef233 100644 --- a/build/npm/v2-jf/package.json +++ b/build/npm/v2-jf/package.json @@ -1,6 +1,6 @@ { "name": "jfrog-cli-v2-jf", - "version": "2.42.1", + "version": "2.43.0", "description": "🐸 Command-line interface for JFrog Artifactory, Xray, Distribution, Pipelines and Mission Control 🐸", "homepage": "https://github.com/jfrog/jfrog-cli", "preferGlobal": true, diff --git a/build/npm/v2/package-lock.json b/build/npm/v2/package-lock.json index 47f24e3de..1520f7b1a 100644 --- a/build/npm/v2/package-lock.json +++ b/build/npm/v2/package-lock.json @@ -1,5 +1,5 @@ { "name": "jfrog-cli-v2", - "version": "2.42.1", + "version": "2.43.0", "lockfileVersion": 1 } diff --git a/build/npm/v2/package.json b/build/npm/v2/package.json index 0c66a040e..2225f9679 100644 --- a/build/npm/v2/package.json +++ b/build/npm/v2/package.json @@ -1,6 +1,6 @@ { "name": "jfrog-cli-v2", - "version": "2.42.1", + "version": "2.43.0", "description": "🐸 Command-line interface for JFrog Artifactory, Xray, Distribution, Pipelines and Mission Control 🐸", "homepage": "https://github.com/jfrog/jfrog-cli", "preferGlobal": true, diff --git a/go.mod b/go.mod index 54ef69c82..36f39aade 100644 --- a/go.mod +++ b/go.mod @@ -9,8 +9,8 @@ require ( github.com/gocarina/gocsv v0.0.0-20230616125104-99d496ca653d github.com/jfrog/build-info-go v1.9.6 github.com/jfrog/gofrog v1.3.0 - github.com/jfrog/jfrog-cli-core/v2 v2.37.1 - github.com/jfrog/jfrog-client-go v1.31.0 + github.com/jfrog/jfrog-cli-core/v2 v2.38.0 + github.com/jfrog/jfrog-client-go v1.31.1 github.com/jszwec/csvutil v1.8.0 github.com/mholt/archiver/v3 v3.5.1 github.com/pkg/errors v0.9.1 @@ -123,8 +123,8 @@ require ( // replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go -replace github.com/jfrog/jfrog-cli-core/v2 => github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20230705084348-c7d33487e393 +// replace github.com/jfrog/jfrog-cli-core/v2 => github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20230705084348-c7d33487e393 // replace github.com/jfrog/gofrog => github.com/jfrog/gofrog v1.2.6-0.20230418122323-2bf299dd6d27 -replace github.com/jfrog/jfrog-client-go => github.com/jfrog/jfrog-client-go v1.28.1-0.20230705083849-6fd087a5e228 +// replace github.com/jfrog/jfrog-client-go => github.com/jfrog/jfrog-client-go v1.28.1-0.20230705083849-6fd087a5e228 diff --git a/go.sum b/go.sum index 4f993c508..e6f01b8bd 100644 --- a/go.sum +++ b/go.sum @@ -222,7 +222,6 @@ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5m github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gookit/color v1.5.3 h1:twfIhZs4QLCtimkP7MOxlF3A0U/5cDPseRT9M/+2SCE= github.com/gookit/color v1.5.3/go.mod h1:NUzwzeehUfl7GIb36pqId+UGmRfQcU/WiiyTTeNjHtE= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= @@ -239,10 +238,10 @@ github.com/jfrog/build-info-go v1.9.6 h1:lCJ2j5uXAlJsSwDe5J8WD7Co1f/hUlZvMfwfb5A github.com/jfrog/build-info-go v1.9.6/go.mod h1:GbuFS+viHCKZYx9nWHYu7ab1DgQkFdtVN3BJPUNb2D4= github.com/jfrog/gofrog v1.3.0 h1:o4zgsBZE4QyDbz2M7D4K6fXPTBJht+8lE87mS9bw7Gk= github.com/jfrog/gofrog v1.3.0/go.mod h1:IFMc+V/yf7rA5WZ74CSbXe+Lgf0iApEQLxRZVzKRUR0= -github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20230705084348-c7d33487e393 h1:zIaBtAjalQ7HLwiYcR3OSU9Jglpmhtw8rg6piYervNU= -github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20230705084348-c7d33487e393/go.mod h1:DnamqHWhKmrmWlCRG3i3z8Wn0JRtNFMC+Bu8TCFzSPY= -github.com/jfrog/jfrog-client-go v1.28.1-0.20230705083849-6fd087a5e228 h1:bkOkjb6sVqo6Jgw9eYSH58jIFPOJvFvwt+jIXvef7QM= -github.com/jfrog/jfrog-client-go v1.28.1-0.20230705083849-6fd087a5e228/go.mod h1:qEJxoe68sUtqHJ1YhXv/7pKYP/9p1D5tJrruzJKYeoI= +github.com/jfrog/jfrog-cli-core/v2 v2.38.0 h1:lHylMjp0+IbZAUKVWi++keVktpyvI/0UwewIdbCoI/A= +github.com/jfrog/jfrog-cli-core/v2 v2.38.0/go.mod h1:Ws5UvSUITSZGuVVNNb/lDFPG0UAyiwpKv5o86M8By9I= +github.com/jfrog/jfrog-client-go v1.31.1 h1:lmunA5ZpRsrWTXgEGvnvVPIfwEqB3gn6+eVNpV2VBzU= +github.com/jfrog/jfrog-client-go v1.31.1/go.mod h1:qEJxoe68sUtqHJ1YhXv/7pKYP/9p1D5tJrruzJKYeoI= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jszwec/csvutil v1.8.0 h1:G7vS2LGdpZZDH1HmHeNbxOaJ/ZnJlpwGFvOkTkJzzNk= @@ -742,8 +741,6 @@ google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef h1:uQ2vjV/sHTsWSqdKeLqmwitzgvjMl7o4IdtHwUDXSJY= -google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f h1:BWUVssLB0HVOSY78gIdvk1dTVYtT1y8SBWtPYuTJ/6w= google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= @@ -762,8 +759,6 @@ google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.52.0 h1:kd48UiU7EHsV4rnLyOJRuP/Il/UHE7gdDAQ+SZI7nZk= -google.golang.org/grpc v1.52.0/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= google.golang.org/grpc v1.53.0 h1:LAv2ds7cmFV/XTS3XG1NneeENYrXGmorPxsBbptIjNc= google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= diff --git a/utils/cliutils/cli_consts.go b/utils/cliutils/cli_consts.go index 9ce4b4c2c..79b624260 100644 --- a/utils/cliutils/cli_consts.go +++ b/utils/cliutils/cli_consts.go @@ -4,7 +4,7 @@ import "time" const ( // General CLI constants - CliVersion = "2.42.1" + CliVersion = "2.43.0" ClientAgent = "jfrog-cli-go" // CLI base commands constants: From f89c9d426bff0ffbcd835727fa6fbaf477be3922 Mon Sep 17 00:00:00 2001 From: delarea Date: Tue, 15 Aug 2023 16:02:40 +0300 Subject: [PATCH 02/34] Refactor to interface --- general/cisetup/utils.go | 6 +++--- go.mod | 6 +++--- go.sum | 4 ---- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/general/cisetup/utils.go b/general/cisetup/utils.go index 94e025169..508dc258b 100644 --- a/general/cisetup/utils.go +++ b/general/cisetup/utils.go @@ -6,7 +6,7 @@ import ( "github.com/jfrog/jfrog-cli-core/v2/utils/coreutils" "github.com/jfrog/jfrog-client-go/artifactory/services" "github.com/jfrog/jfrog-client-go/config" - "github.com/jfrog/jfrog-client-go/xray" + "github.com/jfrog/jfrog-client-go/xray/manager" ) const ( @@ -24,7 +24,7 @@ var buildCmdByTech = map[coreutils.Technology]string{ coreutils.Npm: npmDefaultBuildCmd, } -func CreateXrayServiceManager(serviceDetails *utilsconfig.ServerDetails) (*xray.XrayServicesManager, error) { +func CreateXrayServiceManager(serviceDetails *utilsconfig.ServerDetails) (manager.SecurityServiceManager, error) { xrayDetails, err := serviceDetails.CreateXrayAuthConfig() if err != nil { return nil, err @@ -35,7 +35,7 @@ func CreateXrayServiceManager(serviceDetails *utilsconfig.ServerDetails) (*xray. if err != nil { return nil, err } - return xray.New(serviceConfig) + return manager.New(serviceConfig) } func GetAllRepos(serviceDetails *utilsconfig.ServerDetails, repoType, packageType string) (*[]services.RepositoryDetails, error) { diff --git a/go.mod b/go.mod index 0a2d89ab6..2142f043e 100644 --- a/go.mod +++ b/go.mod @@ -126,8 +126,8 @@ require ( // replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20230803131422-8230595ceb86 -// replace github.com/jfrog/jfrog-cli-core/v2 => github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20230803144835-5e55e9527c77 +replace github.com/jfrog/jfrog-cli-core/v2 => ../jfrog-cli-core -// replace github.com/jfrog/gofrog => github.com/jfrog/gofrog v1.2.6-0.20230418122323-2bf299dd6d27 +replace github.com/jfrog/jfrog-client-go => ../jfrog-client-go -// replace github.com/jfrog/jfrog-client-go => github.com/jfrog/jfrog-client-go v1.28.1-0.20230803140217-0a5f43783ae8 +// replace github.com/jfrog/gofrog => github.com/jfrog/gofrog v1.2.6-0.20230418122323-2bf299dd6d27 diff --git a/go.sum b/go.sum index 3958f7d01..241cf56c1 100644 --- a/go.sum +++ b/go.sum @@ -242,10 +242,6 @@ github.com/jfrog/build-info-go v1.9.7 h1:WyOYyHmw/LEENdvHDbSM4yNp0rU4tnj9SKJ4t6k github.com/jfrog/build-info-go v1.9.7/go.mod h1:PkSKcqdz/L4JnNo51rXTeZtCWHVDLu0O0KiQHXagqc4= github.com/jfrog/gofrog v1.3.0 h1:o4zgsBZE4QyDbz2M7D4K6fXPTBJht+8lE87mS9bw7Gk= github.com/jfrog/gofrog v1.3.0/go.mod h1:IFMc+V/yf7rA5WZ74CSbXe+Lgf0iApEQLxRZVzKRUR0= -github.com/jfrog/jfrog-cli-core/v2 v2.40.0 h1:HOnH8MkFCKrtu29lEWJOdCKtNnqd6VLn68Fkv/0zsBM= -github.com/jfrog/jfrog-cli-core/v2 v2.40.0/go.mod h1:B57WGtQVl/Xv4eznGZ7Kqm9h56unNQIOZq/2OhRnunQ= -github.com/jfrog/jfrog-client-go v1.31.4 h1:jUKwQ68yBBHQlwNzN6bY8sh1Ey8PbqOqh9mzkzp+yHc= -github.com/jfrog/jfrog-client-go v1.31.4/go.mod h1:Yyz+Qjorop0CycJAjk67y6UbyLK5b7dQaPMcy1THIJw= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jszwec/csvutil v1.8.0 h1:G7vS2LGdpZZDH1HmHeNbxOaJ/ZnJlpwGFvOkTkJzzNk= From 91e9bffde2647c8d1f8eb6a32ca573a859d1efb9 Mon Sep 17 00:00:00 2001 From: delarea Date: Tue, 15 Aug 2023 17:32:46 +0300 Subject: [PATCH 03/34] Split scan service --- xray_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/xray_test.go b/xray_test.go index 961ede245..9e744f4b1 100644 --- a/xray_test.go +++ b/xray_test.go @@ -5,6 +5,7 @@ import ( "errors" "flag" "fmt" + scan2 "github.com/jfrog/jfrog-client-go/xray/scan" "net/http" "net/http/httptest" "os" @@ -39,7 +40,6 @@ import ( clientUtils "github.com/jfrog/jfrog-client-go/utils" "github.com/jfrog/jfrog-client-go/utils/io/fileutils" clientTestUtils "github.com/jfrog/jfrog-client-go/utils/tests" - "github.com/jfrog/jfrog-client-go/xray/services" xrayUtils "github.com/jfrog/jfrog-client-go/xray/services/utils" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -491,12 +491,12 @@ func getXrayVersion() (version.Version, error) { } func verifyJsonScanResults(t *testing.T, content string, minViolations, minVulnerabilities, minLicenses int) { - var results []services.ScanResponse + var results []scan2.ScanResponse err := json.Unmarshal([]byte(content), &results) if assert.NoError(t, err) { - var violations []services.Violation - var vulnerabilities []services.Vulnerability - var licenses []services.License + var violations []scan2.Violation + var vulnerabilities []scan2.Vulnerability + var licenses []scan2.License for _, result := range results { violations = append(violations, result.Violations...) vulnerabilities = append(vulnerabilities, result.Vulnerabilities...) From b1ef9b67e79a8fa580dd9f994d59a554feb507a6 Mon Sep 17 00:00:00 2001 From: delarea Date: Wed, 16 Aug 2023 11:24:54 +0300 Subject: [PATCH 04/34] Working XSC call --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 2142f043e..b816e13b0 100644 --- a/go.mod +++ b/go.mod @@ -111,7 +111,7 @@ require ( github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 // indirect golang.org/x/crypto v0.11.0 // indirect golang.org/x/mod v0.11.0 // indirect - golang.org/x/net v0.12.0 // indirect + golang.org/x/net v0.13.0 // indirect golang.org/x/sync v0.2.0 // indirect golang.org/x/sys v0.10.0 // indirect golang.org/x/text v0.11.0 // indirect diff --git a/go.sum b/go.sum index 241cf56c1..c6aa22255 100644 --- a/go.sum +++ b/go.sum @@ -508,8 +508,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= -golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/net v0.13.0 h1:Nvo8UFsZ8X3BhAC9699Z1j7XQ3rsZnUUm7jfBEk1ueY= +golang.org/x/net v0.13.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= From 718c0c2f4270e4928b1821412335550d465a9c24 Mon Sep 17 00:00:00 2001 From: delarea Date: Thu, 17 Aug 2023 10:43:41 +0300 Subject: [PATCH 05/34] update go.mod --- go.mod | 4 ++-- go.sum | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index b816e13b0..443a9540d 100644 --- a/go.mod +++ b/go.mod @@ -126,8 +126,8 @@ require ( // replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20230803131422-8230595ceb86 -replace github.com/jfrog/jfrog-cli-core/v2 => ../jfrog-cli-core +replace github.com/jfrog/jfrog-cli-core/v2 => github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230817074018-c845f56d8fbf -replace github.com/jfrog/jfrog-client-go => ../jfrog-client-go +replace github.com/jfrog/jfrog-client-go => github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230817073627-b882364d9b16 // replace github.com/jfrog/gofrog => github.com/jfrog/gofrog v1.2.6-0.20230418122323-2bf299dd6d27 diff --git a/go.sum b/go.sum index c6aa22255..68d90cfca 100644 --- a/go.sum +++ b/go.sum @@ -133,6 +133,10 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230817074018-c845f56d8fbf h1:Sb1gLtOsME8qmvboSrfrwRsKgiFe+LLgdSiARnA8mGw= +github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230817074018-c845f56d8fbf/go.mod h1:quFK9IZWDYry4jXeaLaCZxnRc/9TnvgsYBnzvgRWEtQ= +github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230817073627-b882364d9b16 h1:CyXfmPBZe8LNd1kpykQP1QDsvspEXBk+9BoEB4x3iHU= +github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230817073627-b882364d9b16/go.mod h1:cstHMVqu11rn4TadtCBHrcuL+KcJ94kjSmMQSWMB61I= github.com/forPelevin/gomoji v1.1.8 h1:JElzDdt0TyiUlecy6PfITDL6eGvIaxqYH1V52zrd0qQ= github.com/forPelevin/gomoji v1.1.8/go.mod h1:8+Z3KNGkdslmeGZBC3tCrwMrcPy5GRzAD+gL9NAwMXg= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= From feaf222e6ab0127daa186a7b952026252e7858f4 Mon Sep 17 00:00:00 2001 From: delarea Date: Thu, 17 Aug 2023 13:33:43 +0300 Subject: [PATCH 06/34] Handle XSC/XRAY url provided from flags and config. --- utils/cliutils/utils.go | 2 ++ utils/tests/utils.go | 7 +++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/utils/cliutils/utils.go b/utils/cliutils/utils.go index d8f3044fb..243b9dc43 100644 --- a/utils/cliutils/utils.go +++ b/utils/cliutils/utils.go @@ -364,6 +364,7 @@ func ShouldOfferConfig() (bool, error) { func CreateServerDetailsFromFlags(c *cli.Context) (details *coreConfig.ServerDetails, err error) { details = new(coreConfig.ServerDetails) details.Url = clientutils.AddTrailingSlashIfNeeded(c.String(url)) + details.XscUrl = clientutils.GenerateXscUrl(details.Url) details.ArtifactoryUrl = clientutils.AddTrailingSlashIfNeeded(c.String(configRtUrl)) details.DistributionUrl = clientutils.AddTrailingSlashIfNeeded(c.String(configDistUrl)) details.XrayUrl = clientutils.AddTrailingSlashIfNeeded(c.String(configXrUrl)) @@ -506,6 +507,7 @@ func CreateServerDetailsWithConfigOffer(c *cli.Context, excludeRefreshableTokens // Take insecureTls value from options since it is not saved in config. confDetails.InsecureTls = details.InsecureTls confDetails.Url = clientutils.AddTrailingSlashIfNeeded(confDetails.Url) + confDetails.XscUrl = clientutils.AddTrailingSlashIfNeeded(confDetails.Url + coreConfig.XscServiceAPI) confDetails.DistributionUrl = clientutils.AddTrailingSlashIfNeeded(confDetails.DistributionUrl) // Create initial access token if needed. diff --git a/utils/tests/utils.go b/utils/tests/utils.go index d5ab82381..9f374bcce 100644 --- a/utils/tests/utils.go +++ b/utils/tests/utils.go @@ -36,7 +36,6 @@ import ( "github.com/jfrog/jfrog-client-go/utils/errorutils" "github.com/jfrog/jfrog-client-go/utils/io/fileutils" "github.com/jfrog/jfrog-client-go/utils/log" - "github.com/jfrog/jfrog-client-go/utils/tests" "github.com/stretchr/testify/assert" ) @@ -78,12 +77,12 @@ var ( ) func init() { - JfrogUrl = flag.String("jfrog.url", "http://localhost:8081/", "JFrog platform url") + JfrogUrl = flag.String("jfrog.url", "https://xsceco1308.jfrogdev.org/", "JFrog platform url") JfrogUser = flag.String("jfrog.user", "admin", "JFrog platform username") JfrogPassword = flag.String("jfrog.password", "password", "JFrog platform password") JfrogSshKeyPath = flag.String("jfrog.sshKeyPath", "", "Ssh key file path") JfrogSshPassphrase = flag.String("jfrog.sshPassphrase", "", "Ssh key passphrase") - JfrogAccessToken = flag.String("jfrog.adminToken", tests.GetLocalArtifactoryTokenIfNeeded(*JfrogUrl), "JFrog platform admin token") + JfrogAccessToken = flag.String("jfrog.adminToken", "cmVmdGtuOjAxOjE3MjM0NjcxODU6NmRwYUZhY2k2QUdOUmdoYmtzMTJ1TmNOc1pC", "JFrog platform admin token") JfrogTargetUrl = flag.String("jfrog.targetUrl", "", "JFrog target platform url for transfer tests") JfrogTargetAccessToken = flag.String("jfrog.targetAdminToken", "", "JFrog target platform admin token for transfer tests") JfrogHome = flag.String("jfrog.home", "", "The JFrog home directory of the local Artifactory installation") @@ -103,7 +102,7 @@ func init() { TestPipenv = flag.Bool("test.pipenv", false, "Test Pipenv") TestPoetry = flag.Bool("test.poetry", false, "Test Poetry") TestPlugins = flag.Bool("test.plugins", false, "Test Plugins") - TestXray = flag.Bool("test.xray", false, "Test Xray") + TestXray = flag.Bool("test.xray", true, "Test Xray") TestAccess = flag.Bool("test.access", false, "Test Access") TestTransfer = flag.Bool("test.transfer", false, "Test files transfer") TestLifecycle = flag.Bool("test.lc", false, "Test lifecycle") From 52cec1e4f9a659855b4923121c032db054d5e49f Mon Sep 17 00:00:00 2001 From: delarea Date: Thu, 17 Aug 2023 13:43:45 +0300 Subject: [PATCH 07/34] update go.mod --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 443a9540d..036de1cdd 100644 --- a/go.mod +++ b/go.mod @@ -126,8 +126,8 @@ require ( // replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20230803131422-8230595ceb86 -replace github.com/jfrog/jfrog-cli-core/v2 => github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230817074018-c845f56d8fbf +replace github.com/jfrog/jfrog-cli-core/v2 => github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230817104149-2703ea916b81 -replace github.com/jfrog/jfrog-client-go => github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230817073627-b882364d9b16 +replace github.com/jfrog/jfrog-client-go => github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230817103343-692ffe557494 // replace github.com/jfrog/gofrog => github.com/jfrog/gofrog v1.2.6-0.20230418122323-2bf299dd6d27 diff --git a/go.sum b/go.sum index 68d90cfca..2600af268 100644 --- a/go.sum +++ b/go.sum @@ -133,10 +133,10 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230817074018-c845f56d8fbf h1:Sb1gLtOsME8qmvboSrfrwRsKgiFe+LLgdSiARnA8mGw= -github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230817074018-c845f56d8fbf/go.mod h1:quFK9IZWDYry4jXeaLaCZxnRc/9TnvgsYBnzvgRWEtQ= -github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230817073627-b882364d9b16 h1:CyXfmPBZe8LNd1kpykQP1QDsvspEXBk+9BoEB4x3iHU= -github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230817073627-b882364d9b16/go.mod h1:cstHMVqu11rn4TadtCBHrcuL+KcJ94kjSmMQSWMB61I= +github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230817104149-2703ea916b81 h1:llm+72awuzRFs8nujeBAX78FQSCrmByHvQh0v5wuvy4= +github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230817104149-2703ea916b81/go.mod h1:rbISfuVXR8BRhRifNKOlDRHwBuL1RASwrbJJtTyraTU= +github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230817103343-692ffe557494 h1:AyWbWVKnQOEtQWgprXafERGNa6wsZ4qfUxW9ca+djDI= +github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230817103343-692ffe557494/go.mod h1:cstHMVqu11rn4TadtCBHrcuL+KcJ94kjSmMQSWMB61I= github.com/forPelevin/gomoji v1.1.8 h1:JElzDdt0TyiUlecy6PfITDL6eGvIaxqYH1V52zrd0qQ= github.com/forPelevin/gomoji v1.1.8/go.mod h1:8+Z3KNGkdslmeGZBC3tCrwMrcPy5GRzAD+gL9NAwMXg= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= From ffbaad3c4fc403048d857a49faa9c7880b42cfb6 Mon Sep 17 00:00:00 2001 From: delarea Date: Thu, 17 Aug 2023 14:52:15 +0300 Subject: [PATCH 08/34] Refactor --- go.mod | 4 ++-- go.sum | 8 ++++---- utils/cliutils/utils.go | 2 +- utils/tests/utils.go | 7 ++++--- xray_test.go | 12 ++++++------ 5 files changed, 17 insertions(+), 16 deletions(-) diff --git a/go.mod b/go.mod index 036de1cdd..9f0b78874 100644 --- a/go.mod +++ b/go.mod @@ -126,8 +126,8 @@ require ( // replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20230803131422-8230595ceb86 -replace github.com/jfrog/jfrog-cli-core/v2 => github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230817104149-2703ea916b81 +replace github.com/jfrog/jfrog-cli-core/v2 => github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230817114755-15b1b89659e0 -replace github.com/jfrog/jfrog-client-go => github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230817103343-692ffe557494 +replace github.com/jfrog/jfrog-client-go => github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230817113235-a9a7d9244926 // replace github.com/jfrog/gofrog => github.com/jfrog/gofrog v1.2.6-0.20230418122323-2bf299dd6d27 diff --git a/go.sum b/go.sum index 2600af268..560cd0bb3 100644 --- a/go.sum +++ b/go.sum @@ -133,10 +133,10 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230817104149-2703ea916b81 h1:llm+72awuzRFs8nujeBAX78FQSCrmByHvQh0v5wuvy4= -github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230817104149-2703ea916b81/go.mod h1:rbISfuVXR8BRhRifNKOlDRHwBuL1RASwrbJJtTyraTU= -github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230817103343-692ffe557494 h1:AyWbWVKnQOEtQWgprXafERGNa6wsZ4qfUxW9ca+djDI= -github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230817103343-692ffe557494/go.mod h1:cstHMVqu11rn4TadtCBHrcuL+KcJ94kjSmMQSWMB61I= +github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230817114755-15b1b89659e0 h1:zz7v7VZ20WBqW5yzUTF7YQU1VfFMKleVpc185ZKOxGo= +github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230817114755-15b1b89659e0/go.mod h1:TbQQUiP4SJYk/fSTrxISOZ5JWW9qqPw4T+GY949E7j0= +github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230817113235-a9a7d9244926 h1:kiN5+0w1SNtWjpphFlX2uaRCTFg3oj1m0q3RtKE5WqQ= +github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230817113235-a9a7d9244926/go.mod h1:cstHMVqu11rn4TadtCBHrcuL+KcJ94kjSmMQSWMB61I= github.com/forPelevin/gomoji v1.1.8 h1:JElzDdt0TyiUlecy6PfITDL6eGvIaxqYH1V52zrd0qQ= github.com/forPelevin/gomoji v1.1.8/go.mod h1:8+Z3KNGkdslmeGZBC3tCrwMrcPy5GRzAD+gL9NAwMXg= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= diff --git a/utils/cliutils/utils.go b/utils/cliutils/utils.go index 243b9dc43..9f4d348b3 100644 --- a/utils/cliutils/utils.go +++ b/utils/cliutils/utils.go @@ -364,7 +364,7 @@ func ShouldOfferConfig() (bool, error) { func CreateServerDetailsFromFlags(c *cli.Context) (details *coreConfig.ServerDetails, err error) { details = new(coreConfig.ServerDetails) details.Url = clientutils.AddTrailingSlashIfNeeded(c.String(url)) - details.XscUrl = clientutils.GenerateXscUrl(details.Url) + details.XscUrl = clientutils.ReplaceXraySuffixWithXsc(details.Url) details.ArtifactoryUrl = clientutils.AddTrailingSlashIfNeeded(c.String(configRtUrl)) details.DistributionUrl = clientutils.AddTrailingSlashIfNeeded(c.String(configDistUrl)) details.XrayUrl = clientutils.AddTrailingSlashIfNeeded(c.String(configXrUrl)) diff --git a/utils/tests/utils.go b/utils/tests/utils.go index 9f374bcce..c6b847dd3 100644 --- a/utils/tests/utils.go +++ b/utils/tests/utils.go @@ -7,6 +7,7 @@ import ( "errors" "flag" "fmt" + "github.com/jfrog/jfrog-client-go/utils/tests" "io" "math/rand" "os" @@ -77,12 +78,12 @@ var ( ) func init() { - JfrogUrl = flag.String("jfrog.url", "https://xsceco1308.jfrogdev.org/", "JFrog platform url") + JfrogUrl = flag.String("jfrog.url", "http://localhost:8081/", "JFrog platform url") JfrogUser = flag.String("jfrog.user", "admin", "JFrog platform username") JfrogPassword = flag.String("jfrog.password", "password", "JFrog platform password") JfrogSshKeyPath = flag.String("jfrog.sshKeyPath", "", "Ssh key file path") JfrogSshPassphrase = flag.String("jfrog.sshPassphrase", "", "Ssh key passphrase") - JfrogAccessToken = flag.String("jfrog.adminToken", "cmVmdGtuOjAxOjE3MjM0NjcxODU6NmRwYUZhY2k2QUdOUmdoYmtzMTJ1TmNOc1pC", "JFrog platform admin token") + JfrogAccessToken = flag.String("jfrog.adminToken", tests.GetLocalArtifactoryTokenIfNeeded(*JfrogUrl), "JFrog platform admin token") JfrogTargetUrl = flag.String("jfrog.targetUrl", "", "JFrog target platform url for transfer tests") JfrogTargetAccessToken = flag.String("jfrog.targetAdminToken", "", "JFrog target platform admin token for transfer tests") JfrogHome = flag.String("jfrog.home", "", "The JFrog home directory of the local Artifactory installation") @@ -102,7 +103,7 @@ func init() { TestPipenv = flag.Bool("test.pipenv", false, "Test Pipenv") TestPoetry = flag.Bool("test.poetry", false, "Test Poetry") TestPlugins = flag.Bool("test.plugins", false, "Test Plugins") - TestXray = flag.Bool("test.xray", true, "Test Xray") + TestXray = flag.Bool("test.xray", false, "Test Xray") TestAccess = flag.Bool("test.access", false, "Test Access") TestTransfer = flag.Bool("test.transfer", false, "Test files transfer") TestLifecycle = flag.Bool("test.lc", false, "Test lifecycle") diff --git a/xray_test.go b/xray_test.go index 9e744f4b1..5dba69cc1 100644 --- a/xray_test.go +++ b/xray_test.go @@ -5,7 +5,7 @@ import ( "errors" "flag" "fmt" - scan2 "github.com/jfrog/jfrog-client-go/xray/scan" + xrayScan "github.com/jfrog/jfrog-client-go/xray/scan" "net/http" "net/http/httptest" "os" @@ -59,7 +59,7 @@ func InitXrayTests() { func authenticateXray() string { *tests.JfrogUrl = clientUtils.AddTrailingSlashIfNeeded(*tests.JfrogUrl) - xrayDetails = &config.ServerDetails{XrayUrl: *tests.JfrogUrl + tests.XrayEndpoint} + xrayDetails = &config.ServerDetails{Url: *tests.JfrogUrl, XrayUrl: *tests.JfrogUrl + tests.XrayEndpoint} cred := fmt.Sprintf("--url=%s", xrayDetails.XrayUrl) if *tests.JfrogAccessToken != "" { xrayDetails.AccessToken = *tests.JfrogAccessToken @@ -491,12 +491,12 @@ func getXrayVersion() (version.Version, error) { } func verifyJsonScanResults(t *testing.T, content string, minViolations, minVulnerabilities, minLicenses int) { - var results []scan2.ScanResponse + var results []xrayScan.ScanResponse err := json.Unmarshal([]byte(content), &results) if assert.NoError(t, err) { - var violations []scan2.Violation - var vulnerabilities []scan2.Vulnerability - var licenses []scan2.License + var violations []xrayScan.Violation + var vulnerabilities []xrayScan.Vulnerability + var licenses []xrayScan.License for _, result := range results { violations = append(violations, result.Violations...) vulnerabilities = append(vulnerabilities, result.Vulnerabilities...) From a14747ef72c72dc5910e2a776f1b07738d167ee4 Mon Sep 17 00:00:00 2001 From: delarea Date: Sun, 20 Aug 2023 21:01:29 +0300 Subject: [PATCH 09/34] update deps --- go.mod | 40 +++++++++++++-------------- go.sum | 86 +++++++++++++++++++++++++++++----------------------------- 2 files changed, 63 insertions(+), 63 deletions(-) diff --git a/go.mod b/go.mod index 9f0b78874..b161e02fe 100644 --- a/go.mod +++ b/go.mod @@ -18,8 +18,8 @@ require ( github.com/urfave/cli v1.22.14 github.com/vbauerster/mpb/v7 v7.5.3 github.com/xeipuuv/gojsonschema v1.2.0 - golang.org/x/exp v0.0.0-20230801115018-d63ba01acd4b - golang.org/x/term v0.10.0 + golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 + golang.org/x/term v0.11.0 gopkg.in/yaml.v2 v2.4.0 ) @@ -56,7 +56,7 @@ require ( github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v4 v4.5.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.2 // indirect + github.com/golang/protobuf v1.5.3 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/uuid v1.3.0 // indirect github.com/gookit/color v1.5.4 // indirect @@ -84,8 +84,8 @@ require ( github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0-rc2 // indirect github.com/opencontainers/runc v1.1.5 // indirect - github.com/owenrumney/go-sarif/v2 v2.1.3 // indirect - github.com/pelletier/go-toml/v2 v2.0.6 // indirect + github.com/owenrumney/go-sarif/v2 v2.2.0 // indirect + github.com/pelletier/go-toml/v2 v2.0.8 // indirect github.com/pierrec/lz4/v4 v4.1.15 // indirect github.com/pjbgf/sha1cd v0.3.0 // indirect github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect @@ -97,11 +97,11 @@ require ( github.com/sergi/go-diff v1.1.0 // indirect github.com/sirupsen/logrus v1.9.0 // indirect github.com/skeema/knownhosts v1.2.0 // indirect - github.com/spf13/afero v1.9.3 // indirect - github.com/spf13/cast v1.5.0 // indirect + github.com/spf13/afero v1.9.5 // indirect + github.com/spf13/cast v1.5.1 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/spf13/viper v1.15.0 // indirect + github.com/spf13/viper v1.16.0 // indirect github.com/subosito/gotenv v1.4.2 // indirect github.com/ulikunitz/xz v0.5.9 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect @@ -109,16 +109,16 @@ require ( github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 // indirect - golang.org/x/crypto v0.11.0 // indirect - golang.org/x/mod v0.11.0 // indirect - golang.org/x/net v0.13.0 // indirect - golang.org/x/sync v0.2.0 // indirect - golang.org/x/sys v0.10.0 // indirect - golang.org/x/text v0.11.0 // indirect - golang.org/x/tools v0.7.0 // indirect - google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef // indirect - google.golang.org/grpc v1.52.0 // indirect - google.golang.org/protobuf v1.28.1 // indirect + golang.org/x/crypto v0.12.0 // indirect + golang.org/x/mod v0.12.0 // indirect + golang.org/x/net v0.14.0 // indirect + golang.org/x/sync v0.3.0 // indirect + golang.org/x/sys v0.11.0 // indirect + golang.org/x/text v0.12.0 // indirect + golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846 // indirect + google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect + google.golang.org/grpc v1.55.0 // indirect + google.golang.org/protobuf v1.30.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect @@ -126,8 +126,8 @@ require ( // replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20230803131422-8230595ceb86 -replace github.com/jfrog/jfrog-cli-core/v2 => github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230817114755-15b1b89659e0 +replace github.com/jfrog/jfrog-cli-core/v2 => github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230820175937-54e9636a2429 -replace github.com/jfrog/jfrog-client-go => github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230817113235-a9a7d9244926 +replace github.com/jfrog/jfrog-client-go => github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230820174719-94e1af28594e // replace github.com/jfrog/gofrog => github.com/jfrog/gofrog v1.2.6-0.20230418122323-2bf299dd6d27 diff --git a/go.sum b/go.sum index 560cd0bb3..b46957c79 100644 --- a/go.sum +++ b/go.sum @@ -133,14 +133,14 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230817114755-15b1b89659e0 h1:zz7v7VZ20WBqW5yzUTF7YQU1VfFMKleVpc185ZKOxGo= -github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230817114755-15b1b89659e0/go.mod h1:TbQQUiP4SJYk/fSTrxISOZ5JWW9qqPw4T+GY949E7j0= -github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230817113235-a9a7d9244926 h1:kiN5+0w1SNtWjpphFlX2uaRCTFg3oj1m0q3RtKE5WqQ= -github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230817113235-a9a7d9244926/go.mod h1:cstHMVqu11rn4TadtCBHrcuL+KcJ94kjSmMQSWMB61I= +github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230820175937-54e9636a2429 h1:B5mamorfJE4YJNT8qYVMWqVbtHzbaRNo+wddud726Io= +github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230820175937-54e9636a2429/go.mod h1:eA8rxc4TZKwYAZEgM7ZzL+wTyQrdxv9uXLeWO0IG95s= +github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230820174719-94e1af28594e h1:zj2O3bFMukOejV/eIcYwD1pxnnHz5NomBbhPzjxru7o= +github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230820174719-94e1af28594e/go.mod h1:cstHMVqu11rn4TadtCBHrcuL+KcJ94kjSmMQSWMB61I= github.com/forPelevin/gomoji v1.1.8 h1:JElzDdt0TyiUlecy6PfITDL6eGvIaxqYH1V52zrd0qQ= github.com/forPelevin/gomoji v1.1.8/go.mod h1:8+Z3KNGkdslmeGZBC3tCrwMrcPy5GRzAD+gL9NAwMXg= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= -github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= +github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY= @@ -190,8 +190,8 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.2/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= @@ -321,10 +321,10 @@ github.com/opencontainers/runc v1.1.5/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJ github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= github.com/owenrumney/go-sarif v1.1.1/go.mod h1:dNDiPlF04ESR/6fHlPyq7gHKmrM0sHUvAGjsoh8ZH0U= -github.com/owenrumney/go-sarif/v2 v2.1.3 h1:1guchw824yg1CwjredY8pnzcE0SG+sfNzFY5CUYWgE4= -github.com/owenrumney/go-sarif/v2 v2.1.3/go.mod h1:MSqMMx9WqlBSY7pXoOZWgEsVB4FDNfhcaXDA1j6Sr+w= -github.com/pelletier/go-toml/v2 v2.0.6 h1:nrzqCb7j9cDFj2coyLNLaZuJTLjWjlaz6nvTvIwycIU= -github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= +github.com/owenrumney/go-sarif/v2 v2.2.0 h1:1DmZaijK0HBZCR1fgcDSGa7VzYkU9NDmbZ7qC2QfUjE= +github.com/owenrumney/go-sarif/v2 v2.2.0/go.mod h1:MSqMMx9WqlBSY7pXoOZWgEsVB4FDNfhcaXDA1j6Sr+w= +github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= +github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= github.com/pierrec/lz4/v4 v4.1.2/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pierrec/lz4/v4 v4.1.15 h1:MO0/ucJhngq7299dKLwIMtgTfbkoSPF6AoMYDd8Q4q0= github.com/pierrec/lz4/v4 v4.1.15/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= @@ -359,16 +359,16 @@ github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0 github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/skeema/knownhosts v1.2.0 h1:h9r9cf0+u7wSE+M183ZtMGgOJKiL96brpaz5ekfJCpM= github.com/skeema/knownhosts v1.2.0/go.mod h1:g4fPeYpque7P0xefxtGzV81ihjC8sX2IqpAoNkjxbMo= -github.com/spf13/afero v1.9.3 h1:41FoI0fD7OR7mGcKE/aOiLkGreyf8ifIOQmJANWogMk= -github.com/spf13/afero v1.9.3/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= -github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= -github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= +github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= +github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= +github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= +github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.15.0 h1:js3yy885G8xwJa6iOISGFwd+qlUo5AvyXb7CiihdtiU= -github.com/spf13/viper v1.15.0/go.mod h1:fFcTBJxvhhzSJiZy8n+PeW6t8l+KeT/uTARa0jHOQLA= +github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc= +github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= @@ -380,7 +380,7 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.4/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= @@ -431,12 +431,12 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= -golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= +golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= +golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -447,8 +447,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20230801115018-d63ba01acd4b h1:r+vk0EmXNmekl0S0BascoeeoHk/L7wmaW2QF90K+kYI= -golang.org/x/exp v0.0.0-20230801115018-d63ba01acd4b/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 h1:m64FZMko/V45gv0bNmrNYoDEq8U5YUhetc9cBWKS1TQ= +golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63/go.mod h1:0v4NqG35kSWCMzLaMeX+IQrlSnVE/bqGSyC2cz/9Le8= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -474,8 +474,8 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.11.0 h1:bUO06HqtnRcc/7l71XBe4WcqTZ+3AH1J59zWDDwLKgU= -golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= +golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -512,8 +512,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.13.0 h1:Nvo8UFsZ8X3BhAC9699Z1j7XQ3rsZnUUm7jfBEk1ueY= -golang.org/x/net v0.13.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= +golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -535,8 +535,8 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= -golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= +golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -603,15 +603,15 @@ golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= -golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= -golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= +golang.org/x/term v0.11.0 h1:F9tnn/DA/Im8nCwm+fX+1/eBwi4qFjRT++MhtVC4ZX0= +golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -624,8 +624,8 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= -golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= +golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -681,8 +681,8 @@ golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= -golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= +golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846 h1:Vve/L0v7CXXuxUmaMGIEK/dEeq7uiqb5qBgQrZzIE7E= +golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -749,8 +749,8 @@ google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef h1:uQ2vjV/sHTsWSqdKeLqmwitzgvjMl7o4IdtHwUDXSJY= -google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A= +google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -767,8 +767,8 @@ google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.52.0 h1:kd48UiU7EHsV4rnLyOJRuP/Il/UHE7gdDAQ+SZI7nZk= -google.golang.org/grpc v1.52.0/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= +google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag= +google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -782,8 +782,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= +google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From 43410a0856fba6a8bfc20e23851908a272f35403 Mon Sep 17 00:00:00 2001 From: delarea Date: Mon, 21 Aug 2023 09:14:38 +0300 Subject: [PATCH 10/34] fix gosec --- plugins/commands/utils/utils.go | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/commands/utils/utils.go b/plugins/commands/utils/utils.go index e2e2c1076..efa871b51 100644 --- a/plugins/commands/utils/utils.go +++ b/plugins/commands/utils/utils.go @@ -17,6 +17,7 @@ const ( // The env var is optional for the install command - if provided, the plugin will be downloaded from a custom // plugins server, instead of the official registry. // The env var should store a server ID configured by JFrog CLI. + //#nosec G101 PluginsServerEnv = "JFROG_CLI_PLUGINS_SERVER" // Used to set a custom plugins repo for the 'publish' & 'install' commands. PluginsRepoEnv = "JFROG_CLI_PLUGINS_REPO" From c32e1605f1528d89e5c3ed35a2419757b77cec90 Mon Sep 17 00:00:00 2001 From: delarea Date: Mon, 21 Aug 2023 16:22:36 +0300 Subject: [PATCH 11/34] Update deps --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index b161e02fe..2baa8b06b 100644 --- a/go.mod +++ b/go.mod @@ -126,8 +126,8 @@ require ( // replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20230803131422-8230595ceb86 -replace github.com/jfrog/jfrog-cli-core/v2 => github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230820175937-54e9636a2429 +replace github.com/jfrog/jfrog-cli-core/v2 => github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230821132112-7f2932112ea3 -replace github.com/jfrog/jfrog-client-go => github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230820174719-94e1af28594e +replace github.com/jfrog/jfrog-client-go => github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230821131943-b6162daf2375 // replace github.com/jfrog/gofrog => github.com/jfrog/gofrog v1.2.6-0.20230418122323-2bf299dd6d27 diff --git a/go.sum b/go.sum index b46957c79..957428fdc 100644 --- a/go.sum +++ b/go.sum @@ -133,10 +133,10 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230820175937-54e9636a2429 h1:B5mamorfJE4YJNT8qYVMWqVbtHzbaRNo+wddud726Io= -github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230820175937-54e9636a2429/go.mod h1:eA8rxc4TZKwYAZEgM7ZzL+wTyQrdxv9uXLeWO0IG95s= -github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230820174719-94e1af28594e h1:zj2O3bFMukOejV/eIcYwD1pxnnHz5NomBbhPzjxru7o= -github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230820174719-94e1af28594e/go.mod h1:cstHMVqu11rn4TadtCBHrcuL+KcJ94kjSmMQSWMB61I= +github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230821132112-7f2932112ea3 h1:GehqyanGWu5YXaf48UUNGAyihED7X7/IgzdzdPDdfKc= +github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230821132112-7f2932112ea3/go.mod h1:lUsY0E24KdH4sZEZqszKNi0VEuS1SMEU9kJYO7WQ7t4= +github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230821131943-b6162daf2375 h1:CRYTjbBZO1JH4KHJ1ISIOlL0lFuEMoKblVlACcjrK5s= +github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230821131943-b6162daf2375/go.mod h1:cstHMVqu11rn4TadtCBHrcuL+KcJ94kjSmMQSWMB61I= github.com/forPelevin/gomoji v1.1.8 h1:JElzDdt0TyiUlecy6PfITDL6eGvIaxqYH1V52zrd0qQ= github.com/forPelevin/gomoji v1.1.8/go.mod h1:8+Z3KNGkdslmeGZBC3tCrwMrcPy5GRzAD+gL9NAwMXg= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= From a935feba1e45ddda6df55a321531e501ed4cfcd0 Mon Sep 17 00:00:00 2001 From: delarea Date: Mon, 21 Aug 2023 17:54:20 +0300 Subject: [PATCH 12/34] update deps --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 2baa8b06b..0507b7fee 100644 --- a/go.mod +++ b/go.mod @@ -126,8 +126,8 @@ require ( // replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20230803131422-8230595ceb86 -replace github.com/jfrog/jfrog-cli-core/v2 => github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230821132112-7f2932112ea3 +replace github.com/jfrog/jfrog-cli-core/v2 => github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230821145210-da848fea8858 -replace github.com/jfrog/jfrog-client-go => github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230821131943-b6162daf2375 +replace github.com/jfrog/jfrog-client-go => github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230821145050-a30da83d09c4 // replace github.com/jfrog/gofrog => github.com/jfrog/gofrog v1.2.6-0.20230418122323-2bf299dd6d27 diff --git a/go.sum b/go.sum index 957428fdc..8b0d61967 100644 --- a/go.sum +++ b/go.sum @@ -133,10 +133,10 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230821132112-7f2932112ea3 h1:GehqyanGWu5YXaf48UUNGAyihED7X7/IgzdzdPDdfKc= -github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230821132112-7f2932112ea3/go.mod h1:lUsY0E24KdH4sZEZqszKNi0VEuS1SMEU9kJYO7WQ7t4= -github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230821131943-b6162daf2375 h1:CRYTjbBZO1JH4KHJ1ISIOlL0lFuEMoKblVlACcjrK5s= -github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230821131943-b6162daf2375/go.mod h1:cstHMVqu11rn4TadtCBHrcuL+KcJ94kjSmMQSWMB61I= +github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230821145210-da848fea8858 h1:QO+LLMN1Jt4f5zmt828hJ/SpMCCG7v3OhSaJRd663UY= +github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230821145210-da848fea8858/go.mod h1:R1dRbf5thSPtjtg/s59kO20Ux7CGbbyXUXpTJpEEr1Y= +github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230821145050-a30da83d09c4 h1:wylQBde6B6Bk4hjAww0kXkuBLjXPBfkDzTERFGoExvo= +github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230821145050-a30da83d09c4/go.mod h1:cstHMVqu11rn4TadtCBHrcuL+KcJ94kjSmMQSWMB61I= github.com/forPelevin/gomoji v1.1.8 h1:JElzDdt0TyiUlecy6PfITDL6eGvIaxqYH1V52zrd0qQ= github.com/forPelevin/gomoji v1.1.8/go.mod h1:8+Z3KNGkdslmeGZBC3tCrwMrcPy5GRzAD+gL9NAwMXg= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= From afa7a25cb3cf5c0105498b9ee5f2967dfa669f69 Mon Sep 17 00:00:00 2001 From: delarea Date: Tue, 22 Aug 2023 12:57:33 +0300 Subject: [PATCH 13/34] update dependencies --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 0507b7fee..f73add566 100644 --- a/go.mod +++ b/go.mod @@ -126,7 +126,7 @@ require ( // replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20230803131422-8230595ceb86 -replace github.com/jfrog/jfrog-cli-core/v2 => github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230821145210-da848fea8858 +replace github.com/jfrog/jfrog-cli-core/v2 => github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230822095451-1c5b610fe969 replace github.com/jfrog/jfrog-client-go => github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230821145050-a30da83d09c4 diff --git a/go.sum b/go.sum index 8b0d61967..c3fade45b 100644 --- a/go.sum +++ b/go.sum @@ -133,8 +133,8 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230821145210-da848fea8858 h1:QO+LLMN1Jt4f5zmt828hJ/SpMCCG7v3OhSaJRd663UY= -github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230821145210-da848fea8858/go.mod h1:R1dRbf5thSPtjtg/s59kO20Ux7CGbbyXUXpTJpEEr1Y= +github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230822095451-1c5b610fe969 h1:/Zt2pOHkIKt3rDeZ5c7yLvzZHYa+G/i4n4YuOee+3Hk= +github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230822095451-1c5b610fe969/go.mod h1:R1dRbf5thSPtjtg/s59kO20Ux7CGbbyXUXpTJpEEr1Y= github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230821145050-a30da83d09c4 h1:wylQBde6B6Bk4hjAww0kXkuBLjXPBfkDzTERFGoExvo= github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230821145050-a30da83d09c4/go.mod h1:cstHMVqu11rn4TadtCBHrcuL+KcJ94kjSmMQSWMB61I= github.com/forPelevin/gomoji v1.1.8 h1:JElzDdt0TyiUlecy6PfITDL6eGvIaxqYH1V52zrd0qQ= From 66009e0e8fd0cc4c3d594c9f1b08a9092249b4e2 Mon Sep 17 00:00:00 2001 From: delarea Date: Wed, 23 Aug 2023 10:24:12 +0300 Subject: [PATCH 14/34] update deps --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 89ff7a41e..adfc21fe6 100644 --- a/go.mod +++ b/go.mod @@ -124,7 +124,7 @@ require ( replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20230820165857-52ff32c4d8eb -replace github.com/jfrog/jfrog-cli-core/v2 => github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230822095451-1c5b610fe969 +replace github.com/jfrog/jfrog-cli-core/v2 => github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230823071708-6e5b7f7fd440 replace github.com/jfrog/jfrog-client-go => github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230821145050-a30da83d09c4 diff --git a/go.sum b/go.sum index 84404e7cf..f210c09e1 100644 --- a/go.sum +++ b/go.sum @@ -134,8 +134,8 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230822095451-1c5b610fe969 h1:/Zt2pOHkIKt3rDeZ5c7yLvzZHYa+G/i4n4YuOee+3Hk= -github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230822095451-1c5b610fe969/go.mod h1:R1dRbf5thSPtjtg/s59kO20Ux7CGbbyXUXpTJpEEr1Y= +github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230823071708-6e5b7f7fd440 h1:H94EYhTnO1Qgrx2fZLWkN4h0aVZi/qHGkyBjSUTWXbU= +github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230823071708-6e5b7f7fd440/go.mod h1:R1dRbf5thSPtjtg/s59kO20Ux7CGbbyXUXpTJpEEr1Y= github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230821145050-a30da83d09c4 h1:wylQBde6B6Bk4hjAww0kXkuBLjXPBfkDzTERFGoExvo= github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230821145050-a30da83d09c4/go.mod h1:cstHMVqu11rn4TadtCBHrcuL+KcJ94kjSmMQSWMB61I= github.com/forPelevin/gomoji v1.1.8 h1:JElzDdt0TyiUlecy6PfITDL6eGvIaxqYH1V52zrd0qQ= From cb85c8f2c499059bee2db5fab7fbc5bc2a02e25b Mon Sep 17 00:00:00 2001 From: delarea Date: Thu, 24 Aug 2023 12:06:14 +0300 Subject: [PATCH 15/34] Add XSC tests --- .github/workflows/xrayTests.yml | 9 +++++---- CONTRIBUTING.md | 3 ++- go.mod | 6 ++---- go.sum | 8 ++++---- main_test.go | 2 +- utils/tests/utils.go | 4 ++++ xray_test.go | 3 ++- xsc_test.go | 26 ++++++++++++++++++++++++++ 8 files changed, 46 insertions(+), 15 deletions(-) create mode 100644 xsc_test.go diff --git a/.github/workflows/xrayTests.yml b/.github/workflows/xrayTests.yml index e540c76cc..98804735b 100644 --- a/.github/workflows/xrayTests.yml +++ b/.github/workflows/xrayTests.yml @@ -19,6 +19,7 @@ jobs: strategy: fail-fast: false matrix: + suite: [ xray , xsc ] os: [ ubuntu-latest, macos-latest, windows-latest ] runs-on: ${{ matrix.os }} env: @@ -61,9 +62,9 @@ jobs: uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.head.sha }} - - name: Run Xray tests - run: go test -v github.com/jfrog/jfrog-cli --timeout 0 --test.xray --jfrog.url=${{ secrets.PLATFORM_URL }} --jfrog.adminToken=${{ secrets.PLATFORM_ADMIN_TOKEN }} --jfrog.user=${{ secrets.PLATFORM_USER }} --test.containerRegistry=${{ secrets.CONTAINER_REGISTRY }} + - name: Run Xray And Xsc tests + run: go test -v github.com/jfrog/jfrog-cli --timeout 0 --test.${{ matrix.suite }} --jfrog.url=${{ secrets.PLATFORM_URL }} --jfrog.adminToken=${{ secrets.PLATFORM_ADMIN_TOKEN }} --jfrog.user=${{ secrets.PLATFORM_USER }} --test.containerRegistry=${{ secrets.CONTAINER_REGISTRY }} if: ${{ matrix.os != 'ubuntu-latest' }} - - name: Run Docker scan and Xray tests - run: go test -v github.com/jfrog/jfrog-cli --timeout 0 --test.xray --test.dockerScan --jfrog.url=${{ secrets.PLATFORM_URL }} --jfrog.adminToken=${{ secrets.PLATFORM_ADMIN_TOKEN }} --test.containerRegistry=${{ secrets.CONTAINER_REGISTRY }} + - name: Run Docker scan and ${{ matrix.suite }} tests + run: go test -v github.com/jfrog/jfrog-cli --timeout 0 --test.${{ matrix.suite }} --test.dockerScan --jfrog.url=${{ secrets.PLATFORM_URL }} --jfrog.adminToken=${{ secrets.PLATFORM_ADMIN_TOKEN }} --test.containerRegistry=${{ secrets.CONTAINER_REGISTRY }} if: ${{ matrix.os == 'ubuntu-latest' }} \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d9bd3949d..adc75616d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -92,7 +92,7 @@ The available flags are: The available test types are: | Type | Description | -| -------------------- | ------------------ | +|----------------------|--------------------| | `-test.artifactory` | Artifactory tests | | `-test.access` | Access tests | | `-test.npm` | Npm tests | @@ -110,6 +110,7 @@ The available test types are: | `-test.distribution` | Distribution tests | | `-test.transfer` | Transfer tests | | `-test.xray` | Xray tests | +| `-test.xsc` | Xsc tests | When running the tests, builds and repositories with timestamps will be created, for example: `cli-rt1-1592990748` and `cli-rt2-1592990748`. The content of these repositories will be deleted once the tests are completed. diff --git a/go.mod b/go.mod index 704bc729b..845b30fbc 100644 --- a/go.mod +++ b/go.mod @@ -124,8 +124,6 @@ require ( // replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20230820165857-52ff32c4d8eb -// replace github.com/jfrog/jfrog-cli-core/v2 => github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20230823084658-46b57ad6ca5a +replace github.com/jfrog/jfrog-cli-core/v2 => github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230824082025-8aa7d33c56ed -// replace github.com/jfrog/gofrog => github.com/jfrog/gofrog v1.2.6-0.20230418122323-2bf299dd6d27 - -// replace github.com/jfrog/jfrog-client-go => github.com/jfrog/jfrog-client-go v1.28.1-0.20230803140217-0a5f43783ae8 +replace github.com/jfrog/jfrog-client-go => github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230824065102-75aaa3dc8aa9 diff --git a/go.sum b/go.sum index 039d9558e..df4438ef1 100644 --- a/go.sum +++ b/go.sum @@ -134,6 +134,10 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230824082025-8aa7d33c56ed h1:U9wiRQdwrZd2jIxpk0M544+Q5t9Yl03y4spf1C9AY/A= +github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230824082025-8aa7d33c56ed/go.mod h1:Z6c/gAa65wZ/PlwLcAtEPFI1zBfWan1oFf/q2EDTZOc= +github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230824065102-75aaa3dc8aa9 h1:mjWx7wq3DRmP7EhjvV/xQUIihTfr1jVI21FWj+cPqM8= +github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230824065102-75aaa3dc8aa9/go.mod h1:icb00ZJN/mMMNkQduHDkzpqsXH9Flwi3f3COYexq3Nc= github.com/forPelevin/gomoji v1.1.8 h1:JElzDdt0TyiUlecy6PfITDL6eGvIaxqYH1V52zrd0qQ= github.com/forPelevin/gomoji v1.1.8/go.mod h1:8+Z3KNGkdslmeGZBC3tCrwMrcPy5GRzAD+gL9NAwMXg= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= @@ -241,10 +245,6 @@ github.com/jfrog/build-info-go v1.9.8 h1:D8/ga+YgQpqp/CJj2zteS4/twmSy8zvm1v9lCd2 github.com/jfrog/build-info-go v1.9.8/go.mod h1:t31QRpH5xUJKw8XkQlAA+Aq7aanyS1rrzpcK8xSNVts= github.com/jfrog/gofrog v1.3.0 h1:o4zgsBZE4QyDbz2M7D4K6fXPTBJht+8lE87mS9bw7Gk= github.com/jfrog/gofrog v1.3.0/go.mod h1:IFMc+V/yf7rA5WZ74CSbXe+Lgf0iApEQLxRZVzKRUR0= -github.com/jfrog/jfrog-cli-core/v2 v2.41.0 h1:M2z/BuZKZc4DHtmO3Jx49bf5qCLyfLG8jJ9/iKpkALs= -github.com/jfrog/jfrog-cli-core/v2 v2.41.0/go.mod h1:YqB9rEJF1P7uGLIPUvF5qdDDf1zM5f4DneIQNkqyAfs= -github.com/jfrog/jfrog-client-go v1.31.5 h1:dYVgIJzMwX+EU9GEELKPSHFLyfW6UrrjZWMEZtAyx6A= -github.com/jfrog/jfrog-client-go v1.31.5/go.mod h1:icb00ZJN/mMMNkQduHDkzpqsXH9Flwi3f3COYexq3Nc= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jszwec/csvutil v1.8.0 h1:G7vS2LGdpZZDH1HmHeNbxOaJ/ZnJlpwGFvOkTkJzzNk= diff --git a/main_test.go b/main_test.go index bc6684073..207f4ebd7 100644 --- a/main_test.go +++ b/main_test.go @@ -67,7 +67,7 @@ func setupIntegrationTests() { if *tests.TestPlugins { InitPluginsTests() } - if *tests.TestXray { + if *tests.TestXray || *tests.TestXsc { InitXrayTests() } if *tests.TestAccess { diff --git a/utils/tests/utils.go b/utils/tests/utils.go index c6b847dd3..704e9fa53 100644 --- a/utils/tests/utils.go +++ b/utils/tests/utils.go @@ -68,6 +68,7 @@ var ( TestPoetry *bool TestPlugins *bool TestXray *bool + TestXsc *bool TestAccess *bool TestTransfer *bool TestLifecycle *bool @@ -104,6 +105,7 @@ func init() { TestPoetry = flag.Bool("test.poetry", false, "Test Poetry") TestPlugins = flag.Bool("test.plugins", false, "Test Plugins") TestXray = flag.Bool("test.xray", false, "Test Xray") + TestXsc = flag.Bool("test.xsc", false, "Test Xsc") TestAccess = flag.Bool("test.access", false, "Test Access") TestTransfer = flag.Bool("test.transfer", false, "Test files transfer") TestLifecycle = flag.Bool("test.lc", false, "Test lifecycle") @@ -403,6 +405,7 @@ func GetNonVirtualRepositories() map[*string]string { TestPoetry: {&PoetryRemoteRepo}, TestPlugins: {&RtRepo1}, TestXray: {}, + TestXsc: {}, TestAccess: {&RtRepo1}, TestTransfer: {&RtRepo1, &RtRepo2, &MvnRepo1, &MvnRemoteRepo, &DockerRemoteRepo}, TestLifecycle: {&RtDevRepo, &RtProdRepo}, @@ -428,6 +431,7 @@ func GetVirtualRepositories() map[*string]string { TestPoetry: {&PoetryVirtualRepo}, TestPlugins: {}, TestXray: {}, + TestXsc: {}, TestAccess: {}, } return getNeededRepositories(virtualReposMap) diff --git a/xray_test.go b/xray_test.go index 270eaa08e..b999473d9 100644 --- a/xray_test.go +++ b/xray_test.go @@ -59,7 +59,7 @@ func InitXrayTests() { func authenticateXray() string { *tests.JfrogUrl = clientUtils.AddTrailingSlashIfNeeded(*tests.JfrogUrl) - xrayDetails = &config.ServerDetails{Url: *tests.JfrogUrl, XrayUrl: *tests.JfrogUrl + tests.XrayEndpoint} + xrayDetails = &config.ServerDetails{Url: *tests.JfrogUrl, XrayUrl: *tests.JfrogUrl + tests.XrayEndpoint, XscUrl: *tests.JfrogUrl + tests.XscEndpoint} cred := fmt.Sprintf("--url=%s", xrayDetails.XrayUrl) if *tests.JfrogAccessToken != "" { xrayDetails.AccessToken = *tests.JfrogAccessToken @@ -75,6 +75,7 @@ func authenticateXray() string { coreutils.ExitOnErr(errors.New("Failed while attempting to authenticate with Xray: " + err.Error())) } xrayDetails.XrayUrl = xrayAuth.GetUrl() + xrayDetails.XscUrl = xrayAuth.GetXscUrl() return cred } diff --git a/xsc_test.go b/xsc_test.go new file mode 100644 index 000000000..6aa687209 --- /dev/null +++ b/xsc_test.go @@ -0,0 +1,26 @@ +package main + +import ( + "github.com/jfrog/jfrog-cli-core/v2/utils/coreutils" + "github.com/jfrog/jfrog-cli-core/v2/xray/commands/utils" + "github.com/jfrog/jfrog-cli/utils/tests" + "testing" +) + +func initXscTest(t *testing.T, minVersion string) { + if !*tests.TestXsc { + t.Skip("Skipping Xsc test. To run xsc test add the '-test.xsc=true' option.") + } + *tests.TestXray = true + validateXscVersion(t, minVersion) +} +func validateXscVersion(t *testing.T, minVersion string) { + err := coreutils.ValidateMinimumVersion(coreutils.Xsc, xrayDetails.XscVersion, minVersion) + if err != nil { + t.Skip(err) + } +} +func TestXSCAudit(t *testing.T) { + initXscTest(t, utils.XscMinVersion) + testXrayAuditNpm(t, "json") +} From 0322ea3a9fbb68ef42450d2c2a9fb608ec52a5d9 Mon Sep 17 00:00:00 2001 From: delarea Date: Thu, 24 Aug 2023 12:41:41 +0300 Subject: [PATCH 16/34] trigget test From 084c27014883520467cd29d9ab85b4e09a51f184 Mon Sep 17 00:00:00 2001 From: delarea Date: Thu, 24 Aug 2023 12:46:35 +0300 Subject: [PATCH 17/34] fix test --- .github/workflows/xrayTests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/xrayTests.yml b/.github/workflows/xrayTests.yml index 98804735b..c220d650c 100644 --- a/.github/workflows/xrayTests.yml +++ b/.github/workflows/xrayTests.yml @@ -65,6 +65,6 @@ jobs: - name: Run Xray And Xsc tests run: go test -v github.com/jfrog/jfrog-cli --timeout 0 --test.${{ matrix.suite }} --jfrog.url=${{ secrets.PLATFORM_URL }} --jfrog.adminToken=${{ secrets.PLATFORM_ADMIN_TOKEN }} --jfrog.user=${{ secrets.PLATFORM_USER }} --test.containerRegistry=${{ secrets.CONTAINER_REGISTRY }} if: ${{ matrix.os != 'ubuntu-latest' }} - - name: Run Docker scan and ${{ matrix.suite }} tests - run: go test -v github.com/jfrog/jfrog-cli --timeout 0 --test.${{ matrix.suite }} --test.dockerScan --jfrog.url=${{ secrets.PLATFORM_URL }} --jfrog.adminToken=${{ secrets.PLATFORM_ADMIN_TOKEN }} --test.containerRegistry=${{ secrets.CONTAINER_REGISTRY }} + - name: Run Docker scan and Xray tests + run: go test -v github.com/jfrog/jfrog-cli --timeout 0 --test.xray --test.dockerScan --jfrog.url=${{ secrets.PLATFORM_URL }} --jfrog.adminToken=${{ secrets.PLATFORM_ADMIN_TOKEN }} --test.containerRegistry=${{ secrets.CONTAINER_REGISTRY }} if: ${{ matrix.os == 'ubuntu-latest' }} \ No newline at end of file From becb901bdc7b666a74a271ab991141422dca5afb Mon Sep 17 00:00:00 2001 From: delarea Date: Thu, 24 Aug 2023 12:59:43 +0300 Subject: [PATCH 18/34] turn off and on xray test --- xsc_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xsc_test.go b/xsc_test.go index 6aa687209..79a8d82e0 100644 --- a/xsc_test.go +++ b/xsc_test.go @@ -11,7 +11,6 @@ func initXscTest(t *testing.T, minVersion string) { if !*tests.TestXsc { t.Skip("Skipping Xsc test. To run xsc test add the '-test.xsc=true' option.") } - *tests.TestXray = true validateXscVersion(t, minVersion) } func validateXscVersion(t *testing.T, minVersion string) { @@ -21,6 +20,8 @@ func validateXscVersion(t *testing.T, minVersion string) { } } func TestXSCAudit(t *testing.T) { + *tests.TestXray = true initXscTest(t, utils.XscMinVersion) testXrayAuditNpm(t, "json") + *tests.TestXray = false } From 71d50b8fef585d8e3588e8745844d2d98eb5985a Mon Sep 17 00:00:00 2001 From: delarea Date: Thu, 24 Aug 2023 14:24:24 +0300 Subject: [PATCH 19/34] trigget test From 2a82b3a7dd490011dacd84fe6d57367f13a4ba03 Mon Sep 17 00:00:00 2001 From: delarea Date: Thu, 24 Aug 2023 15:29:36 +0300 Subject: [PATCH 20/34] Change test --- xray_test.go | 10 ++++++---- xsc_test.go | 4 +--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/xray_test.go b/xray_test.go index b999473d9..f97760c57 100644 --- a/xray_test.go +++ b/xray_test.go @@ -138,17 +138,19 @@ func TestXrayBinaryScanWithBypassArchiveLimits(t *testing.T) { // Tests npm audit by providing simple npm project and asserts any error. func TestXrayAuditNpmJson(t *testing.T) { - output := testXrayAuditNpm(t, string(utils.Json)) + output := testXrayAuditNpm(t, string(utils.Json), false) verifyJsonScanResults(t, output, 0, 1, 1) } func TestXrayAuditNpmSimpleJson(t *testing.T) { - output := testXrayAuditNpm(t, string(utils.SimpleJson)) + output := testXrayAuditNpm(t, string(utils.SimpleJson), false) verifySimpleJsonScanResults(t, output, 1, 1) } -func testXrayAuditNpm(t *testing.T, format string) string { - initXrayTest(t, commands.GraphScanMinXrayVersion) +func testXrayAuditNpm(t *testing.T, format string, isXsc bool) string { + if !isXsc { + initXrayTest(t, commands.GraphScanMinXrayVersion) + } tempDirPath, createTempDirCallback := coretests.CreateTempDirWithCallbackAndAssert(t) defer createTempDirCallback() npmProjectPath := filepath.Join(filepath.FromSlash(tests.GetTestResourcesPath()), "xray", "npm") diff --git a/xsc_test.go b/xsc_test.go index 79a8d82e0..24346161c 100644 --- a/xsc_test.go +++ b/xsc_test.go @@ -20,8 +20,6 @@ func validateXscVersion(t *testing.T, minVersion string) { } } func TestXSCAudit(t *testing.T) { - *tests.TestXray = true initXscTest(t, utils.XscMinVersion) - testXrayAuditNpm(t, "json") - *tests.TestXray = false + testXrayAuditNpm(t, "json", true) } From 8d06953b5763024a1d3d5e31032f012488a60fa1 Mon Sep 17 00:00:00 2001 From: delarea Date: Tue, 29 Aug 2023 14:11:08 +0300 Subject: [PATCH 21/34] fix merge --- inttestutils/buildinfo.go | 4 ++-- xray_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/inttestutils/buildinfo.go b/inttestutils/buildinfo.go index 3003172bf..c44a3502c 100644 --- a/inttestutils/buildinfo.go +++ b/inttestutils/buildinfo.go @@ -2,6 +2,7 @@ package inttestutils import ( "fmt" + "github.com/jfrog/jfrog-client-go/artifactory/services/utils" "net/http" "path" "testing" @@ -12,7 +13,6 @@ import ( coreutils "github.com/jfrog/jfrog-cli-core/v2/artifactory/utils" "github.com/jfrog/jfrog-client-go/http/httpclient" - "github.com/jfrog/jfrog-client-go/utils" "github.com/jfrog/jfrog-client-go/utils/io/httputils" "github.com/jfrog/jfrog-client-go/utils/log" "github.com/stretchr/testify/assert" @@ -27,7 +27,7 @@ func DeleteBuild(artifactoryUrl, buildName string, artHttpDetails httputils.Http restApi := path.Join("api/build/", buildName) params := map[string]string{"deleteAll": "1"} - requestFullUrl, err := utils.BuildUrl(artifactoryUrl, restApi, params) + requestFullUrl, err := utils.BuildArtifactoryUrl(artifactoryUrl, restApi, params) if err != nil { log.Error(err) return diff --git a/xray_test.go b/xray_test.go index 2969ffdfb..c81691e61 100644 --- a/xray_test.go +++ b/xray_test.go @@ -488,7 +488,7 @@ func validateXrayVersion(t *testing.T, minVersion string) { assert.NoError(t, err) return } - err = clientUtils.ValidateMinimumVersion(clientUtils.Xray, xrayVersion.GetVersion(), minVersion) + err = coreutils.ValidateMinimumVersion(coreutils.Xray, xrayVersion.GetVersion(), minVersion) if err != nil { t.Skip(err) } From 698e0265839d647485913bc1b9b2584a15aebdc7 Mon Sep 17 00:00:00 2001 From: delarea Date: Tue, 29 Aug 2023 14:21:22 +0300 Subject: [PATCH 22/34] update deps --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 225d73e83..4d407af63 100644 --- a/go.mod +++ b/go.mod @@ -124,6 +124,6 @@ require ( // replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20230828134416-f0db33dd9344 -replace github.com/jfrog/jfrog-cli-core/v2 => github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230824082025-8aa7d33c56ed +replace github.com/jfrog/jfrog-cli-core/v2 => github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230828145404-f524051dbc33 -replace github.com/jfrog/jfrog-client-go => github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230824065102-75aaa3dc8aa9 +replace github.com/jfrog/jfrog-client-go => github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230829064018-97b4701be69d diff --git a/go.sum b/go.sum index f1726bd88..20429db07 100644 --- a/go.sum +++ b/go.sum @@ -134,10 +134,10 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230824082025-8aa7d33c56ed h1:U9wiRQdwrZd2jIxpk0M544+Q5t9Yl03y4spf1C9AY/A= -github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230824082025-8aa7d33c56ed/go.mod h1:Z6c/gAa65wZ/PlwLcAtEPFI1zBfWan1oFf/q2EDTZOc= -github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230824065102-75aaa3dc8aa9 h1:mjWx7wq3DRmP7EhjvV/xQUIihTfr1jVI21FWj+cPqM8= -github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230824065102-75aaa3dc8aa9/go.mod h1:icb00ZJN/mMMNkQduHDkzpqsXH9Flwi3f3COYexq3Nc= +github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230828145404-f524051dbc33 h1:YEMXA1N7p02Y4R8UgeIYMEx4o+JwCglQHU/s+1gx6cw= +github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230828145404-f524051dbc33/go.mod h1:Gd2F56gFcnQSVsnR9Bq091i5Y5qits0l0K3HxGM3rNw= +github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230829064018-97b4701be69d h1:T6eKB/9Mf4j6VdwrrvRYaTEpJeg19bKqWSy2jHRTXaE= +github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230829064018-97b4701be69d/go.mod h1:icb00ZJN/mMMNkQduHDkzpqsXH9Flwi3f3COYexq3Nc= github.com/forPelevin/gomoji v1.1.8 h1:JElzDdt0TyiUlecy6PfITDL6eGvIaxqYH1V52zrd0qQ= github.com/forPelevin/gomoji v1.1.8/go.mod h1:8+Z3KNGkdslmeGZBC3tCrwMrcPy5GRzAD+gL9NAwMXg= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= From 0ec3b49c7617154a902a91a2056054a70c7cb9ac Mon Sep 17 00:00:00 2001 From: delarea Date: Tue, 29 Aug 2023 15:51:24 +0300 Subject: [PATCH 23/34] update deps --- go.mod | 4 ++-- go.sum | 8 ++++---- inttestutils/buildinfo.go | 4 ++-- xray_test.go | 4 ++-- xsc_test.go | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 4d407af63..c6b436a55 100644 --- a/go.mod +++ b/go.mod @@ -124,6 +124,6 @@ require ( // replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20230828134416-f0db33dd9344 -replace github.com/jfrog/jfrog-cli-core/v2 => github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230828145404-f524051dbc33 +replace github.com/jfrog/jfrog-cli-core/v2 => github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230829124913-64b367d9da8f -replace github.com/jfrog/jfrog-client-go => github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230829064018-97b4701be69d +replace github.com/jfrog/jfrog-client-go => github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230829115049-a43644e64b0a diff --git a/go.sum b/go.sum index 20429db07..875a33339 100644 --- a/go.sum +++ b/go.sum @@ -134,10 +134,10 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230828145404-f524051dbc33 h1:YEMXA1N7p02Y4R8UgeIYMEx4o+JwCglQHU/s+1gx6cw= -github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230828145404-f524051dbc33/go.mod h1:Gd2F56gFcnQSVsnR9Bq091i5Y5qits0l0K3HxGM3rNw= -github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230829064018-97b4701be69d h1:T6eKB/9Mf4j6VdwrrvRYaTEpJeg19bKqWSy2jHRTXaE= -github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230829064018-97b4701be69d/go.mod h1:icb00ZJN/mMMNkQduHDkzpqsXH9Flwi3f3COYexq3Nc= +github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230829124913-64b367d9da8f h1:AAxe4dg4moKHRLgw9c+maGc1IUJFSu1a2HJjHSJ64ac= +github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230829124913-64b367d9da8f/go.mod h1:3gq6CBBfGLTnYV+U2ycKjQUBHs+InOQZW8fkiN8nSO8= +github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230829115049-a43644e64b0a h1:OTplgcRjLFnRe+VjTBVX08APdxRKTVDKQy5LFJUdVcE= +github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230829115049-a43644e64b0a/go.mod h1:icb00ZJN/mMMNkQduHDkzpqsXH9Flwi3f3COYexq3Nc= github.com/forPelevin/gomoji v1.1.8 h1:JElzDdt0TyiUlecy6PfITDL6eGvIaxqYH1V52zrd0qQ= github.com/forPelevin/gomoji v1.1.8/go.mod h1:8+Z3KNGkdslmeGZBC3tCrwMrcPy5GRzAD+gL9NAwMXg= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= diff --git a/inttestutils/buildinfo.go b/inttestutils/buildinfo.go index c44a3502c..611484388 100644 --- a/inttestutils/buildinfo.go +++ b/inttestutils/buildinfo.go @@ -2,7 +2,7 @@ package inttestutils import ( "fmt" - "github.com/jfrog/jfrog-client-go/artifactory/services/utils" + "github.com/jfrog/jfrog-client-go/utils" "net/http" "path" "testing" @@ -27,7 +27,7 @@ func DeleteBuild(artifactoryUrl, buildName string, artHttpDetails httputils.Http restApi := path.Join("api/build/", buildName) params := map[string]string{"deleteAll": "1"} - requestFullUrl, err := utils.BuildArtifactoryUrl(artifactoryUrl, restApi, params) + requestFullUrl, err := utils.BuildUrl(artifactoryUrl, restApi, params) if err != nil { log.Error(err) return diff --git a/xray_test.go b/xray_test.go index c81691e61..dea8a6954 100644 --- a/xray_test.go +++ b/xray_test.go @@ -5,6 +5,7 @@ import ( "errors" "flag" "fmt" + "github.com/jfrog/jfrog-cli-core/v2/utils/coreutils" xrayScan "github.com/jfrog/jfrog-client-go/xray/scan" "net/http" "net/http/httptest" @@ -26,7 +27,6 @@ import ( coreCmd "github.com/jfrog/jfrog-cli-core/v2/common/commands" tests2 "github.com/jfrog/jfrog-cli-core/v2/common/tests" "github.com/jfrog/jfrog-cli-core/v2/utils/config" - "github.com/jfrog/jfrog-cli-core/v2/utils/coreutils" coretests "github.com/jfrog/jfrog-cli-core/v2/utils/tests" coreCuration "github.com/jfrog/jfrog-cli-core/v2/xray/commands/curation" "github.com/jfrog/jfrog-cli-core/v2/xray/commands/scan" @@ -488,7 +488,7 @@ func validateXrayVersion(t *testing.T, minVersion string) { assert.NoError(t, err) return } - err = coreutils.ValidateMinimumVersion(coreutils.Xray, xrayVersion.GetVersion(), minVersion) + err = clientUtils.ValidateMinimumVersion(clientUtils.Xray, xrayVersion.GetVersion(), minVersion) if err != nil { t.Skip(err) } diff --git a/xsc_test.go b/xsc_test.go index 24346161c..c65c97d6d 100644 --- a/xsc_test.go +++ b/xsc_test.go @@ -1,9 +1,9 @@ package main import ( - "github.com/jfrog/jfrog-cli-core/v2/utils/coreutils" "github.com/jfrog/jfrog-cli-core/v2/xray/commands/utils" "github.com/jfrog/jfrog-cli/utils/tests" + clientutils "github.com/jfrog/jfrog-client-go/utils" "testing" ) @@ -14,7 +14,7 @@ func initXscTest(t *testing.T, minVersion string) { validateXscVersion(t, minVersion) } func validateXscVersion(t *testing.T, minVersion string) { - err := coreutils.ValidateMinimumVersion(coreutils.Xsc, xrayDetails.XscVersion, minVersion) + err := clientutils.ValidateMinimumVersion(clientutils.Xray, xrayDetails.XscVersion, minVersion) if err != nil { t.Skip(err) } From 321efb10438f51775119961b6139bfc9d5916666 Mon Sep 17 00:00:00 2001 From: delarea Date: Wed, 30 Aug 2023 11:54:46 +0300 Subject: [PATCH 24/34] Update deps --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index c6b436a55..78f7a9fd7 100644 --- a/go.mod +++ b/go.mod @@ -124,6 +124,6 @@ require ( // replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20230828134416-f0db33dd9344 -replace github.com/jfrog/jfrog-cli-core/v2 => github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230829124913-64b367d9da8f +replace github.com/jfrog/jfrog-cli-core/v2 => github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230830085314-196ae2655ed4 -replace github.com/jfrog/jfrog-client-go => github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230829115049-a43644e64b0a +replace github.com/jfrog/jfrog-client-go => github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230830085015-d99342c64d47 diff --git a/go.sum b/go.sum index 875a33339..1a04df64f 100644 --- a/go.sum +++ b/go.sum @@ -134,10 +134,10 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230829124913-64b367d9da8f h1:AAxe4dg4moKHRLgw9c+maGc1IUJFSu1a2HJjHSJ64ac= -github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230829124913-64b367d9da8f/go.mod h1:3gq6CBBfGLTnYV+U2ycKjQUBHs+InOQZW8fkiN8nSO8= -github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230829115049-a43644e64b0a h1:OTplgcRjLFnRe+VjTBVX08APdxRKTVDKQy5LFJUdVcE= -github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230829115049-a43644e64b0a/go.mod h1:icb00ZJN/mMMNkQduHDkzpqsXH9Flwi3f3COYexq3Nc= +github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230830085314-196ae2655ed4 h1:Ptg8pAJWku5fQpTn0/T5TUWMLjVK9PsOP8yRUHEgxIw= +github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230830085314-196ae2655ed4/go.mod h1:041fZRvDXDqBm5LiXwSw65mCTGwbXNtox8mDscVMpXE= +github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230830085015-d99342c64d47 h1:q59p3OmHHj+ZvzFQu0zhcl05GYHQfzj/cYgG3gGeZ0A= +github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230830085015-d99342c64d47/go.mod h1:icb00ZJN/mMMNkQduHDkzpqsXH9Flwi3f3COYexq3Nc= github.com/forPelevin/gomoji v1.1.8 h1:JElzDdt0TyiUlecy6PfITDL6eGvIaxqYH1V52zrd0qQ= github.com/forPelevin/gomoji v1.1.8/go.mod h1:8+Z3KNGkdslmeGZBC3tCrwMrcPy5GRzAD+gL9NAwMXg= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= From 34e89bb1396f23e21c8bb77336bf7d7375cce2ab Mon Sep 17 00:00:00 2001 From: delarea Date: Thu, 31 Aug 2023 18:26:04 +0300 Subject: [PATCH 25/34] update deps --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 68d37fcd1..c91aef20a 100644 --- a/go.mod +++ b/go.mod @@ -124,6 +124,6 @@ require ( // replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20230828134416-f0db33dd9344 -replace github.com/jfrog/jfrog-cli-core/v2 => github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230831134915-15d7d747002d +replace github.com/jfrog/jfrog-cli-core/v2 => github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230831145917-d4762559d058 -replace github.com/jfrog/jfrog-client-go => github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230831134733-349551c66441 +replace github.com/jfrog/jfrog-client-go => github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230831152236-59e8b9e250bb diff --git a/go.sum b/go.sum index 47ffce904..6cd84d801 100644 --- a/go.sum +++ b/go.sum @@ -134,10 +134,10 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230831134915-15d7d747002d h1:C9j84j3+/8aNEGt3l4ruQeHAk5ZN/VOf5xOsuzDjWpk= -github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230831134915-15d7d747002d/go.mod h1:CDZgHl4+kx8kmmoxAfq0YgD+FEcTQe8Jnm560NSQUDU= -github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230831134733-349551c66441 h1:tScfXPi/4lMUO/yarsOup06MNy7PClKXvt3gtcmRYuc= -github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230831134733-349551c66441/go.mod h1:icb00ZJN/mMMNkQduHDkzpqsXH9Flwi3f3COYexq3Nc= +github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230831145917-d4762559d058 h1:VPNlerTNoFpNN4Tzg3utDhy4Y/bUdtDeqo/n+lKXZhU= +github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230831145917-d4762559d058/go.mod h1:6imgt+Cp8CH1CT4KDJeIYmVh6x7tI6P/VOJjZjb3HwQ= +github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230831152236-59e8b9e250bb h1:yzRwzdsCO19mNeDu18bn1KFGmHhiOsHL1u9CRFKjmDQ= +github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230831152236-59e8b9e250bb/go.mod h1:icb00ZJN/mMMNkQduHDkzpqsXH9Flwi3f3COYexq3Nc= github.com/forPelevin/gomoji v1.1.8 h1:JElzDdt0TyiUlecy6PfITDL6eGvIaxqYH1V52zrd0qQ= github.com/forPelevin/gomoji v1.1.8/go.mod h1:8+Z3KNGkdslmeGZBC3tCrwMrcPy5GRzAD+gL9NAwMXg= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= From 2bdbdb8995b8293518282bd6287c08d8c1075242 Mon Sep 17 00:00:00 2001 From: delarea Date: Sun, 3 Sep 2023 16:39:56 +0300 Subject: [PATCH 26/34] Update deps --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index a18f34665..3e1b9b091 100644 --- a/go.mod +++ b/go.mod @@ -125,7 +125,7 @@ require ( // replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20230828134416-f0db33dd9344 -replace github.com/jfrog/jfrog-cli-core/v2 => github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230903071532-df51758b9bff +replace github.com/jfrog/jfrog-cli-core/v2 => github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230903133754-ccb508c7c860 replace github.com/jfrog/jfrog-client-go => github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230903070657-5e95ddc4e0e1 diff --git a/go.sum b/go.sum index 87248d362..c11b39a30 100644 --- a/go.sum +++ b/go.sum @@ -133,8 +133,8 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230903071532-df51758b9bff h1:OQbj8nChQSP08IH0Iw125YYDNT6eQIycnvsXC7Lwj7s= -github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230903071532-df51758b9bff/go.mod h1:QBDbnE5CXac+jKvLHGocEYgqT6+VcfCGYhyxRmwXD7Q= +github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230903133754-ccb508c7c860 h1:s/uosfzm1S8xqiT/qNa5bxfsIcH/WOiz0tadQnpoV7U= +github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230903133754-ccb508c7c860/go.mod h1:QBDbnE5CXac+jKvLHGocEYgqT6+VcfCGYhyxRmwXD7Q= github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230903070657-5e95ddc4e0e1 h1:X/ltOWcM0+dhYQ0XRJjsNkEzzDXaGC+DLZGov6Z7t3E= github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230903070657-5e95ddc4e0e1/go.mod h1:uUnMrqHX7Xi+OCaZEE4b3BtsmGeOSCB7XqaEWVXEH/E= github.com/forPelevin/gomoji v1.1.8 h1:JElzDdt0TyiUlecy6PfITDL6eGvIaxqYH1V52zrd0qQ= From 63276fc99c30bfeda3f12f02f186796d45cddcd1 Mon Sep 17 00:00:00 2001 From: delarea Date: Mon, 4 Sep 2023 10:34:28 +0300 Subject: [PATCH 27/34] pull dev --- go.mod | 4 ++-- go.sum | 8 ++++---- scan/cli.go | 4 ++-- xray_test.go | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/go.mod b/go.mod index 3e1b9b091..9dcc9ad1d 100644 --- a/go.mod +++ b/go.mod @@ -125,8 +125,8 @@ require ( // replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20230828134416-f0db33dd9344 -replace github.com/jfrog/jfrog-cli-core/v2 => github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230903133754-ccb508c7c860 +replace github.com/jfrog/jfrog-cli-core/v2 => github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230904072609-688e69354a3d -replace github.com/jfrog/jfrog-client-go => github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230903070657-5e95ddc4e0e1 +replace github.com/jfrog/jfrog-client-go => github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230904072239-1e6715ddfa46 replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20230831151231-e5e7bd035ddc diff --git a/go.sum b/go.sum index c11b39a30..6be4eb4f1 100644 --- a/go.sum +++ b/go.sum @@ -133,10 +133,10 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230903133754-ccb508c7c860 h1:s/uosfzm1S8xqiT/qNa5bxfsIcH/WOiz0tadQnpoV7U= -github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230903133754-ccb508c7c860/go.mod h1:QBDbnE5CXac+jKvLHGocEYgqT6+VcfCGYhyxRmwXD7Q= -github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230903070657-5e95ddc4e0e1 h1:X/ltOWcM0+dhYQ0XRJjsNkEzzDXaGC+DLZGov6Z7t3E= -github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230903070657-5e95ddc4e0e1/go.mod h1:uUnMrqHX7Xi+OCaZEE4b3BtsmGeOSCB7XqaEWVXEH/E= +github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230904072609-688e69354a3d h1:SFZ8xDWYCsUYPd9NGEBe29L31aa2bMry92r4ZOkf2Qw= +github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230904072609-688e69354a3d/go.mod h1:XXfPmqg9mgS7eR8cgvKplyTWLfsv3IO2rnX3jmPkbb0= +github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230904072239-1e6715ddfa46 h1:9IqNDt2xaBhzyFXILsC5xaKQZUDT6Rx5UmStDtpTPTE= +github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230904072239-1e6715ddfa46/go.mod h1:uUnMrqHX7Xi+OCaZEE4b3BtsmGeOSCB7XqaEWVXEH/E= github.com/forPelevin/gomoji v1.1.8 h1:JElzDdt0TyiUlecy6PfITDL6eGvIaxqYH1V52zrd0qQ= github.com/forPelevin/gomoji v1.1.8/go.mod h1:8+Z3KNGkdslmeGZBC3tCrwMrcPy5GRzAD+gL9NAwMXg= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= diff --git a/scan/cli.go b/scan/cli.go index a99b94e1d..eb4ab3e1c 100644 --- a/scan/cli.go +++ b/scan/cli.go @@ -1,6 +1,7 @@ package scan import ( + "github.com/jfrog/jfrog-cli-core/v2/xray/commands/audit" "github.com/jfrog/jfrog-cli-core/v2/xray/commands/curation" xrCmdUtils "github.com/jfrog/jfrog-cli-core/v2/xray/commands/utils" xrutils "github.com/jfrog/jfrog-cli-core/v2/xray/utils" @@ -16,7 +17,6 @@ import ( corecommondocs "github.com/jfrog/jfrog-cli-core/v2/docs/common" coreconfig "github.com/jfrog/jfrog-cli-core/v2/utils/config" "github.com/jfrog/jfrog-cli-core/v2/utils/coreutils" - audit "github.com/jfrog/jfrog-cli-core/v2/xray/commands/audit/generic" "github.com/jfrog/jfrog-cli-core/v2/xray/commands/scan" "github.com/jfrog/jfrog-cli/docs/common" auditdocs "github.com/jfrog/jfrog-cli/docs/scan/audit" @@ -234,7 +234,7 @@ func CurationCmd(c *cli.Context) error { return progressbar.ExecWithProgress(curationAuditCommand) } -func createGenericAuditCmd(c *cli.Context) (*audit.GenericAuditCommand, error) { +func createGenericAuditCmd(c *cli.Context) (*audit.AuditCommand, error) { auditCmd := audit.NewGenericAuditCommand() err := validateXrayContext(c) if err != nil { diff --git a/xray_test.go b/xray_test.go index c10ede906..ed28812a6 100644 --- a/xray_test.go +++ b/xray_test.go @@ -706,9 +706,9 @@ func verifySimpleJsonJasResults(t *testing.T, content string, minIacViolations, assert.GreaterOrEqual(t, len(results.Iacs), minIacViolations, "Found less IaC then expected") var applicableResults, notApplicableResults int for _, vuln := range results.Vulnerabilities { - if vuln.Applicable == utils.NotApplicableStringValue { + if utils.ApplicabilityStatus(vuln.Applicable) == utils.NotApplicable { notApplicableResults++ - } else if vuln.Applicable == utils.ApplicableStringValue { + } else if utils.ApplicabilityStatus(vuln.Applicable) == utils.Applicable { applicableResults++ } } From 4bba9e1c50d850565fc9de590d6030b27cfd5fc0 Mon Sep 17 00:00:00 2001 From: delarea Date: Mon, 4 Sep 2023 10:57:35 +0300 Subject: [PATCH 28/34] Update deps --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 9dcc9ad1d..5e78899bd 100644 --- a/go.mod +++ b/go.mod @@ -125,7 +125,7 @@ require ( // replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20230828134416-f0db33dd9344 -replace github.com/jfrog/jfrog-cli-core/v2 => github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230904072609-688e69354a3d +replace github.com/jfrog/jfrog-cli-core/v2 => github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230904074759-623cdbd94d40 replace github.com/jfrog/jfrog-client-go => github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230904072239-1e6715ddfa46 diff --git a/go.sum b/go.sum index 6be4eb4f1..98f8c6559 100644 --- a/go.sum +++ b/go.sum @@ -133,8 +133,8 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230904072609-688e69354a3d h1:SFZ8xDWYCsUYPd9NGEBe29L31aa2bMry92r4ZOkf2Qw= -github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230904072609-688e69354a3d/go.mod h1:XXfPmqg9mgS7eR8cgvKplyTWLfsv3IO2rnX3jmPkbb0= +github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230904074759-623cdbd94d40 h1:Fa2l91BN4PaWId59mxfIOvwMaYqTAwCCFKUzpCUhcdA= +github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230904074759-623cdbd94d40/go.mod h1:XXfPmqg9mgS7eR8cgvKplyTWLfsv3IO2rnX3jmPkbb0= github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230904072239-1e6715ddfa46 h1:9IqNDt2xaBhzyFXILsC5xaKQZUDT6Rx5UmStDtpTPTE= github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230904072239-1e6715ddfa46/go.mod h1:uUnMrqHX7Xi+OCaZEE4b3BtsmGeOSCB7XqaEWVXEH/E= github.com/forPelevin/gomoji v1.1.8 h1:JElzDdt0TyiUlecy6PfITDL6eGvIaxqYH1V52zrd0qQ= From a064ee4d8b38fd56eccba6ab28ec269b7250f1fe Mon Sep 17 00:00:00 2001 From: delarea Date: Wed, 6 Sep 2023 10:05:58 +0300 Subject: [PATCH 29/34] update deps --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index a136a172d..384120594 100644 --- a/go.mod +++ b/go.mod @@ -125,7 +125,7 @@ require ( // replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20230828134416-f0db33dd9344 -replace github.com/jfrog/jfrog-cli-core/v2 => github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230905110023-5f3ac877bde1 +replace github.com/jfrog/jfrog-cli-core/v2 => github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230906070221-a9521b473575 // replace github.com/jfrog/gofrog => github.com/jfrog/gofrog v1.2.6-0.20230418122323-2bf299dd6d27 diff --git a/go.sum b/go.sum index 4c948de61..3229f0ac6 100644 --- a/go.sum +++ b/go.sum @@ -133,8 +133,8 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230905110023-5f3ac877bde1 h1:rOI3A/31hzN7GKZbIgfkhVLuknC9EvCe+R2PtOIvkCA= -github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230905110023-5f3ac877bde1/go.mod h1:XXfPmqg9mgS7eR8cgvKplyTWLfsv3IO2rnX3jmPkbb0= +github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230906070221-a9521b473575 h1:hxPQMMg55UV9AUbDymbxkLMugjHzrgyO+n8PWDJlPuQ= +github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230906070221-a9521b473575/go.mod h1:XXfPmqg9mgS7eR8cgvKplyTWLfsv3IO2rnX3jmPkbb0= github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230904072239-1e6715ddfa46 h1:9IqNDt2xaBhzyFXILsC5xaKQZUDT6Rx5UmStDtpTPTE= github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230904072239-1e6715ddfa46/go.mod h1:uUnMrqHX7Xi+OCaZEE4b3BtsmGeOSCB7XqaEWVXEH/E= github.com/forPelevin/gomoji v1.1.8 h1:JElzDdt0TyiUlecy6PfITDL6eGvIaxqYH1V52zrd0qQ= From 8a6b7ad27d3561bee8ecd41513ef28ba44cd924d Mon Sep 17 00:00:00 2001 From: delarea Date: Wed, 6 Sep 2023 18:45:39 +0300 Subject: [PATCH 30/34] update deps --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 384120594..5875e2051 100644 --- a/go.mod +++ b/go.mod @@ -125,10 +125,10 @@ require ( // replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20230828134416-f0db33dd9344 -replace github.com/jfrog/jfrog-cli-core/v2 => github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230906070221-a9521b473575 +replace github.com/jfrog/jfrog-cli-core/v2 => github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230906153321-80f33a635ea7 // replace github.com/jfrog/gofrog => github.com/jfrog/gofrog v1.2.6-0.20230418122323-2bf299dd6d27 -replace github.com/jfrog/jfrog-client-go => github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230904072239-1e6715ddfa46 +replace github.com/jfrog/jfrog-client-go => github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230906153055-d354c901410e -replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20230831151231-e5e7bd035ddc +replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20230905120411-62d1bdd4eb38 diff --git a/go.sum b/go.sum index 3229f0ac6..6ced252b7 100644 --- a/go.sum +++ b/go.sum @@ -133,10 +133,10 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230906070221-a9521b473575 h1:hxPQMMg55UV9AUbDymbxkLMugjHzrgyO+n8PWDJlPuQ= -github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230906070221-a9521b473575/go.mod h1:XXfPmqg9mgS7eR8cgvKplyTWLfsv3IO2rnX3jmPkbb0= -github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230904072239-1e6715ddfa46 h1:9IqNDt2xaBhzyFXILsC5xaKQZUDT6Rx5UmStDtpTPTE= -github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230904072239-1e6715ddfa46/go.mod h1:uUnMrqHX7Xi+OCaZEE4b3BtsmGeOSCB7XqaEWVXEH/E= +github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230906153321-80f33a635ea7 h1:uOqcZ/jCbpVzgdrKVloDhYA60rk931jFzSrKZpVEq58= +github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230906153321-80f33a635ea7/go.mod h1:cQ2aSJFYzU0s77X4tY5guQwkBQhtMwN8ycmjO9RakOc= +github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230906153055-d354c901410e h1:cjdUlHela0T6ICQsfwisHLR89M6ZdljcQrlxwYVT39M= +github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230906153055-d354c901410e/go.mod h1:soD5VL3X+G+0KKUNSlb0CSdF9nwHsQZCr0xqOGedAHM= github.com/forPelevin/gomoji v1.1.8 h1:JElzDdt0TyiUlecy6PfITDL6eGvIaxqYH1V52zrd0qQ= github.com/forPelevin/gomoji v1.1.8/go.mod h1:8+Z3KNGkdslmeGZBC3tCrwMrcPy5GRzAD+gL9NAwMXg= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= @@ -239,8 +239,8 @@ github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOl github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jedib0t/go-pretty/v6 v6.4.7 h1:lwiTJr1DEkAgzljsUsORmWsVn5MQjt1BPJdPCtJ6KXE= github.com/jedib0t/go-pretty/v6 v6.4.7/go.mod h1:Ndk3ase2CkQbXLLNf5QDHoYb6J9WtVfmHZu9n8rk2xs= -github.com/jfrog/build-info-go v1.8.9-0.20230831151231-e5e7bd035ddc h1:pqu82clhPKyUKJcljMuxYa+kviaWnHycLNCLqZZNl30= -github.com/jfrog/build-info-go v1.8.9-0.20230831151231-e5e7bd035ddc/go.mod h1:QEskae5fQpjeY2PBzsjWtUQVskYSNDF2sSmw/Gx44dQ= +github.com/jfrog/build-info-go v1.8.9-0.20230905120411-62d1bdd4eb38 h1:XyAcwWP2a6a5RL861gkfgQ7MUaQ7mmDkUVoD6kMtUtQ= +github.com/jfrog/build-info-go v1.8.9-0.20230905120411-62d1bdd4eb38/go.mod h1:QEskae5fQpjeY2PBzsjWtUQVskYSNDF2sSmw/Gx44dQ= github.com/jfrog/gofrog v1.3.0 h1:o4zgsBZE4QyDbz2M7D4K6fXPTBJht+8lE87mS9bw7Gk= github.com/jfrog/gofrog v1.3.0/go.mod h1:IFMc+V/yf7rA5WZ74CSbXe+Lgf0iApEQLxRZVzKRUR0= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= From f4825ba625e2e2f65f7dd60cc1c62c726c3e3089 Mon Sep 17 00:00:00 2001 From: delarea Date: Thu, 7 Sep 2023 12:28:25 +0300 Subject: [PATCH 31/34] update deps --- CONTRIBUTING.md | 2 +- go.mod | 4 ++-- go.sum | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index adc75616d..56422d4f5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -92,7 +92,7 @@ The available flags are: The available test types are: | Type | Description | -|----------------------|--------------------| +| -------------------- | ------------------ | | `-test.artifactory` | Artifactory tests | | `-test.access` | Access tests | | `-test.npm` | Npm tests | diff --git a/go.mod b/go.mod index 5875e2051..f8e52f4f8 100644 --- a/go.mod +++ b/go.mod @@ -125,10 +125,10 @@ require ( // replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20230828134416-f0db33dd9344 -replace github.com/jfrog/jfrog-cli-core/v2 => github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230906153321-80f33a635ea7 +replace github.com/jfrog/jfrog-cli-core/v2 => github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230907092350-9c23e7a8c940 // replace github.com/jfrog/gofrog => github.com/jfrog/gofrog v1.2.6-0.20230418122323-2bf299dd6d27 -replace github.com/jfrog/jfrog-client-go => github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230906153055-d354c901410e +replace github.com/jfrog/jfrog-client-go => github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230907064804-16e49175c49f replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20230905120411-62d1bdd4eb38 diff --git a/go.sum b/go.sum index 6ced252b7..2dd0e46fa 100644 --- a/go.sum +++ b/go.sum @@ -133,10 +133,10 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230906153321-80f33a635ea7 h1:uOqcZ/jCbpVzgdrKVloDhYA60rk931jFzSrKZpVEq58= -github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230906153321-80f33a635ea7/go.mod h1:cQ2aSJFYzU0s77X4tY5guQwkBQhtMwN8ycmjO9RakOc= -github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230906153055-d354c901410e h1:cjdUlHela0T6ICQsfwisHLR89M6ZdljcQrlxwYVT39M= -github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230906153055-d354c901410e/go.mod h1:soD5VL3X+G+0KKUNSlb0CSdF9nwHsQZCr0xqOGedAHM= +github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230907092350-9c23e7a8c940 h1:aMwVU110YALva+jOjaksCfLKTUWiIfQe6rr/7iMXecY= +github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230907092350-9c23e7a8c940/go.mod h1:6TYiVnmG5gFODE0D65q/SSvmR4l+mDJ+SPKuFyLqSEE= +github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230907064804-16e49175c49f h1:V9d6ThTH0cpDAE3iffShj5AM/3zrkdW2BihzrLN1BPg= +github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230907064804-16e49175c49f/go.mod h1:soD5VL3X+G+0KKUNSlb0CSdF9nwHsQZCr0xqOGedAHM= github.com/forPelevin/gomoji v1.1.8 h1:JElzDdt0TyiUlecy6PfITDL6eGvIaxqYH1V52zrd0qQ= github.com/forPelevin/gomoji v1.1.8/go.mod h1:8+Z3KNGkdslmeGZBC3tCrwMrcPy5GRzAD+gL9NAwMXg= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= From 2dad9730556b4fb860bf28e0b91bac327c677adf Mon Sep 17 00:00:00 2001 From: delarea Date: Fri, 8 Sep 2023 16:13:42 +0300 Subject: [PATCH 32/34] update deps --- go.mod | 10 ++-------- go.sum | 15 ++------------- 2 files changed, 4 insertions(+), 21 deletions(-) diff --git a/go.mod b/go.mod index ed824d456..94f164502 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,6 @@ require ( github.com/jfrog/jfrog-client-go v1.31.6 github.com/jszwec/csvutil v1.8.0 github.com/mholt/archiver/v3 v3.5.1 - github.com/opencontainers/runc v1.1.5 github.com/stretchr/testify v1.8.4 github.com/testcontainers/testcontainers-go v0.23.0 github.com/urfave/cli v1.22.14 @@ -39,13 +38,10 @@ require ( github.com/c-bata/go-prompt v0.2.5 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/chzyer/readline v1.5.1 // indirect - github.com/cilium/ebpf v0.9.1 // indirect github.com/cloudflare/circl v1.3.3 // indirect github.com/containerd/containerd v1.7.3 // indirect - github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/cpuguy83/dockercfg v0.3.1 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect - github.com/cyphar/filepath-securejoin v0.2.3 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/docker/distribution v2.8.2+incompatible // indirect github.com/docker/docker v24.0.5+incompatible // indirect @@ -57,7 +53,6 @@ require ( github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect github.com/go-git/go-billy/v5 v5.4.1 // indirect - github.com/godbus/dbus/v5 v5.1.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v4 v4.5.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect @@ -81,14 +76,13 @@ require ( github.com/minio/sha256-simd v1.0.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/moby/patternmatcher v0.5.0 // indirect - github.com/moby/sys/mountinfo v0.6.2 // indirect github.com/moby/sys/sequential v0.5.0 // indirect github.com/moby/term v0.5.0 // indirect github.com/morikuni/aec v1.0.0 // indirect github.com/nwaples/rardecode v1.1.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0-rc4 // indirect - github.com/opencontainers/runtime-spec v1.1.0-rc.1 // indirect + github.com/opencontainers/runc v1.1.5 // indirect github.com/owenrumney/go-sarif/v2 v2.2.0 // indirect github.com/pelletier/go-toml/v2 v2.0.8 // indirect github.com/pierrec/lz4/v4 v4.1.2 // indirect @@ -135,6 +129,6 @@ replace github.com/jfrog/jfrog-cli-core/v2 => github.com/eyaldelarea/jfrog-cli-c // replace github.com/jfrog/gofrog => github.com/jfrog/gofrog v1.2.6-0.20230418122323-2bf299dd6d27 -replace github.com/jfrog/jfrog-client-go => github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230908115256-d79c6685581d +replace github.com/jfrog/jfrog-client-go => github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230908125028-d74eec0e77cf replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20230905120411-62d1bdd4eb38 diff --git a/go.sum b/go.sum index efef8bde8..c32350251 100644 --- a/go.sum +++ b/go.sum @@ -88,8 +88,6 @@ github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMn github.com/chzyer/test v1.0.0 h1:p3BQDXSxOhOG0P9z6/hGnII4LGiEPOYBhs8asl/fC04= github.com/chzyer/test v1.0.0/go.mod h1:2JlltgoNkt4TW/z9V/IzDdFaMTM2JPIi26O1pF38GC8= github.com/cilium/ebpf v0.7.0/go.mod h1:/oI2+1shJiTGAMgl6/RgJr36Eo1jzrRcAWbcXO2usCA= -github.com/cilium/ebpf v0.9.1 h1:64sn2K3UKw8NbP/blsixRpF3nXuyhz/VjRlRzvlBRu4= -github.com/cilium/ebpf v0.9.1/go.mod h1:+OhNOIXx/Fnu1IE8bJz2dzOA+VSfyTfdNUVdlQnxUFY= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEMs= github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= @@ -100,8 +98,6 @@ github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkX github.com/containerd/containerd v1.7.3 h1:cKwYKkP1eTj54bP3wCdXXBymmKRQMrWjkLSWZZJDa8o= github.com/containerd/containerd v1.7.3/go.mod h1:32FOM4/O0RkNg7AjQj3hDzN9cUGtu+HMvaKUNiqCZB8= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= -github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cpuguy83/dockercfg v0.3.1 h1:/FpZ+JaygUR/lZP2NlFI2DVfrOEMAIKP5wWEJdoYe9E= github.com/cpuguy83/dockercfg v0.3.1/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= @@ -139,8 +135,8 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.m github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230908125357-1a8083ec27d6 h1:oX4BNcFKH6cuMhVV+/0fZJMQPZaMLkL5PYr1yBqzj80= github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230908125357-1a8083ec27d6/go.mod h1:SYqc9qeU7PcYBX+FjN3McE1N9rZQkEewOs7K+JRK7dQ= -github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230908115256-d79c6685581d h1:zar9XhtRzDJhSm61UlILuxivKXBnhZKNJ0yoXMFGOic= -github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230908115256-d79c6685581d/go.mod h1:soD5VL3X+G+0KKUNSlb0CSdF9nwHsQZCr0xqOGedAHM= +github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230908125028-d74eec0e77cf h1:uh8eJRKBAY8MtCt5pPC8Wer6KZMnaid0f+pYIh6anA8= +github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230908125028-d74eec0e77cf/go.mod h1:soD5VL3X+G+0KKUNSlb0CSdF9nwHsQZCr0xqOGedAHM= github.com/forPelevin/gomoji v1.1.8 h1:JElzDdt0TyiUlecy6PfITDL6eGvIaxqYH1V52zrd0qQ= github.com/forPelevin/gomoji v1.1.8/go.mod h1:8+Z3KNGkdslmeGZBC3tCrwMrcPy5GRzAD+gL9NAwMXg= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= @@ -162,8 +158,6 @@ github.com/gocarina/gocsv v0.0.0-20230616125104-99d496ca653d h1:KbPOUXFUDJxwZ04v github.com/gocarina/gocsv v0.0.0-20230616125104-99d496ca653d/go.mod h1:5YoVOkjYAQumqlV356Hj3xeYh4BdZuLE0/nRkf2NKkI= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk= -github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= @@ -304,8 +298,6 @@ github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RR github.com/moby/patternmatcher v0.5.0 h1:YCZgJOeULcxLw1Q+sVR636pmS7sPEn1Qo2iAN6M7DBo= github.com/moby/patternmatcher v0.5.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU= -github.com/moby/sys/mountinfo v0.6.2 h1:BzJjoreD5BMFNmD9Rus6gdd1pLuecOFPt8wC+Vygl78= -github.com/moby/sys/mountinfo v0.6.2/go.mod h1:IJb6JQeOklcdMU9F5xQ8ZALD+CUr5VlGpwtX+VE0rpI= github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo= github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= @@ -323,8 +315,6 @@ github.com/opencontainers/image-spec v1.1.0-rc4/go.mod h1:X4pATf0uXsnn3g5aiGIsVn github.com/opencontainers/runc v1.1.5 h1:L44KXEpKmfWDcS02aeGm8QNTFXTo2D+8MYGDIJ/GDEs= github.com/opencontainers/runc v1.1.5/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-spec v1.1.0-rc.1 h1:wHa9jroFfKGQqFHj0I1fMRKLl0pfj+ynAqBxo3v6u9w= -github.com/opencontainers/runtime-spec v1.1.0-rc.1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= github.com/owenrumney/go-sarif v1.1.1/go.mod h1:dNDiPlF04ESR/6fHlPyq7gHKmrM0sHUvAGjsoh8ZH0U= github.com/owenrumney/go-sarif/v2 v2.2.0 h1:1DmZaijK0HBZCR1fgcDSGa7VzYkU9NDmbZ7qC2QfUjE= @@ -354,7 +344,6 @@ github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZV github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646 h1:RpforrEYXWkmGwJHIGnLZ3tTWStkjVVstwzNGqxX2Ds= github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= From f92fb12b246708a1f9523d1e7ce282d855e090e2 Mon Sep 17 00:00:00 2001 From: delarea Date: Sun, 10 Sep 2023 10:45:24 +0300 Subject: [PATCH 33/34] CR --- .github/workflows/xrayTests.yml | 4 ++-- go.mod | 4 ++-- go.sum | 8 ++++---- xsc_test.go | 5 +++-- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/xrayTests.yml b/.github/workflows/xrayTests.yml index b376304b2..e5e79fe08 100644 --- a/.github/workflows/xrayTests.yml +++ b/.github/workflows/xrayTests.yml @@ -19,7 +19,7 @@ jobs: strategy: fail-fast: false matrix: - suite: [ xray,xsc ] + suite: [ xray, xsc ] os: [ ubuntu, windows, macos ] runs-on: ${{ matrix.os }}-latest env: @@ -66,7 +66,7 @@ jobs: ref: ${{ github.event.pull_request.head.sha }} - name: Run Xray tests (without Docker Scan) - run: go test -v github.com/jfrog/jfrog-cli --timeout 0 --test.xray --jfrog.url=${{ secrets.PLATFORM_URL }} --jfrog.adminToken=${{ secrets.PLATFORM_ADMIN_TOKEN }} --jfrog.user=${{ secrets.PLATFORM_USER }} --test.containerRegistry=${{ secrets.CONTAINER_REGISTRY }} + run: go test -v github.com/jfrog/jfrog-cli --timeout 0 --test.${{matrix.suite}} --jfrog.url=${{ secrets.PLATFORM_URL }} --jfrog.adminToken=${{ secrets.PLATFORM_ADMIN_TOKEN }} --jfrog.user=${{ secrets.PLATFORM_USER }} --test.containerRegistry=${{ secrets.CONTAINER_REGISTRY }} if: ${{ matrix.os != 'ubuntu' }} - name: Run Xray tests (with Docker Scan, only on Ubuntu) diff --git a/go.mod b/go.mod index 94f164502..5fd0d4a72 100644 --- a/go.mod +++ b/go.mod @@ -125,10 +125,10 @@ require ( // replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20230828134416-f0db33dd9344 -replace github.com/jfrog/jfrog-cli-core/v2 => github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230908125357-1a8083ec27d6 +replace github.com/jfrog/jfrog-cli-core/v2 => github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230910074248-e3e3e883d593 // replace github.com/jfrog/gofrog => github.com/jfrog/gofrog v1.2.6-0.20230418122323-2bf299dd6d27 -replace github.com/jfrog/jfrog-client-go => github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230908125028-d74eec0e77cf +replace github.com/jfrog/jfrog-client-go => github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230910065344-cd281a38a388 replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20230905120411-62d1bdd4eb38 diff --git a/go.sum b/go.sum index c32350251..5587a78d9 100644 --- a/go.sum +++ b/go.sum @@ -133,10 +133,10 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230908125357-1a8083ec27d6 h1:oX4BNcFKH6cuMhVV+/0fZJMQPZaMLkL5PYr1yBqzj80= -github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230908125357-1a8083ec27d6/go.mod h1:SYqc9qeU7PcYBX+FjN3McE1N9rZQkEewOs7K+JRK7dQ= -github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230908125028-d74eec0e77cf h1:uh8eJRKBAY8MtCt5pPC8Wer6KZMnaid0f+pYIh6anA8= -github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230908125028-d74eec0e77cf/go.mod h1:soD5VL3X+G+0KKUNSlb0CSdF9nwHsQZCr0xqOGedAHM= +github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230910074248-e3e3e883d593 h1:4tMp6ijJxxAMcF2F53i5F9FUE4CoC4sb3FeJuF9+EXI= +github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230910074248-e3e3e883d593/go.mod h1:iiGwyQ0gdrwmRS19KjJ8Lf5O4I2qyfQI0eFhO3E0ihY= +github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230910065344-cd281a38a388 h1:3vTN6b8jHhpbrXKSNwiILZ3gAiv412bgjvzRa82EELA= +github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230910065344-cd281a38a388/go.mod h1:soD5VL3X+G+0KKUNSlb0CSdF9nwHsQZCr0xqOGedAHM= github.com/forPelevin/gomoji v1.1.8 h1:JElzDdt0TyiUlecy6PfITDL6eGvIaxqYH1V52zrd0qQ= github.com/forPelevin/gomoji v1.1.8/go.mod h1:8+Z3KNGkdslmeGZBC3tCrwMrcPy5GRzAD+gL9NAwMXg= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= diff --git a/xsc_test.go b/xsc_test.go index 1ffd7fcd3..07d1eb9d3 100644 --- a/xsc_test.go +++ b/xsc_test.go @@ -2,6 +2,7 @@ package main import ( "github.com/jfrog/jfrog-cli-core/v2/xray/scangraph" + "github.com/jfrog/jfrog-cli-core/v2/xray/utils" "github.com/jfrog/jfrog-cli/utils/tests" clientutils "github.com/jfrog/jfrog-client-go/utils" "testing" @@ -19,7 +20,7 @@ func validateXscVersion(t *testing.T, minVersion string) { t.Skip(err) } } -func TestXSCAudit(t *testing.T) { +func TestXscAudit(t *testing.T) { initXscTest(t, scangraph.XscMinVersion) - testXrayAuditNpm(t, "json", true) + testXrayAuditNpm(t, string(utils.Json), true) } From cd5eb940fb12f972316b5aeb8f5c0eb83c64c877 Mon Sep 17 00:00:00 2001 From: delarea Date: Sun, 10 Sep 2023 15:30:19 +0300 Subject: [PATCH 34/34] change to new xsc --- general/cisetup/utils.go | 6 +++--- go.mod | 4 ++-- go.sum | 8 ++++---- inttestutils/buildinfo.go | 2 +- scan/cli.go | 2 +- utils/cliutils/utils.go | 3 --- utils/tests/consts.go | 1 - utils/tests/utils.go | 2 +- xray_test.go | 21 +++++++++++---------- xsc_test.go | 26 -------------------------- 10 files changed, 23 insertions(+), 52 deletions(-) delete mode 100644 xsc_test.go diff --git a/general/cisetup/utils.go b/general/cisetup/utils.go index ed50ae443..94e025169 100644 --- a/general/cisetup/utils.go +++ b/general/cisetup/utils.go @@ -6,7 +6,7 @@ import ( "github.com/jfrog/jfrog-cli-core/v2/utils/coreutils" "github.com/jfrog/jfrog-client-go/artifactory/services" "github.com/jfrog/jfrog-client-go/config" - services2 "github.com/jfrog/jfrog-client-go/xray/services" + "github.com/jfrog/jfrog-client-go/xray" ) const ( @@ -24,7 +24,7 @@ var buildCmdByTech = map[coreutils.Technology]string{ coreutils.Npm: npmDefaultBuildCmd, } -func CreateXrayServiceManager(serviceDetails *utilsconfig.ServerDetails) (services2.SecurityServiceManager, error) { +func CreateXrayServiceManager(serviceDetails *utilsconfig.ServerDetails) (*xray.XrayServicesManager, error) { xrayDetails, err := serviceDetails.CreateXrayAuthConfig() if err != nil { return nil, err @@ -35,7 +35,7 @@ func CreateXrayServiceManager(serviceDetails *utilsconfig.ServerDetails) (servic if err != nil { return nil, err } - return services2.New(serviceConfig) + return xray.New(serviceConfig) } func GetAllRepos(serviceDetails *utilsconfig.ServerDetails, repoType, packageType string) (*[]services.RepositoryDetails, error) { diff --git a/go.mod b/go.mod index 5fd0d4a72..19f8d34ca 100644 --- a/go.mod +++ b/go.mod @@ -125,10 +125,10 @@ require ( // replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20230828134416-f0db33dd9344 -replace github.com/jfrog/jfrog-cli-core/v2 => github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230910074248-e3e3e883d593 +replace github.com/jfrog/jfrog-cli-core/v2 => github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230910120756-f1d0181a0403 // replace github.com/jfrog/gofrog => github.com/jfrog/gofrog v1.2.6-0.20230418122323-2bf299dd6d27 -replace github.com/jfrog/jfrog-client-go => github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230910065344-cd281a38a388 +replace github.com/jfrog/jfrog-client-go => github.com/eyaldelarea/jfrog-client-go v1.28.1-0.20230910120113-823b4c7b06b7 replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20230905120411-62d1bdd4eb38 diff --git a/go.sum b/go.sum index 5587a78d9..51f449dd0 100644 --- a/go.sum +++ b/go.sum @@ -133,10 +133,10 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230910074248-e3e3e883d593 h1:4tMp6ijJxxAMcF2F53i5F9FUE4CoC4sb3FeJuF9+EXI= -github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230910074248-e3e3e883d593/go.mod h1:iiGwyQ0gdrwmRS19KjJ8Lf5O4I2qyfQI0eFhO3E0ihY= -github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230910065344-cd281a38a388 h1:3vTN6b8jHhpbrXKSNwiILZ3gAiv412bgjvzRa82EELA= -github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230910065344-cd281a38a388/go.mod h1:soD5VL3X+G+0KKUNSlb0CSdF9nwHsQZCr0xqOGedAHM= +github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230910120756-f1d0181a0403 h1:A7QvUrYpcqNmXpqGvZIwCet2u0C4VmMsqOW1aw0/K7g= +github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230910120756-f1d0181a0403/go.mod h1:D5BnCwgET5TWtmyPYgfoUhShN9egbpfdSSP1cqvS99M= +github.com/eyaldelarea/jfrog-client-go v1.28.1-0.20230910120113-823b4c7b06b7 h1:g97j04e90zFXJMabA8RmccWbEXxDwKpQ+afBeainJmg= +github.com/eyaldelarea/jfrog-client-go v1.28.1-0.20230910120113-823b4c7b06b7/go.mod h1:soD5VL3X+G+0KKUNSlb0CSdF9nwHsQZCr0xqOGedAHM= github.com/forPelevin/gomoji v1.1.8 h1:JElzDdt0TyiUlecy6PfITDL6eGvIaxqYH1V52zrd0qQ= github.com/forPelevin/gomoji v1.1.8/go.mod h1:8+Z3KNGkdslmeGZBC3tCrwMrcPy5GRzAD+gL9NAwMXg= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= diff --git a/inttestutils/buildinfo.go b/inttestutils/buildinfo.go index 611484388..3003172bf 100644 --- a/inttestutils/buildinfo.go +++ b/inttestutils/buildinfo.go @@ -2,7 +2,6 @@ package inttestutils import ( "fmt" - "github.com/jfrog/jfrog-client-go/utils" "net/http" "path" "testing" @@ -13,6 +12,7 @@ import ( coreutils "github.com/jfrog/jfrog-cli-core/v2/artifactory/utils" "github.com/jfrog/jfrog-client-go/http/httpclient" + "github.com/jfrog/jfrog-client-go/utils" "github.com/jfrog/jfrog-client-go/utils/io/httputils" "github.com/jfrog/jfrog-client-go/utils/log" "github.com/stretchr/testify/assert" diff --git a/scan/cli.go b/scan/cli.go index 6cf928c7f..0cb030a7c 100644 --- a/scan/cli.go +++ b/scan/cli.go @@ -1,7 +1,6 @@ package scan import ( - "github.com/jfrog/jfrog-cli-core/v2/xray/commands/audit" "github.com/jfrog/jfrog-cli-core/v2/xray/commands/curation" xrutils "github.com/jfrog/jfrog-cli-core/v2/xray/utils" curationdocs "github.com/jfrog/jfrog-cli/docs/scan/curation" @@ -16,6 +15,7 @@ import ( corecommondocs "github.com/jfrog/jfrog-cli-core/v2/docs/common" coreconfig "github.com/jfrog/jfrog-cli-core/v2/utils/config" "github.com/jfrog/jfrog-cli-core/v2/utils/coreutils" + "github.com/jfrog/jfrog-cli-core/v2/xray/commands/audit" "github.com/jfrog/jfrog-cli-core/v2/xray/commands/scan" "github.com/jfrog/jfrog-cli/docs/common" auditdocs "github.com/jfrog/jfrog-cli/docs/scan/audit" diff --git a/utils/cliutils/utils.go b/utils/cliutils/utils.go index e868f2ea3..d8f3044fb 100644 --- a/utils/cliutils/utils.go +++ b/utils/cliutils/utils.go @@ -5,7 +5,6 @@ import ( "errors" "fmt" "github.com/jfrog/gofrog/version" - "github.com/jfrog/jfrog-cli/utils/tests" "io" "net/http" "os" @@ -365,7 +364,6 @@ func ShouldOfferConfig() (bool, error) { func CreateServerDetailsFromFlags(c *cli.Context) (details *coreConfig.ServerDetails, err error) { details = new(coreConfig.ServerDetails) details.Url = clientutils.AddTrailingSlashIfNeeded(c.String(url)) - details.XscUrl = clientutils.ReplaceXraySuffixWithXsc(details.Url) details.ArtifactoryUrl = clientutils.AddTrailingSlashIfNeeded(c.String(configRtUrl)) details.DistributionUrl = clientutils.AddTrailingSlashIfNeeded(c.String(configDistUrl)) details.XrayUrl = clientutils.AddTrailingSlashIfNeeded(c.String(configXrUrl)) @@ -508,7 +506,6 @@ func CreateServerDetailsWithConfigOffer(c *cli.Context, excludeRefreshableTokens // Take insecureTls value from options since it is not saved in config. confDetails.InsecureTls = details.InsecureTls confDetails.Url = clientutils.AddTrailingSlashIfNeeded(confDetails.Url) - confDetails.XscUrl = clientutils.AddTrailingSlashIfNeeded(confDetails.Url + tests.XscEndpoint) confDetails.DistributionUrl = clientutils.AddTrailingSlashIfNeeded(confDetails.DistributionUrl) // Create initial access token if needed. diff --git a/utils/tests/consts.go b/utils/tests/consts.go index 1105be541..f415aa1f0 100644 --- a/utils/tests/consts.go +++ b/utils/tests/consts.go @@ -148,7 +148,6 @@ const ( DockerRemoteRepositoryConfig = "docker_remote_repository_config.json" DockerVirtualRepositoryConfig = "docker_virtual_repository_config.json" XrayEndpoint = "xray/" - XscEndpoint = "xsc/" DevRepoRepositoryConfig = "dev_repo_repository_config.json" ProdRepoRepositoryConfig = "prod_repo_repository_config.json" UploadDevSpecA = "upload_dev_spec_a.json" diff --git a/utils/tests/utils.go b/utils/tests/utils.go index 773091a8a..5d278f6f5 100644 --- a/utils/tests/utils.go +++ b/utils/tests/utils.go @@ -7,7 +7,6 @@ import ( "errors" "flag" "fmt" - "github.com/jfrog/jfrog-client-go/utils/tests" "io" "math/rand" "os" @@ -37,6 +36,7 @@ import ( "github.com/jfrog/jfrog-client-go/utils/errorutils" "github.com/jfrog/jfrog-client-go/utils/io/fileutils" "github.com/jfrog/jfrog-client-go/utils/log" + "github.com/jfrog/jfrog-client-go/utils/tests" "github.com/stretchr/testify/assert" ) diff --git a/xray_test.go b/xray_test.go index 71fc36c95..963e9b22e 100644 --- a/xray_test.go +++ b/xray_test.go @@ -6,9 +6,7 @@ import ( "flag" "fmt" biutils "github.com/jfrog/build-info-go/utils" - "github.com/jfrog/jfrog-cli-core/v2/utils/coreutils" "github.com/jfrog/jfrog-cli-core/v2/xray/scangraph" - "github.com/jfrog/jfrog-client-go/xray/services" "net/http" "net/http/httptest" "os" @@ -29,6 +27,7 @@ import ( coreCmd "github.com/jfrog/jfrog-cli-core/v2/common/commands" commontests "github.com/jfrog/jfrog-cli-core/v2/common/tests" "github.com/jfrog/jfrog-cli-core/v2/utils/config" + "github.com/jfrog/jfrog-cli-core/v2/utils/coreutils" coretests "github.com/jfrog/jfrog-cli-core/v2/utils/tests" coreCuration "github.com/jfrog/jfrog-cli-core/v2/xray/commands/curation" "github.com/jfrog/jfrog-cli-core/v2/xray/commands/scan" @@ -41,6 +40,7 @@ import ( clientUtils "github.com/jfrog/jfrog-client-go/utils" "github.com/jfrog/jfrog-client-go/utils/io/fileutils" clientTestUtils "github.com/jfrog/jfrog-client-go/utils/tests" + "github.com/jfrog/jfrog-client-go/xray/services" xrayUtils "github.com/jfrog/jfrog-client-go/xray/services/utils" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -60,7 +60,7 @@ func InitXrayTests() { func authenticateXray() string { *tests.JfrogUrl = clientUtils.AddTrailingSlashIfNeeded(*tests.JfrogUrl) - xrayDetails = &config.ServerDetails{Url: *tests.JfrogUrl, XrayUrl: *tests.JfrogUrl + tests.XrayEndpoint, XscUrl: *tests.JfrogUrl + tests.XscEndpoint} + xrayDetails = &config.ServerDetails{XrayUrl: *tests.JfrogUrl + tests.XrayEndpoint} cred := fmt.Sprintf("--url=%s", xrayDetails.XrayUrl) if *tests.JfrogAccessToken != "" { xrayDetails.AccessToken = *tests.JfrogAccessToken @@ -76,7 +76,6 @@ func authenticateXray() string { coreutils.ExitOnErr(errors.New("Failed while attempting to authenticate with Xray: " + err.Error())) } xrayDetails.XrayUrl = xrayAuth.GetUrl() - xrayDetails.XscUrl = xrayAuth.GetXscUrl() return cred } @@ -139,19 +138,16 @@ func TestXrayBinaryScanWithBypassArchiveLimits(t *testing.T) { // Tests npm audit by providing simple npm project and asserts any error. func TestXrayAuditNpmJson(t *testing.T) { - output := testXrayAuditNpm(t, string(utils.Json), false) + output := testXrayAuditNpm(t, string(utils.Json)) verifyJsonScanResults(t, output, 0, 1, 1) } func TestXrayAuditNpmSimpleJson(t *testing.T) { - output := testXrayAuditNpm(t, string(utils.SimpleJson), false) + output := testXrayAuditNpm(t, string(utils.SimpleJson)) verifySimpleJsonScanResults(t, output, 1, 1) } -func testXrayAuditNpm(t *testing.T, format string, isXsc bool) string { - if !isXsc { - initXrayTest(t, scangraph.GraphScanMinXrayVersion) - } +func testXrayAuditNpm(t *testing.T, format string) string { initXrayTest(t, scangraph.GraphScanMinXrayVersion) tempDirPath, createTempDirCallback := coretests.CreateTempDirWithCallbackAndAssert(t) defer createTempDirCallback() @@ -774,6 +770,11 @@ func TestCurationAudit(t *testing.T) { } } +func TestXscAudit(t *testing.T) { + output := testXrayAuditNpm(t, string(utils.SimpleJson)) + verifySimpleJsonScanResults(t, output, 1, 1) +} + func getCurationExpectedResponse(config *config.ServerDetails) []coreCuration.PackageStatus { expectedResp := []coreCuration.PackageStatus{ { diff --git a/xsc_test.go b/xsc_test.go deleted file mode 100644 index 07d1eb9d3..000000000 --- a/xsc_test.go +++ /dev/null @@ -1,26 +0,0 @@ -package main - -import ( - "github.com/jfrog/jfrog-cli-core/v2/xray/scangraph" - "github.com/jfrog/jfrog-cli-core/v2/xray/utils" - "github.com/jfrog/jfrog-cli/utils/tests" - clientutils "github.com/jfrog/jfrog-client-go/utils" - "testing" -) - -func initXscTest(t *testing.T, minVersion string) { - if !*tests.TestXsc { - t.Skip("Skipping Xsc test. To run xsc test add the '-test.xsc=true' option.") - } - validateXscVersion(t, minVersion) -} -func validateXscVersion(t *testing.T, minVersion string) { - err := clientutils.ValidateMinimumVersion(clientutils.Xray, xrayDetails.XscVersion, minVersion) - if err != nil { - t.Skip(err) - } -} -func TestXscAudit(t *testing.T) { - initXscTest(t, scangraph.XscMinVersion) - testXrayAuditNpm(t, string(utils.Json), true) -}