Skip to content

Commit

Permalink
tracingpolicy:container: adding use cases of tracking security events
Browse files Browse the repository at this point in the history
Signed-off-by: Djalal Harouni <tixxdz@gmail.com>
  • Loading branch information
tixxdz committed Apr 6, 2023
1 parent 2432502 commit f9f465b
Showing 1 changed file with 109 additions and 0 deletions.
109 changes: 109 additions & 0 deletions examples/observe-security/kubernetes_containers_security_events.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
apiVersion: cilium.io/v1alpha1
kind: TracingPolicy
metadata:
name: "kubernetes-containers-security-events"
spec:
kprobes:
# setid syscalls family -> move later to security_task_fix_setuid()
# to have full credentials context
- call: "sys_setuid"
syscall: true
args:
- index: 0
type: "int"
selectors:
- matchNamespaces:
- namespace: Pid
operator: NotIn
values:
- "host_ns"
- call: "sys_setgid"
syscall: true
args:
- index: 0
type: "int"
selectors:
- matchNamespaces:
- namespace: Pid
operator: NotIn
values:
- "host_ns"
- call: "sys_setreuid"
syscall: true
args:
- index: 0
type: "int"
- index: 1
type: "int"
selectors:
- matchNamespaces:
- namespace: Pid
operator: NotIn
values:
- "host_ns"
- call: "sys_setregid"
syscall: true
args:
- index: 0
type: "int"
- index: 1
type: "int"
selectors:
- matchNamespaces:
- namespace: Pid
operator: NotIn
values:
- "host_ns"
- call: "sys_setresuid"
syscall: true
args:
- index: 0
type: "int"
- index: 1
type: "int"
- index: 2
type: "int"
selectors:
- matchNamespaces:
- namespace: Pid
operator: NotIn
values:
- "host_ns"
- call: "sys_setresgid"
syscall: true
args:
- index: 0
type: "int"
- index: 1
type: "int"
- index: 2
type: "int"
selectors:
- matchNamespaces:
- namespace: Pid
operator: NotIn
values:
- "host_ns"
- call: "sys_setfsuid"
syscall: true
args:
- index: 0
type: "int"
selectors:
- matchNamespaces:
- namespace: Pid
operator: NotIn
values:
- "host_ns"
- call: "sys_setfsgid"
syscall: true
args:
- index: 0
type: "int"
selectors:
- matchNamespaces:
- namespace: Pid
operator: NotIn
values:
- "host_ns"

0 comments on commit f9f465b

Please sign in to comment.