-
Notifications
You must be signed in to change notification settings - Fork 376
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pkg/filters: add k8s CIDR and IP helpers to CEL filters
This simple PR adds CIDR and IP helpers from the k8s CEL libraries to our CEL filters. This should enable users to write export filters in CEL that match IPs in kprobe events using CIDR ranges etc. For example, the following CEL expression written as a CEL filter would match kprobe events where the first argument contains a socket with source address in CIDR range 10.0.0.0/16: cidr('10.0.0.0/16').containsIP(process_kprobe.args[0].sock_arg.saddr) The specific documentation for these CEL libraries is available here: - https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#CIDR - https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#IP Signed-off-by: William Findlay <[email protected]>
- Loading branch information
1 parent
93db38d
commit 04225f1
Showing
5 changed files
with
66 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters