diff --git a/pkg/secrets/basic_auth.go b/pkg/secrets/basic_auth.go index 0bdfad9c7..159185c22 100644 --- a/pkg/secrets/basic_auth.go +++ b/pkg/secrets/basic_auth.go @@ -22,6 +22,7 @@ const ( ` //nolint:gosec basicAuthSecretName = `pac-gitauth-%s` + ranStringSeedLen = 6 ) // MakeBasicAuthSecret Make a secret for git-clone basic-auth workspace. @@ -93,5 +94,5 @@ func MakeBasicAuthSecret(runevent *info.Event, secretName string) (*corev1.Secre func GenerateBasicAuthSecretName() string { return strings.ToLower( - fmt.Sprintf(basicAuthSecretName, random.AlphaString(4))) + fmt.Sprintf(basicAuthSecretName, random.AlphaString(ranStringSeedLen))) }