diff --git a/examples/tracingpolicy/lsm_brm_check.yaml b/examples/tracingpolicy/lsm_brm_check.yaml new file mode 100644 index 00000000000..3ba2d2f75de --- /dev/null +++ b/examples/tracingpolicy/lsm_brm_check.yaml @@ -0,0 +1,25 @@ + +apiVersion: cilium.io/v1alpha1 +kind: TracingPolicy +metadata: + name: "lsm" +spec: + lsmhooks: + - hook: "bprm_check_security" + args: + - index: 0 + type: "linux_binprm" + selectors: + - matchBinaries: + - operator: "In" + values: + - "/usr/bin/zsh" + - "/usr/bin/bash" + matchArgs: + - index: 0 + operator: "Postfix" + values: + - "contrib/tester-progs/nop" + matchActions: + - action: Override + argError: -1 diff --git a/examples/tracingpolicy/lsm_file_open.yaml b/examples/tracingpolicy/lsm_file_open.yaml new file mode 100644 index 00000000000..74f896e6210 --- /dev/null +++ b/examples/tracingpolicy/lsm_file_open.yaml @@ -0,0 +1,21 @@ +apiVersion: cilium.io/v1alpha1 +kind: TracingPolicy +metadata: + name: "lsm-file-open" +spec: + lsmhooks: + - hook: "file_open" + args: + - index: 0 + type: "file" + selectors: + - matchBinaries: + - operator: "In" + values: + - "/usr/bin/cat" + matchArgs: + - index: 0 + operator: "Equal" + values: + - "/etc/passwd" + - "/etc/shadow"