|
7 | 7 | "strings"
|
8 | 8 |
|
9 | 9 | apitypes "github.com/armosec/armoapi-go/armotypes"
|
| 10 | + "github.com/armosec/armoapi-go/armotypes/common" |
10 | 11 | tracernetworktype "github.com/inspektor-gadget/inspektor-gadget/pkg/gadgets/trace/network/types"
|
11 | 12 | events "github.com/kubescape/node-agent/pkg/ebpf/events"
|
12 | 13 | "github.com/kubescape/node-agent/pkg/objectcache"
|
@@ -159,6 +160,16 @@ func (rule *R0007KubernetesClientExecuted) CreateRuleFailure(eventType utils.Eve
|
159 | 160 | "args": execEvent.Args,
|
160 | 161 | },
|
161 | 162 | Severity: R0007KubernetesClientExecutedDescriptor.Priority,
|
| 163 | + Identifiers: &common.Identifiers{ |
| 164 | + Process: &common.ProcessEntity{ |
| 165 | + Name: execEvent.Comm, |
| 166 | + CommandLine: fmt.Sprintf("%s %s", execPath, strings.Join(utils.GetExecArgsFromEvent(&execEvent.Event), " ")), |
| 167 | + }, |
| 168 | + File: &common.FileEntity{ |
| 169 | + Name: filepath.Base(execPath), |
| 170 | + Directory: filepath.Dir(execPath), |
| 171 | + }, |
| 172 | + }, |
162 | 173 | },
|
163 | 174 | RuntimeProcessDetails: apitypes.ProcessTree{
|
164 | 175 | ProcessTree: apitypes.Process{
|
@@ -201,6 +212,16 @@ func (rule *R0007KubernetesClientExecuted) CreateRuleFailure(eventType utils.Eve
|
201 | 212 | },
|
202 | 213 | InfectedPID: networkEvent.Pid,
|
203 | 214 | Severity: R0007KubernetesClientExecutedDescriptor.Priority,
|
| 215 | + Identifiers: &common.Identifiers{ |
| 216 | + Process: &common.ProcessEntity{ |
| 217 | + Name: networkEvent.Comm, |
| 218 | + }, |
| 219 | + Network: &common.NetworkEntity{ |
| 220 | + DstIP: networkEvent.DstEndpoint.Addr, |
| 221 | + DstPort: int(networkEvent.Port), |
| 222 | + Protocol: networkEvent.Proto, |
| 223 | + }, |
| 224 | + }, |
204 | 225 | },
|
205 | 226 | RuntimeProcessDetails: apitypes.ProcessTree{
|
206 | 227 | ProcessTree: apitypes.Process{
|
|
0 commit comments