-
Notifications
You must be signed in to change notification settings - Fork 177
Description
Motivation
Historically, when a syscall event occurs outside a container, the container.id field is set to host. Our ruleset has consistently followed this pattern: 👇
This behavior is also documented in the official documentation.
Although this design decision is opinionated, it works since a container ID cannot be host.
The container.name field currently follows the same pattern: 👇
https://github.com/incertum/libs/blame/master/userspace/libsinsp/filterchecks.cpp#L6232-L6236
However, using container.name = host is unsafe because a container could be named host.
Overall, the current approach could lead to confusion or errors.
Feature
To resolve this issue for non-container cases, we propose two backward-incompatible solutions:
- Leave
container.nameunset (like othercontainer.*fields) and continue usingcontainer.id=host. - Leave both
container.idandcontainer.nameunset. This would makenot container.id existswork correctly (assuming the empty value problem will also be fixed).
Alternatives
Doing nothing is not an option, as container.name = host could be misleading.
Additional context
This change would be a major breaking change and should be targeted for Falco 1.0.
Also note the empty value problem (a.k.a. the issue) is orthogonal to this issue. Still, it should be taken into consideration