-
Notifications
You must be signed in to change notification settings - Fork 32
oscapd-evaluate: support xccdf-id option #117
oscapd-evaluate: support xccdf-id option #117
Conversation
ed3ccf3
to
c5291a8
Compare
bin/oscapd-evaluate
Outdated
args.profile = es.select_profile_by_suffix(args.profile) | ||
args.profile = es.select_profile_by_suffix( | ||
args.xccdf_id, args.profile | ||
) |
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.
weird indentation
input_tree, | ||
xccdf_id, | ||
"http://scap.nist.gov/schema/scap/source/1.2", | ||
"http://checklists.nist.gov/xccdf/1.2", |
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.
Why is this namespace second here and first in the previous call?
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.
It should be the same! I will correct it.
…nent id Changed functions (added xccdf_id argument): * openscap_daemon/oscap_helpers.py: get_profile_choices_for_input * openscap_daemon/evaluation_spec.py: EvaluationSpec.select_profile_by_suffix
* atomic scan / oscapd-evaluate now supports xccdf-id scanner argument for configuration_compliance scan type. This way it is possible to select any profile in datastream file using: '--scanner_args xccdf-id=XCCDF_ID,profile=PROFILE_ID' If xccdf-id is not specified, profile is selected from the first XCCDF component found in a datastream file.
c5291a8
to
a6e4353
Compare
@jan-cerny Wrong indentation and swapped namespace arguments are fixed in the latest commit. |
OK, thanks. |
@@ -455,7 +474,7 @@ def _get_result_id(results_path): | |||
return test_result.attrib["id"] | |||
|
|||
|
|||
def generate_fix_for_result(config, results_path, fix_type): | |||
def generate_fix_for_result(config, results_path, fix_type, xccdf_id): |
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.
default xccdf_id to None
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.
@mpreisler Good catch, I created PR #120
atomic scan / oscapd-evaluate now supports
xccdf-id
scanner argumentfor
configuration_compliance
scan type. This way it is possible to selectany profile in datastream file using:
If
xccdf-id
is not specified, profile is selected from the first XCCDFcomponent found in a datastream file.
Fixes #116