Open roddhjav opened 1 month ago
I have the following draft: https://gist.github.com/nobody43/7a21f518dbebdd48a3c2e7af7934a63b Is it needed? Tested on Ubuntu 24.04.
Q: Why python?
A: libapparmor
could be utilized
Q: Why reimplement?
A: libapparmor
is too tightly coupled with actually loading the profiles
Q: Is it on par with apparmor_parser
?
A: No, even libapparmor
does not claim 1:1 compatibility
Q: What's implemented?
A: grep reason profile_tests.py
Q: What's not implemented? A: Mutually exclusive abstractions, dangerous file access, missing owner, tunables expansion, file rules to abstraction comparison, etc
Q: Is it reliable? A: Not tested thoroughly yet
@roddhjav Should I work on my version further, or it's not the approach you want?
@nobody43 Please continue working on your linter. This is 100% the way to go.
make check
is a fast and dirty check to catch basic issues (it is highly inspired from what apparmor has). Your linter is the proper solution.
My current priority is to work on profile testing (that goes along with the sub packages #464).
Therefore your work on the linter perfectly goes along with it. You are more than welcome to integrate it with this project.
Understood, I'll come up with something solid after 2 weeks.
This issue aims to present and discuss the various tests applied to the profiles as well as their current stage of deployment.
Current Status
[x] Build:
make
@{exec_path}
) is defined.[x] Checks:
make check
Check basic style of profiles:[ ] Integration Tests:
make bats
Integration tests for core cli profiles.go run ./tests/cmd -b
to generate them. They are basic, but they serve as a good starting point.Plan
For more complex software suite, more integration tests need to be done. The plan is to run existing integration suite from these very software in an environment with apparmor.d profiles.
[ ] Systemd
[ ] Gnome