Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

security: enhance logging for denied privileged method calls

rcourtman1519390f085f
diff --git a/cmd/pulse-sensor-proxy/main.go b/cmd/pulse-sensor-proxy/main.go
index 4e236722e4..de636a266f 100644
--- a/cmd/pulse-sensor-proxy/main.go
+++ b/cmd/pulse-sensor-proxy/main.go
@@ -400,9 +400,13 @@ func (p *Proxy) handleConnection(conn net.Conn) {
// Privileged methods can only be called from host (not from containers)
if p.isIDMappedRoot(cred) {
resp.Error = "method requires host-level privileges"
- logger.Warn().
+ log.Warn().
Str("method", req.Method).
- Msg("Container attempted to call privileged method")
+ Uint32("uid", cred.uid).
+ Uint32("gid", cred.gid).
+ Uint32("pid", cred.pid).
+ Str("corr_id", req.CorrelationID).
+ Msg("SECURITY: Container attempted to call privileged method - access denied")
p.sendResponse(conn, resp)
p.metrics.rpcRequests.WithLabelValues(req.Method, "unauthorized").Inc()
return