Skip to content

Commit

Permalink
fix(enforcer):handling empty ProcessName for Process logs
Browse files Browse the repository at this point in the history
Signed-off-by: Prateek <[email protected]>
  • Loading branch information
Prateeknandle committed Jul 5, 2024
1 parent 13c13ae commit c53ff79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion KubeArmor/enforcer/bpflsm/enforcer.go
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ func (be *BPFEnforcer) TraceEvents() {
log.DroppingAlertsInterval = int32(cfg.GlobalCfg.ThrottleSec)
}
// fallback logic if we don't receive source from BuildLogBase()
if len(log.Source) == 0 {
if log.Operation != "Process" && len(log.Source) == 0 {
log.Source = string(bytes.Trim(event.Data.Source[:], "\x00"))
log.ProcessName = log.Source
}
Expand Down

0 comments on commit c53ff79

Please sign in to comment.