mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-23 07:29:00 -08:00
fix: mask redis credentials when logging (#2264)
This commit is contained in:
@@ -33,7 +33,7 @@ type Cache struct {
|
||||
// NewCache is the factory method for Cache
|
||||
func NewCache(c option.CacheOption) (Cache, error) {
|
||||
if strings.HasPrefix(c.CacheBackend, "redis://") {
|
||||
log.Logger.Infof("Redis cache: %s", c.CacheBackend)
|
||||
log.Logger.Infof("Redis cache: %s", c.CacheBackendMasked())
|
||||
options, err := redis.ParseURL(c.CacheBackend)
|
||||
if err != nil {
|
||||
return Cache{}, err
|
||||
|
||||
Reference in New Issue
Block a user