-
Notifications
You must be signed in to change notification settings - Fork 671
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
Fix data stream component parsing #10411
Conversation
SCAP source data streams can reference multiple check components usually OCIL, OVAL and CPE OVAL. This commit fixes the situation when there is both OVAL and CPE OVAL needed for an XCCDF Benchmark. We improve the _find_all_component_contents and make it more generic and also refactor the code. Fixes: ComplianceAsCode#10408
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.
Thank for this improvement. Now it loads correctly all the correspondent components even if there is the CPE OVAL content as well.
@jan-cerny do you know if we can do something about the |
@ggbecker We could mitigate it by writing concise unit test for the XMLElement class. |
Are you willing to create it in this PR? Otherwise it should be fine to merge as it is IMO. |
@ggbecker I will take a look and try to create some test |
I have dd a simple unit test for the XMLContent class |
Code Climate has analyzed commit e6dc679 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 85.7% (50% is the threshold). This pull request will bring the total coverage in the repository to 52.4% (0.6% change). View more on Code Climate. |
It's perfect. Thank you |
SCAP source data streams can reference multiple check components usually OCIL, OVAL and CPE OVAL. This commit fixes the situation when there is both OVAL and CPE OVAL needed for an XCCDF Benchmark.
We improve the _find_all_component_contents and make it more generic and also refactor the code.
Fixes: #10408