With DEBUG=true the GORM SQL log (internal/gormlog/gormlog.go, wired at internal/database/database.go:161) prints fully interpolated statements, which at first boot includes:
INSERT INTO settings ... carrying the base64 session encryption key
INSERT INTO users ... carrying the Argon2id password hash
The session key is the whole of the session security model: anyone holding it can forge an authenticated session cookie. Debug logs are routinely pasted into issues and chats, which is exactly the exposure path that #179 closed for Sentry.
#178 already routed GORM through slog and bounded it. This is the remaining problem: it is not the volume of the statement but the values inside it.
Definition of done:
statements touching settings and users are redacted in the GORM logger — log the statement shape, never the bound values, for those tables
a broader values-off mode is acceptable and probably better: log SQL with placeholders rather than interpolated values, at every level
a test boots with DEBUG=true on a fresh database and asserts neither the session key nor a password hash appears in captured log output
README notes what DEBUG=true does and does not expose
With `DEBUG=true` the GORM SQL log (`internal/gormlog/gormlog.go`, wired at `internal/database/database.go:161`) prints fully interpolated statements, which at first boot includes:
- `INSERT INTO settings ...` carrying the base64 session encryption key
- `INSERT INTO users ...` carrying the Argon2id password hash
The session key is the whole of the session security model: anyone holding it can forge an authenticated session cookie. Debug logs are routinely pasted into issues and chats, which is exactly the exposure path that #179 closed for Sentry.
#178 already routed GORM through `slog` and bounded it. This is the remaining problem: it is not the volume of the statement but the values inside it.
Definition of done:
- statements touching `settings` and `users` are redacted in the GORM logger — log the statement shape, never the bound values, for those tables
- a broader values-off mode is acceptable and probably better: log SQL with placeholders rather than interpolated values, at every level
- a test boots with `DEBUG=true` on a fresh database and asserts neither the session key nor a password hash appears in captured log output
- README notes what `DEBUG=true` does and does not expose
clawbot
added this to the 1.0.0 milestone 2026-08-20 05:48:04 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
With
DEBUG=truethe GORM SQL log (internal/gormlog/gormlog.go, wired atinternal/database/database.go:161) prints fully interpolated statements, which at first boot includes:INSERT INTO settings ...carrying the base64 session encryption keyINSERT INTO users ...carrying the Argon2id password hashThe session key is the whole of the session security model: anyone holding it can forge an authenticated session cookie. Debug logs are routinely pasted into issues and chats, which is exactly the exposure path that #179 closed for Sentry.
#178 already routed GORM through
slogand bounded it. This is the remaining problem: it is not the volume of the statement but the values inside it.Definition of done:
settingsandusersare redacted in the GORM logger — log the statement shape, never the bound values, for those tablesDEBUG=trueon a fresh database and asserts neither the session key nor a password hash appears in captured log outputDEBUG=truedoes and does not exposeclawbot referenced this issue2026-08-20 05:56:52 +02:00