Commit 69c90bf
committed
Add operation/datatype support to grub2_bootloader_argument
The grub2_bootloader_argument OVAL template relied on regex pattern
matching for all value comparisons, including numeric thresholds like
audit_backlog_limit. This meant "8192 >= 8192" was evaluated as a
string match, not a numeric comparison — any value containing the
expected digits would pass regardless of magnitude.
Add operation and datatype parameters to the template so the OVAL
state element uses native OVAL comparison (equals, greater than or
equal, pattern match) with the correct datatype (string, int).
Objects now extract only the argument value via capturing groups
instead of matching the entire line.
Changes:
- oval.template: rewrite objects to extract values, states use
operation/datatype attributes, remove local_variable/concat,
nousb triggers existence-only checks
- template.py: add validation for operation/datatype combinations,
require quoted arg_value in rule.yml, require explicit params
for arg_variable rules, compute test scenario values
- 19 rule.yml files: add operation/datatype parameters
- 2 .var files: change type from string to number
- bash.template: rename SANITIZED_ARG_NAME to ARG_NAME_UNDERSCORED
- tests: fix wrong_variable=wrong to use proper wrong values,
add 3 GTE boundary tests, add comments to all ARG_VARIABLE blocks
- template_reference.md: document new parameters1 parent 9ee5408 commit 69c90bf
47 files changed
Lines changed: 780 additions & 398 deletions
File tree
- docs/templates
- linux_os/guide
- auditing
- grub2_audit_argument
- grub2_audit_backlog_limit_argument
- system
- bootloader-grub2
- grub2_enable_iommu_force
- grub2_init_on_alloc_argument
- grub2_init_on_free
- grub2_kernel_trust_cpu_rng
- grub2_l1tf_argument
- grub2_mce_argument
- grub2_mds_argument
- grub2_page_alloc_shuffle_argument
- grub2_pti_argument
- grub2_rng_core_default_quality_argument
- grub2_slab_nomerge_argument
- grub2_spec_store_bypass_disable_argument
- grub2_spectre_v2_argument
- grub2_vsyscall_argument
- network/network-ipv6/disabling_ipv6/grub2_ipv6_disable_argument
- permissions/restrictions/poisoning
- grub2_page_poison_argument
- grub2_slub_debug_argument
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
455 | 455 | | |
456 | 456 | | |
457 | 457 | | |
458 | | - | |
| 458 | + | |
| 459 | + | |
459 | 460 | | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | | - | |
| 461 | + | |
468 | 462 | | |
469 | | - | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
470 | 515 | | |
471 | 516 | | |
472 | 517 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
| 61 | + | |
60 | 62 | | |
61 | 63 | | |
62 | 64 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
55 | 57 | | |
56 | 58 | | |
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
0 commit comments