-
Notifications
You must be signed in to change notification settings - Fork 560
misc: add clientIP in audit log #6908
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
Conversation
|
|
||
| func LogRequest(auditLogDto *AuditLoggerDTO) { | ||
| log.Printf("AUDIT_LOG: requestMethod: %s, urlPath: %s, queryParams: %s, updatedBy: %s, updatedOn: %s, apiResponseCode: %d, responseTime: %s, requestPayload: %s", auditLogDto.RequestMethod, auditLogDto.UrlPath, auditLogDto.QueryParams, auditLogDto.UserEmail, auditLogDto.UpdatedOn, auditLogDto.ApiResponseCode, auditLogDto.ResponseTime, auditLogDto.RequestPayload) | ||
| log.Printf("AUDIT_LOG: clientIp: %s, requestMethod: %s, urlPath: %s, queryParams: %s, updatedBy: %s, updatedOn: %s, apiResponseCode: %d, responseTime: %s, requestPayload: %s", auditLogDto.ClientIp, auditLogDto.RequestMethod, auditLogDto.UrlPath, auditLogDto.QueryParams, auditLogDto.UserEmail, auditLogDto.UpdatedOn, auditLogDto.ApiResponseCode, auditLogDto.ResponseTime, auditLogDto.RequestPayload) |
Check notice
Code scanning / SonarCloud
Logging should not be vulnerable to injection attacks Low
…erAudit` to log `ClientIP` and update audit records
|
Update with Save in userAudit handling to avoid upsert …|
Bito Automatic Review Skipped – PR Already Merged |




…behavior
Description
Fixes https://github.com/devtron-labs/sprint-tasks/issues/2765
Checklist:
Does this PR introduce a user-facing change?
Summary by Bito