thought-machine / falco-probes

Automated build and mirror of eBPF kernel probes for use as a driver with the Falco runtime security agent (https://falco.org/)
Apache License 2.0
16 stars 4 forks source link

Add //cmd/build-falco-ebpf-probe #7

Closed VJftw closed 3 years ago

VJftw commented 3 years ago

This PR adds a //cmd/build-falco-ebpf-probe go_binary which can be run via plz run //cmd/build-falco-ebpf-probe -- <flags> <operating-system> <kernel-package-name>, e.g.

$ plz run //cmd/build-falco-ebpf-probe -- --verbose --falco_version=0.29.1 amazonlinux2 4.14.200-155.322.amzn2

$ plz run //cmd/build-falco-ebpf-probe -- --verbose --falco_version=0.29.1 amazonlinux2 4.14.200-155.322.amzn2

will output built eBPF probes to dist/<falco driver version>/<probe name>.

In order to do this, this PR:


There's a lot of room for improvement in the things that this PR adds: e.g. logging should probably only be used for logging as opposed to application output as we're using log.Info for regular application output at the moment. I'd be keen to see these sorts of changes in future, much smaller PRs. The main goal of this PR is to add //cmd/build-falco-ebpf-probe where adding all of this other stuff has been necessary to get off the ground.