Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing documentation on Logging can lead to privacy issues #4858

Closed
chbiel opened this issue Nov 16, 2021 · 1 comment
Closed

Missing documentation on Logging can lead to privacy issues #4858

chbiel opened this issue Nov 16, 2021 · 1 comment
Assignees
Labels
type:critical critical questions

Comments

@chbiel
Copy link

chbiel commented Nov 16, 2021

Description

We found out, by accident, that setting the Logger of gorm to the "wrong" level (or any level beside SILENT) can lead to critical privacy issues.

This can lead to big issues e.g. when you need to be compliant with GDPR for example but also in general because GORM will log potentially sensitive data when enabling logging at all.
Maybe it is only in combination with the SlowThreshold but I am not sure.

The main reasons from my opinion are:

I propose following solution(s):

  • By default only log parameterized SQL statements without any data / value
  • Add another property to the logged that controls if SQL statements should be logged in raw format (default: false)
  • Extend the documentation to be more clear about the consequences when using the logger

I would love to discuss this

@github-actions github-actions bot added the type:critical critical questions label Nov 16, 2021
@jinzhu
Copy link
Member

jinzhu commented Nov 29, 2021

Maybe we can implement another logger for 1, 2? and add a clear description on https://gorm.io/docs/logger?

can you create a PR on https://github.com/go-gorm/gorm.io?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:critical critical questions
Projects
None yet
Development

No branches or pull requests

2 participants