You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Provide the ability to hide the database password from logs/error messages. Perhaps as an additional field in gorm.Config, perhaps as an option within struct tags (@DOOduneye), or both.
Motivation
This would enhance security by preventing sensitive database passwords from being exposed in error messages. Currently, when an error occurs in database interactions, the password may inadvertently appear in error logs or messages, posing a potential security risk. Adding an additional field in gorm.Config to hide the database password will help mitigate this risk and improve overall system security.
Adding this as an option that defaults to hiding the password, then opting in to showing it will provide a guardrail for gorm users. Or at a more granular level with struct tags will help prevent inadvertent secret leaking.
Describe the feature
Provide the ability to hide the database password from logs/error messages. Perhaps as an additional field in
gorm.Config
, perhaps as an option within struct tags (@DOOduneye), or both.Motivation
This would enhance security by preventing sensitive database passwords from being exposed in error messages. Currently, when an error occurs in database interactions, the password may inadvertently appear in error logs or messages, posing a potential security risk. Adding an additional field in
gorm.Config
to hide the database password will help mitigate this risk and improve overall system security.Adding this as an option that defaults to hiding the password, then opting in to showing it will provide a guardrail for gorm users. Or at a more granular level with struct tags will help prevent inadvertent secret leaking.
Related Issues
See @ctholho 's issue in postgres
The text was updated successfully, but these errors were encountered: