usnistgov / scapval

Other
4 stars 2 forks source link

Possible bug with SRC-330 #26

Closed dragosprisaca closed 5 years ago

dragosprisaca commented 5 years ago

Hi Scott,

Can you please review the attached content and failed rules? Are these due to bugs in the schematron or SCAPVal?

Thanks, _Dragos. Windows.zip

gscottwilson commented 5 years ago

SRC-330-3 requirement ensures that individual component schematron files are used as part of the validation e.g xccdf-1.2, ocil-2.0.sch, oval-definitions-schemation*, etc.. the html report shows Warnings, Informational, and Errors, for these, however they are truncated at 10 (report shows 1119 total) total.
If you read each result you'll see the details. In the case of #1 "'Warning: The 'Benchmark' element has no platform specified..." you'll see the benchmark element is indeed missing the Platform. In this case the schematron check is coming from xccdf-1.2.sch "xccdf:Benchmark[not(xccdf:platform)]"

dragosprisaca commented 5 years ago

Thank you for the info Scott.

Here is the problem. The info for SRC-330 says: "...

FAIL 'oval:nist.validation.textFileContent54:ste:44 - the value of instance must be greater than or equal to one, or empty if var_ref is used. - TEST: (@var_ref and string-length(.)=0) or (number(.) >= 1)'" the ste:44 is defined as: " 0 " This req should have not failed. Am I missing something? Thanks, _Dragos.
dragosprisaca commented 5 years ago

Here is the link to the OVAL schematron issue: https://github.com/OVAL-Community/OVAL/issues/23

gscottwilson commented 5 years ago

On initial glance it looks to be properly failing, the value is 0, its expecting a value of 1 or higher, or empty if var_ref is used? See the bold 0 FAIL 'oval:nist.validation.textFileContent54:ste:44 - the value of instance must be greater than or equal to one, or empty if var_ref is used. - TEST: (@var_ref and string-length(.)=0) or (number(.) >= 1)'" the ste:44 is defined as: " 0 "

gscottwilson commented 5 years ago

Im happy to screenshare if we need to dive deeper

dragosprisaca commented 5 years ago

Hi Scott, I'll be available after 1pm EST. What needs to be done is to implement the fixes specified in https://github.com/OVAL-Community/OVAL/issues/23

gscottwilson commented 5 years ago

Those fixes were implemented in SCAPVal 1.3.3

dragosprisaca commented 5 years ago

Fixed in 1.3.4