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
92 stars 30 forks source link

STIG Viewer fails to validate CKL Schema #131

Closed ljkimmel closed 4 years ago

ljkimmel commented 4 years ago

STIG viewer v2.9.1 inspec_tools v2.0.0

"Checklist failed XML schema validation for Checklist Schema v2.2."

ljkimmel commented 4 years ago

inspec.json.txt kimmel1.ckl.txt

aaronlippold commented 4 years ago

Hi, also there are a couple of pre-releases of the tools that are pulling in a lot more integration tests.

It would be nice to see if we could add loading a checklist into stigviewer somehow ...

ljkimmel commented 4 years ago

Any ETA on this?

ljkimmel commented 4 years ago

I figured out that the problem is occurring because the Inspec profile has one or more errors in it. When 'inspec2ckl' is run from the Inspec JSON, Profile_Error is used in the <STATUS> element. This is an invalid value. Maybe this should just be reported as Open to force someone to look at it.

Bialogs commented 4 years ago

Yep. I came up with the same finding. Just need to get around to fixing it.

Bialogs commented 4 years ago
test/data/test_1.ckl:410: element STATUS: Schemas validity error : Element 'STATUS': [facet 'enumeration'] The value 'Profile_Error' is not an element of the set {'NotAFinding', 'Open', 'Not_Applicable', 'Not_Reviewed'}.
test/data/test_1.ckl:410: element STATUS: Schemas validity error : Element 'STATUS': 'Profile_Error' is not a valid value of the local atomic type.
test/data/test_1.ckl:1036: element STATUS: Schemas validity error : Element 'STATUS': [facet 'enumeration'] The value 'Profile_Error' is not an element of the set {'NotAFinding', 'Open', 'Not_Applicable', 'Not_Reviewed'}.
test/data/test_1.ckl:1036: element STATUS: Schemas validity error : Element 'STATUS': 'Profile_Error' is not a valid value of the local atomic type.
test/data/test_1.ckl:1657: element STATUS: Schemas validity error : Element 'STATUS': [facet 'enumeration'] The value 'Profile_Error' is not an element of the set {'NotAFinding', 'Open', 'Not_Applicable', 'Not_Reviewed'}.
test/data/test_1.ckl:1657: element STATUS: Schemas validity error : Element 'STATUS': 'Profile_Error' is not a valid value of the local atomic type.
test/data/test_1.ckl:2036: element STATUS: Schemas validity error : Element 'STATUS': [facet 'enumeration'] The value 'Profile_Error' is not an element of the set {'NotAFinding', 'Open', 'Not_Applicable', 'Not_Reviewed'}.
test/data/test_1.ckl:2036: element STATUS: Schemas validity error : Element 'STATUS': 'Profile_Error' is not a valid value of the local atomic type.
test/data/test_1.ckl:11801: element STATUS: Schemas validity error : Element 'STATUS': [facet 'enumeration'] The value 'Profile_Error' is not an element of the set {'NotAFinding', 'Open', 'Not_Applicable', 'Not_Reviewed'}.
test/data/test_1.ckl:11801: element STATUS: Schemas validity error : Element 'STATUS': 'Profile_Error' is not a valid value of the local atomic type.
test/data/test_1.ckl:11854: element STATUS: Schemas validity error : Element 'STATUS': [facet 'enumeration'] The value 'Profile_Error' is not an element of the set {'NotAFinding', 'Open', 'Not_Applicable', 'Not_Reviewed'}.
test/data/test_1.ckl:11854: element STATUS: Schemas validity error : Element 'STATUS': 'Profile_Error' is not a valid value of the local atomic type.
test/data/test_1.ckl:11960: element STATUS: Schemas validity error : Element 'STATUS': [facet 'enumeration'] The value 'Profile_Error' is not an element of the set {'NotAFinding', 'Open', 'Not_Applicable', 'Not_Reviewed'}.
test/data/test_1.ckl:11960: element STATUS: Schemas validity error : Element 'STATUS': 'Profile_Error' is not a valid value of the local atomic type.
test/data/test_1.ckl:12013: element STATUS: Schemas validity error : Element 'STATUS': [facet 'enumeration'] The value 'Profile_Error' is not an element of the set {'NotAFinding', 'Open', 'Not_Applicable', 'Not_Reviewed'}.
test/data/test_1.ckl:12013: element STATUS: Schemas validity error : Element 'STATUS': 'Profile_Error' is not a valid value of the local atomic type.
test/data/test_1.ckl:14577: element STATUS: Schemas validity error : Element 'STATUS': [facet 'enumeration'] The value 'Profile_Error' is not an element of the set {'NotAFinding', 'Open', 'Not_Applicable', 'Not_Reviewed'}.
test/data/test_1.ckl:14577: element STATUS: Schemas validity error : Element 'STATUS': 'Profile_Error' is not a valid value of the local atomic type.
test/data/test_1.ckl:14737: element STATUS: Schemas validity error : Element 'STATUS': [facet 'enumeration'] The value 'Profile_Error' is not an element of the set {'NotAFinding', 'Open', 'Not_Applicable', 'Not_Reviewed'}.
test/data/test_1.ckl:14737: element STATUS: Schemas validity error : Element 'STATUS': 'Profile_Error' is not a valid value of the local atomic type.
test/data/test_1.ckl:14790: element STATUS: Schemas validity error : Element 'STATUS': [facet 'enumeration'] The value 'Profile_Error' is not an element of the set {'NotAFinding', 'Open', 'Not_Applicable', 'Not_Reviewed'}.
test/data/test_1.ckl:14790: element STATUS: Schemas validity error : Element 'STATUS': 'Profile_Error' is not a valid value of the local atomic type.
test/data/test_1.ckl fails to validate