-
Notifications
You must be signed in to change notification settings - Fork 706
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
SSG Test Suite: Fix (all) profile execution when running test suite in rule mode #4792
SSG Test Suite: Fix (all) profile execution when running test suite in rule mode #4792
Conversation
11b87ec
to
b4dbfde
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR aims to make virtual profiles working with the test suite and fixes an oscap-ssh
error that has not yet propagated.
I propose some modifications that would simplify the behavior and implementation.
When overriding the profile metadata from test scenarios with the (all) profile, dependending the version of OpenSCAP it may fail to run because of some bash syntax error.
b4dbfde
to
8bd3d7e
Compare
The fix for oscap-ssh is already in Fedora 30 and is going to be backported to 29 soon.
When generating remediation from arf and the arf file has only on TestResult, it doesn't matter if you provide a value for result-id and for (all) profile it was breaking the bash command with bad syntax.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, the generate_fixes_remotely
method generates a command string out of command components without any additional processing. However, individual components may need protection from shell interpretation.
Therefore something like
command_components = command_base + command_options + command_operands
command_string = ' '.join(["'%s'" % c for c in command_components])
may work.
Great, I can confirm that it works also on the system with quoting fixed in |
Description: