Skip to content

Commit

Permalink
Merge pull request #1923 from rksharma95/fix-string-array-cast-issue
Browse files Browse the repository at this point in the history
fix(monitor): fix interface to string array casting issue
  • Loading branch information
rksharma95 authored Dec 21, 2024
2 parents 2691fa2 + 45be037 commit 96b0ad7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion KubeArmor/monitor/systemMonitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,16 @@ func (mon *SystemMonitor) TraceSyscall() {
}

// build a pid node
pidNode := mon.BuildPidNode(containerID, ctx, execPath, args[2].([]string))
args_2 := []string{}
switch v := args[2].(type) {
case []string:
args_2 = append(args_2, v...)
case string:
args_2 = append(args_2, v)
default:
mon.Logger.Warnf("Unexpected args[2] type")
}
pidNode := mon.BuildPidNode(containerID, ctx, execPath, args_2)
mon.AddActivePid(containerID, pidNode)

fd := ""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: security.kubearmor.com/v1
kind: kind: KubeArmorClusterPolicy
kind: KubeArmorClusterPolicy
metadata:
annotations:
app.accuknox.com/source: KubeArmor Operator
Expand Down

0 comments on commit 96b0ad7

Please sign in to comment.