-
Notifications
You must be signed in to change notification settings - Fork 61
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
[vSphere][7.0][VCLD-70-000013] Is not properly enforced when enabled in the Ansible playbook #52
Comments
I think we need a new way to handle this one without so many assumptions being made. For example the lines you are trying to remove we are assuming are the only possible options and then we are assuming that comment exists and is exactly that. Not sure of the best way to handle this. |
@rlakey I agree. This is to me was a patch job as the existing logic did not work. I have been exploring potential options but still no solution. To your point though, what are the potential options? if we knew what they were it would make solving this quite simple. iterate through potential lines and for those that exist, remove them. Second issue, i do not know but i doubt the location in which this statement is placed within the file matters, therefore a solution could be implemented that simply placed these commands at the bottom of the file - after deleting the previous part. |
@HerbBoy can you test the below to see if it handles all your use cases? It includes tab characters, as that is how the original values appear in the vCenter config file.
|
@freddyfeelgood This will work for the use cases i have tested. Apologies on the delay. |
Values changed for this one again in U3d so need to see if those new entries can be removed. |
Hi,
Vuln: VCLD-70-000013
Issue: There is a logic issue, stemming from the way lineinfile is used to enforce STIG requirements.
Fix: This can be fixed by first leveraging the lineinfile module to find and remove the entire block:
Note: In the event this block of code changes, each item (or line) of code would need to be updated. Or this block could be dynamically put in place by first running a cat of the file and finding this block of code, registering the output then placing it in line by line.
Then once the block is removed add in required items:
This code has already been implemented into the forked branch I created: https://github.com/HerbBoy/dod-compliance-and-automation
The text was updated successfully, but these errors were encountered: