From 139a81d6125ca604bc48915cb78eff9dc4951f05 Mon Sep 17 00:00:00 2001 From: attiasas Date: Sun, 2 Feb 2025 14:06:24 +0200 Subject: [PATCH] CR changes --- utils/consts.go | 2 +- utils/params.go | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/utils/consts.go b/utils/consts.go index 97b064e6a..5260930db 100644 --- a/utils/consts.go +++ b/utils/consts.go @@ -75,7 +75,7 @@ const ( AllowedLicensesEnv = "JF_ALLOWED_LICENSES" SkipAutoInstallEnv = "JF_SKIP_AUTO_INSTALL" AllowPartialResultsEnv = "JF_ALLOW_PARTIAL_RESULTS" - WatchesDelimiter = "," + CommaDelimiter = "," // Email related environment variables //#nosec G101 -- False positive - no hardcoded credentials. diff --git a/utils/params.go b/utils/params.go index 9ea506917..d8b9b9500 100644 --- a/utils/params.go +++ b/utils/params.go @@ -4,7 +4,6 @@ import ( "context" "errors" "fmt" - "gopkg.in/yaml.v2" "net/http" "net/url" "os" @@ -12,6 +11,8 @@ import ( "strconv" "strings" + "gopkg.in/yaml.v2" + "github.com/jfrog/jfrog-cli-security/utils/techutils" "github.com/jfrog/jfrog-cli-security/utils/xsc" "github.com/jfrog/jfrog-client-go/xsc/services" @@ -98,7 +99,7 @@ type Project struct { func (p *Project) setDefaultsIfNeeded() error { if len(p.WorkingDirs) == 0 { - workingDirs, _ := readArrayParamFromEnv(WorkingDirectoryEnv, WatchesDelimiter) + workingDirs, _ := readArrayParamFromEnv(WorkingDirectoryEnv, CommaDelimiter) if len(workingDirs) == 0 { // If no working directories are provided, and none exist in the environment variable, we designate the project's root directory as our sole working directory. // We then execute a recursive scan across the entire project, commencing from the root. @@ -294,7 +295,7 @@ type JFrogPlatform struct { func (jp *JFrogPlatform) setDefaultsIfNeeded() (err error) { e := &ErrMissingEnv{} if len(jp.Watches) == 0 { - if jp.Watches, err = readArrayParamFromEnv(jfrogWatchesEnv, WatchesDelimiter); err != nil && !e.IsMissingEnvErr(err) { + if jp.Watches, err = readArrayParamFromEnv(jfrogWatchesEnv, CommaDelimiter); err != nil && !e.IsMissingEnvErr(err) { return } }