Skip to content

Commit

Permalink
Fixing nil deref
Browse files Browse the repository at this point in the history
Signed-off-by: Amit Schendel <[email protected]>
  • Loading branch information
amitschendel committed Dec 15, 2024
1 parent b7f4005 commit 065762e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/rulemanager/v1/rule_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,10 @@ func (rm *RuleManager) enrichRuleFailure(ruleFailure ruleengine.RuleFailure) rul

ruleFailure.SetRuntimeAlertK8sDetails(runtimek8sdetails)

ruleFailure.SetCloudServices(rm.dnsManager.ResolveContainerProcessToCloudServices(ruleFailure.GetTriggerEvent().Runtime.ContainerID, runtimeProcessDetails.ProcessTree.PID).ToSlice())
cloudServices := rm.dnsManager.ResolveContainerProcessToCloudServices(ruleFailure.GetTriggerEvent().Runtime.ContainerID, runtimeProcessDetails.ProcessTree.PID)
if cloudServices != nil {
ruleFailure.SetCloudServices(cloudServices.ToSlice())
}

if rm.enricher != nil {
rm.enricher.EnrichRuleFailure(ruleFailure)
Expand Down

0 comments on commit 065762e

Please sign in to comment.