@@ -455,18 +455,48 @@ they must be of the same length.
455455- Languages: Bash, OVAL
456456
457457#### grub2_bootloader_argument
458- - Ensures that a kernel command line argument is present in GRUB 2 configuration.
458+ - Ensures that a kernel command line argument is present in GRUB 2 configuration. For example ` nousb ` or ` audit_backlog_limit=8192 ` .
459459
460- - Parameters:
461-
462- - ** arg_name** - argument name, eg. ` audit `
463-
464- - ** arg_value** - argument value, eg. ` '1' `
465-
466- - ** arg_variable** - the variable used as the value for the argument, eg. ` 'var_slub_debug_options' `
467- This parameter is mutually exclusive with ** arg_value** .
460+ - Parameters:
468461
469- - Languages: Ansible, Bash, OVAL, Blueprint, Kickstart
462+ - ** arg_name** (required) - kernel argument name, e.g. ` audit ` , ` audit_backlog_limit ` , ` nousb ` .
463+
464+ - ** arg_value** (optional) value of the kernel argument, e.g. ` '1' ` , ` 'on' ` .
465+ - Mutually exclusive with ** arg_variable** .
466+ - ** Must be quoted** in ` rule.yml ` — YAML auto-parses unquoted scalars
467+ (` 8192 ` becomes int, ` on ` /` off ` become bool), but the template needs a
468+ string to build regexes and config file content. The build will fail with
469+ a clear error if the value is not a string.
470+
471+ - ** arg_variable** (optional) - XCCDF variable defined in a ` .var ` file,
472+ e.g. ` var_audit_backlog_limit ` .
473+ - Mutually exclusive with ** arg_value** .
474+ - If used, ** operation** and ** datatype** has to be set to match the ` .var ` file's ` type ` and ` operator ` variables.
475+
476+ - ** operation** - OVAL comparison operation applied to the extracted value.
477+ Default: ` equals ` . Supported values:
478+ - ` equals ` — exact match. Works with ` string ` or ` int ` .
479+ Use for arguments with a single known-good value (e.g. ` audit=1 ` ,
480+ ` pti=on ` ).
481+ - ` pattern match ` — regex match. Works with ` string ` only.
482+ Use when multiple values are acceptable (e.g. ` slub_debug ` on OL8
483+ where ` P ` must appear anywhere inside values like ` FZP ` ).
484+ Replaces the deprecated ` is_substring ` parameter.
485+ - ` greater than or equal ` — numeric comparison. Works with ` int ` only.
486+ Use for threshold arguments (e.g. ` audit_backlog_limit>=8192 ` ).
487+ - Other operations (` not equal ` , ` greater than ` , ` less than ` ,
488+ ` less than or equal ` ) are validated but have no test coverage.
489+ Adding a rule with these operations requires adding test scenarios and updating ` template.py ` to support them.
490+
491+ - ** datatype** - OVAL datatype for the comparison. Default: ` string ` .
492+ Supported values: ` string ` , ` int ` .
493+ - ` string ` — lexicographic comparison. Use for non-numeric values
494+ (e.g. ` on ` , ` force ` , ` none ` ).
495+ - ` int ` — numeric comparison. Use when the value is a number
496+ (e.g. ` audit_backlog_limit=8192 ` , ` audit=1 ` ). Required for numeric
497+ operations like ` greater than or equal ` .
498+
499+ - Languages: Ansible, Bash, OVAL, Blueprint, Kickstart
470500
471501#### grub2_bootloader_argument_absent
472502- Ensures that a kernel command line argument is absent in GRUB 2 configuration.
0 commit comments