fix(policy): harden landlock.compatibility validation - #2541
Conversation
Signed-off-by: Artem Lytvyn <alytvyn@redhat.com>
…ystem paths Signed-off-by: Artem Lytvyn <alytvyn@redhat.com>
|
@krishicks, could you PTAL |
|
/ok to test 49a6eec |
Review findingsVerdict: Request changes
The typed serde enum is the right approach for YAML validation, and fallible protobuf-to-runtime conversion prevents silent enforcement downgrade inside the sandbox. The zero-path guard also closes the identified Landlock no-op. Gateway validation, logging, and regression coverage need completion before merge. Verification
|
…path logging Signed-off-by: Artem Lytvyn <alytvyn@redhat.com>
|
/ok to test a13f9d0 |
Summary
best_effort. Fixed by parsing into an enum at YAML parse time andTryFromimplementation at the proto conversion layer.hard_requirementwith no filesystem paths configured was a silent no-op, Landlock skipped entirely. Fixed by erroring before the early return whenhard_requirementis set and both path lists are empty.Related Issue
closes #2356
Changes
Two fixes to
landlock.compatibilityenforcement. Invalid values now fail at YAML parse time instead of silently falling back tobest_effort. Configuringhard_requirementwith no filesystem paths now aborts sandbox startup instead of skipping Landlock entirely. Docs updated to reflect the new behavior.Testing
mise run pre-commitpassesChecklist