probo icon indicating copy to clipboard operation
probo copied to clipboard

Report SELinux and AppArmor status

Open apognu opened this issue 1 month ago • 4 comments

I would like for our agents to return whether a Linux mandatory access control facily (for example, SELinux or AppArmor) is installed and enabled on my clients, ad well as some of the main configurations for them.

If that is something that you would he interested in integrating into Probo, I am willing to work on a pull request, but would likely require some guidance:

It would probably warrant a separate MANDATORY_ACCESS_CONTROL category (I don't think it fits anywhere else), which I guess would require deeper integration than simply in the agent. Pointers on where to look would be appreciated.

Thanks!


There are other Linux-specific items that would be nice to report, such a the kernel version, I could also tackle those.

apognu avatar Oct 29 '26 22:10 apognu

Hi Antoine, thanks for opening this and for offering to help!

We'd rather not add a dedicated MANDATORY_ACCESS_CONTROL check. We have posture policies on the roadmap: an organization will be able to define the values it expects from posture data (for example, "SELinux must be enforcing" or "AppArmor must be enabled"), and devices will be checked against those rules. That is more flexible than a fixed check per topic, so it is how we want to handle SELinux and AppArmor reporting. We'll update this issue when that work starts, and your input on which MAC settings matter in practice would be very useful then.

The kernel version, on the other hand, is something you can work on right away. We suggest adding a kernel_release field to the existing OS_VERSION evidence on Linux instead of creating a new check:

  • Agent: linuxOSVersion in pkg/deviceagent/checks/checks_linux.go currently reads only /etc/os-release. You can read the kernel release from /proc/sys/kernel/osrelease, or fall back to uname -r. Tests go in checks_linux_posture_test.go.
  • Server: parseOSVersionValue in pkg/coredata/device_posture_value_checks.go builds the displayed value from that evidence, with tests in device_posture_value_test.go.

If there are other Linux-specific facts you think are worth collecting, list them here and we can tell you whether they belong in an existing check's evidence or should wait for policies.

gearnode avatar Oct 30 '26 09:10 gearnode

Noted, I'll hold off on MAC. Thanks for the response. I'll provide a PR for the kernel version, which provides immediate value. Should I also add it the the UI next to the distribution?

As for other facts, there are a few, but they are either opinionated, quite niche or don't fit into existing categories (SecureBoot, kernel lockdown, FIPS mode, kernel taint, etc.). So unless you see value in them, I'll hold off as well for now.

apognu avatar Oct 30 '26 14:10 apognu

Noted, I'll hold off on MAC. Thanks for the response. I'll provide a PR for the kernel version, which provides immediate value. Should I also add it the the UI next to the distribution?

i think so yes

As for other facts, there are a few, but they are either opinionated, quite niche or don't fit into existing categories (SecureBoot, kernel lockdown, FIPS mode, kernel taint, etc.). So unless you see value in them, I'll hold off as well for now.

it's something we can discuss cc @lukkor

gearnode avatar Oct 30 '26 14:10 gearnode

Let's close the issue for now as the main part was merged 2 weeks ago. We are keeping open questions in our ticket system in case our position evolves later.

lukkor avatar Nov 16 '26 09:11 lukkor