Skip to content

Commit 5aab606

Browse files
committed
Fix: add missing #nosec G706 annotations to LogInfo and LogError
LogWarning already had the annotation; LogInfo and LogError use the same structured logging pattern but were missing it, causing gosec CI failures. Made-with: Cursor
1 parent c7891a6 commit 5aab606

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

services/logger.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ func LogDebug(message string, args ...any) {
182182

183183
// LogInfo writes an info-level log.
184184
func LogInfo(message string, args ...any) {
185-
slog.Info(message, args...)
185+
slog.Info(message, args...) // #nosec G706 -- structured logging; args are key-value pairs, not user input
186186
logToGCP(slog.LevelInfo, message, args...)
187187
}
188188

@@ -194,7 +194,7 @@ func LogWarning(message string, args ...any) {
194194

195195
// LogError writes an error-level log.
196196
func LogError(message string, args ...any) {
197-
slog.Error(message, args...)
197+
slog.Error(message, args...) // #nosec G706 -- structured logging; args are key-value pairs, not user input
198198
logToGCP(slog.LevelError, message, args...)
199199
}
200200

0 commit comments

Comments
 (0)