Skip to content

Commit

Permalink
Merge pull request #911 from Checkmarx/feature/AST-65312-obfuscate-gi…
Browse files Browse the repository at this point in the history
…thub-repo-token-for-scorecard

Obfuscate github repo token for scorecard (AST-65312)
  • Loading branch information
cx-ruio authored Oct 29, 2024
2 parents b96e7a9 + 4a21783 commit d8f14e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/commands/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -1002,7 +1002,9 @@ func addSCSScan(cmd *cobra.Command, resubmitConfig []wrappers.Config, hasEnterpr
SCSMapConfig[resultsMapType] = commonParams.MicroEnginesType // scs is still microengines in the scans API
userScanTypes, _ := cmd.Flags().GetString(commonParams.ScanTypes)
scsRepoToken, _ := cmd.Flags().GetString(commonParams.SCSRepoTokenFlag)
viper.Set(commonParams.SCSRepoTokenFlag, scsRepoToken) // sanitizeLogs uses viper to get the value
scsRepoURL, _ := cmd.Flags().GetString(commonParams.SCSRepoURLFlag)
viper.Set(commonParams.SCSRepoURLFlag, scsRepoURL) // sanitizeLogs uses viper to get the value
SCSEngines, _ := cmd.Flags().GetString(commonParams.SCSEnginesFlag)
if resubmitConfig != nil {
scsConfig = createResubmitConfig(resubmitConfig, scsRepoToken, scsRepoURL, hasEnterpriseSecretsLicense)
Expand Down
2 changes: 2 additions & 0 deletions internal/logger/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ var sanitizeFlags = []string{
params.AstToken, params.SSHValue,
params.SCMTokenFlag, params.ProxyKey,
params.UploadURLEnv,
params.SCSRepoTokenFlag,
params.SCSRepoURLFlag,
}

func Print(msg string) {
Expand Down

0 comments on commit d8f14e3

Please sign in to comment.