Skip to content

fix(log): add key path to allows #19

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

Merged
merged 1 commit into from
Jul 11, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions log/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,16 +135,17 @@ func Log(ctx context.Context, level slog.Level, msg string, keysAndValues ...any
func IsSensitiveKey(key string) bool {
// Whitelist certain keys that contain sensitive words but are safe to log
safeKeys := []string{
"total_keys", // Count of keys, not actual keys
"error_keys", // Error count
"expired_keys", // Count of expired keys
"has_refresh_token", // Indicates presence of a refresh token
"key_path", // Path to key file, not the key itself
"key_prefixes", // Key type statistics
"migrated_keys", // Migration statistics
"error_keys", // Error count
"keys", // Generic key count (used in migration logs)
"has_refresh_token", // Indicates presence of a refresh token
"token_expires_at", // Timestamp for token expiration
"migrated_keys", // Migration statistics
"new_refresh_token_provided", // Indicates a new refresh token was provided
"refresh_token_changed", // Indicates a refresh token change
"token_expires_at", // Timestamp for token expiration
"total_keys", // Count of keys, not actual keys
}

keyLower := strings.ToLower(key)
Expand Down
Loading