Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AMZL-02-710343: regular expression needs to account for variable lenght whitespace #13

Open
Mark-Kozak opened this issue Nov 14, 2023 · 0 comments

Comments

@Mark-Kozak
Copy link
Collaborator

This control is failing due to more white space in the regex than allowed for. Adding a * between Defaults and timestamp gets the control to pass.
Change: it { should match /^[^#].*Defaults timestamp_timeout=\d/ }
To: it { should match /^[^#].*Defaults *timestamp_timeout=\d/ }

Editing the sudoers file to remove the additional spaces would also work, but that is unnecessary work that would need to be repeated for every new image. Fixing the control test is preferred.

Mark-Kozak added a commit to Mark-Kozak/amazon-linux-2-stig-ready-baseline that referenced this issue Dec 6, 2023
Mark-Kozak added a commit to Mark-Kozak/amazon-linux-2-stig-ready-baseline that referenced this issue Dec 6, 2023
Allow variable white space in regex
See mitre#13

Signed-off-by: Mark-Kozak <[email protected]>
aaronlippold pushed a commit that referenced this issue Dec 7, 2023
Allow variable white space in regex
See #13

Signed-off-by: Mark-Kozak <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant