From 1f709707929da3fdbce27928e0c9618b8dc2953f Mon Sep 17 00:00:00 2001 From: Bethuel Mmbaga Date: Tue, 20 Oct 2026 13:33:46 +0300 Subject: [PATCH] [management] Mask credentials in logged URLs (#8250) --- combined/cmd/root.go | 8 ++++---- management/server/cache/redis.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/combined/cmd/root.go b/combined/cmd/root.go index 26d6ceedb..fa65f7b6d 100644 --- a/combined/cmd/root.go +++ b/combined/cmd/root.go @@ -758,7 +758,7 @@ func logAgentNetworkConfig(cfg *CombinedConfig) { // logEnvVars logs all NB_ environment variables that are currently set func logEnvVars() { - log.Info("=== Environment Variables ===") + log.Debug("=== Environment Variables ===") found := false for _, env := range os.Environ() { if strings.HasPrefix(env, "NB_") { @@ -770,14 +770,14 @@ func logEnvVars() { } else if strings.Contains(keyLower, "dsn") { value = maskDSNPassword(value) } - log.Infof(" %s=%s", key, value) + log.Debugf(" %s=%s", key, value) found = true } } if !found { - log.Info(" (none set)") + log.Debug(" (none set)") } - log.Info("=== End Environment Variables ===") + log.Debug("=== End Environment Variables ===") } // maskDSNPassword masks the password in a DSN string. diff --git a/management/server/cache/redis.go b/management/server/cache/redis.go index 0cd921c92..7aa3fb8e8 100644 --- a/management/server/cache/redis.go +++ b/management/server/cache/redis.go @@ -39,7 +39,7 @@ func getRedisStore(ctx context.Context, redisEnvAddr string, maxConn int) (Store return nil, err } - log.WithContext(subCtx).Infof("using redis cache at %s", redisEnvAddr) + log.WithContext(subCtx).Infof("using redis cache at %s", options.Addr) return &redisStore{ StoreInterface: redisstore.NewRedis(redisClient),