RFE: Use numeric comparison in jinja macro create_local_interactive_users_object #10845
Labels
help-wanted
This PR/Issue needs help to go forward.
OVAL
OVAL update. Related to the systems assessments.
Description of problem:
Jinja macro
create_local_interactive_users_object
which generates OVAL objects related to local interactive users needs to be enhanced for better readability and for better customization abilities.At this moment, the macro relies on the fact that local interactive users have UIDs greater than or equal 1000 and that smaller UIDs are non-interactive. Moreover, the regular expression used there requires that the UID field consists of at least 4 digits. Therefore, it won't match users with UID consisting of 3 digits, ie less than or equal 999.
It's been done this way because in OVAL textfilecontet54_object you can't have multiple different subexpression capturing groups in the regex, and I already need to capture the user name field in a subexpression. I think that to have a proper comparison with 1000 in the OVAL I would have to create one more layer of objects and variables.
This problem has been pointed out by @vojtapolasek during review of #10825. We decided to report the problem as an upstream RFE.
SCAP Security Guide Version:
A branch with #10825 merged in.
Operating System Version:
all
Steps to Reproduce:
create_local_interactive_users_object
and the regexes used thereActual Results:
Regular expression is used to determine interactive users.
Expected Results:
Numeric comparison of actual values of UIDs is used to determine interactive users.
Additional Information/Debugging Steps:
No.
The text was updated successfully, but these errors were encountered: