Skip to content

Commit fd242a8

Browse files
committed
refactor: sanitize sensitive data from log messages
1 parent c398e3e commit fd242a8

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

threadwinds-ingestion/internal/client/backend_client.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,7 @@ func (c *BackendClient) GetThreadWindsConfig(ctx context.Context) (*ThreadWindsC
157157
return nil, fmt.Errorf("failed to decrypt API Secret: %w", err)
158158
}
159159
config.APISecret = decrypted
160-
catcher.Info("API Secret decrypted successfully", map[string]any{
161-
"encrypted_length": len(param.ConfParamValue),
162-
"decrypted_length": len(decrypted),
163-
})
160+
catcher.Info("API Secret decrypted successfully", nil)
164161
} else {
165162
config.APISecret = param.ConfParamValue
166163
}

threadwinds-ingestion/internal/client/threadwinds_client.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,7 @@ func (c *ThreadWindsClient) UpdateCredentials(apiKey, apiSecret string) {
3939
c.apiKey = apiKey
4040
c.apiSecret = apiSecret
4141

42-
catcher.Info("ThreadWinds credentials updated", map[string]any{
43-
"api_key_length": len(apiKey),
44-
})
42+
catcher.Info("ThreadWinds credentials updated", nil)
4543
}
4644

4745
func (c *ThreadWindsClient) ingestEntity(ctx context.Context, entity *entities.Entity) error {

0 commit comments

Comments
 (0)