Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use string operators with lists #3395

Open
wangwillian0 opened this issue Oct 30, 2024 · 0 comments
Open

Use string operators with lists #3395

wangwillian0 opened this issue Oct 30, 2024 · 0 comments

Comments

@wangwillian0
Copy link

Motivation

Take the field ka.req.pod.containers.image.repository from the k8s_audit source, there a lot of important rules based on this field but the only way to create exceptions is to hard-code the image names into lists, because the only operators that can be used with it are set operators (in, intersect).

If it were possible to use the same rich string operators with the individual elements of lists, a generic rule like ka.req.pod.containers.image.repository startswith ('registry1.example', 'registry2.example') would be possible.

Feature

I think it's natural and clean to have the current operators to "just work" with list fields (like the startswith example above), but another expression like allof would be good too.

Alternatives

Something like falcosecurity/libs#1925 could fill the role (partially?) in a much less elegant way by concatenating the whole list and doing some weird regex on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant