Add arg_minimal_value variable to grub2_bootloader_argument template#14626
Add arg_minimal_value variable to grub2_bootloader_argument template#14626macko1 wants to merge 1 commit intoComplianceAsCode:masterfrom
Conversation
|
Skipping CI for Draft Pull Request. |
|
Change in Ansible Please consider using more suitable Ansible module than |
5d68582 to
117ce41
Compare
d72131a to
315103b
Compare
|
Hello @macko1 and thank you.
|
13a4ebc to
15dbbd2
Compare
|
@vojtapolasek you were right, thanks for pointing this out. I've re-implemented the check, and made it extensible - "greater than or equal" can be extended with more OVAL operations in the future, when needed. I have divided the changes into several commits, as you have asked, I hope this will make it more readable. PR description updated. Thanks for a review! |
293b2dc to
9d97f56
Compare
Mab879
left a comment
There was a problem hiding this comment.
We should new tests for the rule in the referenced issue to ensure it is fixed and stays fixed.
| | (+ grub.d drop-in on Ubuntu) | ||
| +-- GRUB_DISABLE_RECOVERY=true | ||
|
|
||
| DATA FLOW (current -- will change in the rewrite): |
Description:
operationparameter to thegrub2_bootloader_argumenttemplate so rules can use numeric comparisons (currently only
"greater than or equal" is supported)
grub2_audit_backlog_limit_argumentrule to use thenew
operationparameter.template_reference.md.Rationale:
audit_backlog_limit=8192was failing on systems with a highervalue like 16384, because the OVAL check did an exact string match
instead of a >= comparison.
Fixes xccdf_org.ssgproject.content_rule_audit_backlog_limit resets backlog limit even if set to valid value #13923
Review Hints:
template.pyfirst (preprocessing), thenoval.template+ tests (the OVAL plumbing), thenrule.yml+ docs.automatus.py- this needs to be run in a VM, not a container.Using multiple parallel VMs is recommended (
--sliceautomatus argument).oval.templatehas extensive inline comments explaining thenumeric branching — the header TOC (lines 1–72) is a good
starting point.
entries_numerictest+object (section 4a) is thetrickiest part — it exists because the wide-capture object must
stay for
$kerneloptsdetection.