openscap
openscap copied to clipboard
Oscap reports (JSON)
Hi, just a question - are there any plans to have an option to convert oscap xml report to json format?
Yes, there are plans for this. Can't say anything about time-line here, but the feature in the "active" part of the backlog (not tracked in GH, tho).
Any particular details you are expecting from it (structure, schema etc)?
Also it would be interesting to know where you're going to integrate the scanner in such a manner. Would it be possible for you to give us some information?
We would be interested easily extract to json output information related to a specific benchmark results, like Rule ID, Result, Time, Severity, Identifiers, Description, Rationale - whatever we can view from HTML report while following the link for specific result details. Having this info in json format we can pass it to a dashboard where we have a status for all systems in organization in a single view. For a specific system details we can refer from this dashboard to HTML report collected from this system. We have Ansible automation in place to run OpenScap scanning on our inventory and collect reports. But oscap standard output lack of information we need. Parsing XML results or HTML report files to extract all required values looks challenging. Any advice on how to find information above in XML/HTML files generated by oacap command is appreciated.
You could create your own json files. I suggest looking into using xmlstarlet, htmltotext, and jq. A mix of bash and python were used in my workplace but it could be done purely in one language. We consolidated all the results into a single summary report to make easier for reporting. There were other things created but that was the most useful thing we did.
I did, for the information I need in json Ansible regex worked finally good enough.
why was that closed? was this functionality added?
why was that closed? was this functionality added?
It was added to https://github.com/OpenSCAP/openscap-report. Most likely it won't be added to openscap. We've closed stale issues.