-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add condition operator to accepts list of values #39
Comments
If I understand correctly, you want a filter that allows everything, except for the However, you can write it as: "enable_only_inet": {
"mismatch_action": "allow",
"match_action": { "errno": 1 },
"filter": [
{
"syscall": "socket",
"args": [
{
"index": 0,
"type": "dword",
"op": "eq"
"val": 2
}
]
},
{
"syscall": "socket",
"args": [
{
"index": 0,
"type": "dword",
"op": "eq"
"val": 10
}
]
},
]
} Is this what you currently are using? What you are proposing would be a bit of syntactic sugar that would complicate the implementation and the file format quite a lot. In this specific case I believe it introduces more overhead and complexity than simplicity. |
Or are you trying to deny every In order to simplify this, you could use the As a general rule though, it's not recommended to use denylists for this exact reason. You need to have huge lists of potentially dangerous system calls and parameters that need to be updated frequently (and leave room for security issues if not updated). |
Currently it is not possible to only allow certain values in a filter that is permissive. If we had
x in [values]
andx not_in [values]
operators, it would be possible to express such conditions. Currently we have to list all values that we want to deny. Example of the proposed:The text was updated successfully, but these errors were encountered: