Skip to content

Commit

Permalink
Fixing path in r1001
Browse files Browse the repository at this point in the history
Signed-off-by: Amit Schendel <amitschendel@gmail.com>
  • Loading branch information
amitschendel committed May 23, 2024
1 parent e7b2ef3 commit dac9d25
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pkg/ruleengine/v1/r1001_exec_binary_not_in_base_image.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ func (rule *R1001ExecBinaryNotInBaseImage) ProcessEvent(eventType utils.EventTyp
return nil
}

execPath := getExecPathFromEvent(execEvent)

ruleFailure := GenericRuleFailure{
BaseRuntimeAlert: apitypes.BaseRuntimeAlert{
AlertName: rule.Name(),
Expand All @@ -88,8 +86,8 @@ func (rule *R1001ExecBinaryNotInBaseImage) ProcessEvent(eventType utils.EventTyp
Pcomm: execEvent.Pcomm,
Cwd: execEvent.Cwd,
Hardlink: execEvent.ExePath,
Path: execPath,
Cmdline: fmt.Sprintf("%s %s", execPath, strings.Join(utils.GetExecArgsFromEvent(execEvent), " ")),
Path: getExecFullPathFromEvent(execEvent),
Cmdline: fmt.Sprintf("%s %s", getExecPathFromEvent(execEvent), strings.Join(utils.GetExecArgsFromEvent(execEvent), " ")),
},
ContainerID: execEvent.Runtime.ContainerID,
},
Expand Down

0 comments on commit dac9d25

Please sign in to comment.