Closed VJftw closed 2 years ago
/cc @leodido @fntlnz
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close
.
Provide feedback via https://github.com/falcosecurity/community.
/lifecycle stale
Hello @VJftw,
Thank you for this really valuable issue. We love to discuss about in a Community Call:
Falco Weekly Community call every Wednesday (4:00pm to 5:00pm (UTC) (Zoom Details:
https://zoom.us/my/cncffalcoproject )
or in our Slack Channel https://kubernetes.slack.com #falco
Driverkit and all ways to improve the UX with modules/probes are part of our current topics.
/remove-lifecycle stale
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close
.
Provide feedback via https://github.com/falcosecurity/community.
/lifecycle stale
/remove-lifecycle stale /help
@leogr: This request has been marked as needing help from a contributor.
Please ensure the request meets the requirements listed here.
If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-help
command.
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close
.
Provide feedback via https://github.com/falcosecurity/community.
/lifecycle stale
cc @FedeDP @dwindsor wdyt?
cc @FedeDP @dwindsor wdyt?
I feel like we can close this. kernel-crawler integration solves a lot of the issues mentioned here.
π , I posted on the Kubernetes #falco Slack channel about our thought-machine/falco-probes project which automates the building and mirroring of eBPF kernel probes for Falco. We'd love to share and contribute some of our solutions to
driverkit
which help anyone else that has similar needs to us :smile:.Motivation
We desire to deploy Falco without compiling kernel eBPF probes at runtime as we have a great interest in running Falco with the least amount of privileges possible and in a more immutable fashion.
For us to do this, we download probes that our Kubernetes clusters might need at build-time and copy them into a
docker.io/falcosecurity/falco:0.29.1
based image.During our attempt to build this image, we came across the following hurdles:
amazonlinux2
andcos
were missing from download.falco.org/driver.It was clear that we needed to compile eBPF probes ourselves, where we encountered the following extra hurdle with
driverkit
:cos
is not supported and doesn't appear trivial to support for the acceptedkernelrelease + kernelversion
inputs as Kernel headers are provided percos
Build ID, i.e. Translating akernelrelease + kernelversion
to a Build ID programmatically isn't possible as no mapping appears to exist.Feature
thought-machine/falco-probes is our solution to those 4 hurdles. I've summarised them below:
amazonlinux2
: Rundocker run --rm amazonlinux:2 yum --showduplicates list kernel-devel
. This is similar for all operating systems which include a package manager for distributing kernel updates.cos
: Is a bit trickier as there is no package manager. However, we can rungsutil ls -r gs://cos-tools/ | grep "kernel-headers.tgz$" | cut -f4 -d/
to list all of the Build IDs ofcos
. This isn't specifically a list of kernels but is an enumerable list that we can trust to build kernel probes from. There will be duplicated probes as different BUILD IDs will likely share kernels.amazonlinux2 + 4.14.77-86.82.amzn2
orcos + 16108.470.11
. We refer to these items as Kernel Package Names.Detailed discovery and implementation of these solutions are documented in thought-machine/falco-probes/docs/.
In terms of supporting these features within
driverkit
andtest-infra
, I think:output.probe
field to each of the**/*.yaml
files in https://github.com/falcosecurity/test-infra/tree/master/driverkit/config.kernelrelease + kernelversion
vs.kernel package name
). Maybe we could support thekernel package name
as a different input that obtains kernel sources + headers the same way that thought-machine/falco-probes does? If so, we could easily generate the driverkit YAML input files too with thekernel package name
set.Any other ideas on this? How does this sound to you? :smile:
Alternatives
Described in Motivation π€. For solution 3). we could solve this for operating systems with package managers in
driverkit
by having a tool that generates thekernelrelease + kernelversion
inputs by enumerating the available kernel packages.Additional context
Hopefully, we've covered the context in the Motiviation, but please ask us for more if you're missing any π.