falcosecurity / libs

libsinsp, libscap, the kernel module driver, and the eBPF driver sources
https://falcosecurity.github.io/libs/
Apache License 2.0
216 stars 160 forks source link

Expose plugin API version and semver compatible check #146

Closed leogr closed 2 years ago

leogr commented 2 years ago

Motivation

/kind feature Consumers might need to print the supported plugin API version :point_down: https://github.com/falcosecurity/libs/blob/de277bbc1e7a92edc84db9a925fb3e12c7b1cb07/userspace/libscap/plugin_info.h#L30-L32

/kind bug Moreover, we can assume that using semver for version checking is a common expectation of our users. However, the current implementation checks the MAJOR number only :point_down:

https://github.com/falcosecurity/libs/blob/de277bbc1e7a92edc84db9a925fb3e12c7b1cb07/userspace/libsinsp/plugin.cpp#L434-L455

Feature

Alternatives

Considering the simplicity of this solution and assuming semver is a de facto standard, I don't see any other real alternative.

Additional context

leogr commented 2 years ago

/cc @FedeDP

Fede volunteered! :hugs: