Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions scanrepository/scanrepository.go
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,7 @@ func (cfp *ScanRepositoryCmd) cloneRepositoryOrUseLocalAndCheckoutToBranch() (te
log.Debug("Created temp working directory:", tempWd)

if cfp.scanDetails.UseLocalRepository {
log.Debug("JF_USE_LOCAL_REPOSITORY was set to true. Copying local repository to tmp dir...")
var curDir string
if curDir, err = os.Getwd(); err != nil {
return
Expand Down
22 changes: 22 additions & 0 deletions utils/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import (
const (
frogbotConfigDir = ".frogbot"
FrogbotConfigFile = "frogbot-config.yml"
maskedValue = "***"
)

var (
Expand Down Expand Up @@ -525,6 +526,7 @@ func GetFrogbotDetails(commandName string) (frogbotDetails *FrogbotDetails, err
if err != nil {
return
}
printAggregatorParams(configAggregator[0].Params)

// TODO when deprecating multiple repositories support, pass the correct projectKey from the single repo we have to getConfigProfileIfExistsAndValid
configProfile, repoCloneUrl, err := getConfigProfileIfExistsAndValid(xrayVersion, jfrogServer, client, gitParamsFromEnv, configAggregator[0].JFrogProjectKey)
Expand Down Expand Up @@ -931,3 +933,23 @@ func verifyConfigProfileValidity(configProfile *services.ConfigProfile) (err err
log.Info(fmt.Sprintf("Using Config profile '%s'. jfrog-apps-config will be ignored if exists", configProfile.ProfileName))
return
}
func printAggregatorParams(params Params) {
params.Scan.EmailDetails.SmtpServer = replaceIfNotEmpty(params.Scan.EmailDetails.SmtpServer)
params.Scan.EmailDetails.SmtpPort = replaceIfNotEmpty(params.Scan.EmailDetails.SmtpPort)
params.Scan.EmailDetails.SmtpUser = replaceIfNotEmpty(params.Scan.EmailDetails.SmtpUser)
params.Scan.EmailDetails.SmtpPassword = replaceIfNotEmpty(params.Scan.EmailDetails.SmtpPassword)
params.Git.VcsInfo.Username = replaceIfNotEmpty(params.Git.VcsInfo.Username)
params.Git.VcsInfo.Token = replaceIfNotEmpty(params.Git.VcsInfo.Token)

configAggregatorParamsString, e := json.Marshal(params)
if e == nil {
log.Debug(fmt.Sprintf("extracted config aggregator params: %s", configAggregatorParamsString))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
log.Debug(fmt.Sprintf("extracted config aggregator params: %s", configAggregatorParamsString))
log.Verbose(fmt.Sprintf("extracted config aggregator params: %s", configAggregatorParamsString))

maybe verbose level?

}
}

func replaceIfNotEmpty(value string) string {
if value != "" {
return maskedValue
}
return value
}
Loading