mitre / inspec_tools

A command-line and ruby API of utilities, converters and tools for creating, converting and processing security baseline formats, results and data
https://inspec-tools.mitre.org/
Other
91 stars 30 forks source link

Missing array type for replace_tags #166

Closed Didar-Bhullar closed 4 years ago

Didar-Bhullar commented 4 years ago

How to reproduce error

Try to use the --replace-tags flag with the xccdf2inspec command:

xccdf2inspec -x U_Oracle_Database_11-2g_STIG_V1R18_Manual-xccdf.xml -o myprofile  -r DIAGNOSTIC_DEST

Fix

The replace_tags cli option for the xccdf2inspec command is missing the type: :array which would lead to String error when trying to use that flag. This fix allows you to successfully use the replace_tags cli option.

Didar-Bhullar commented 4 years ago

From your test, it look like you need to use JBOSS_HOME as your replacement tag instead of DAIGNOSTIC_DEST, since they are specific to whatever profile you are using. Try this:

inspec_tools xccdf2inspec -x examples/xccdf2inspec/data/U_JBOSS_EAP_6-3_STIG_V1R2_Manual-xccdf.xml -o xccdf2inspec_replace_test -r JBOSS_HOME
Bialogs commented 4 years ago

Thanks! I'll update it