Skip to content
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

Oscap reports (JSON) #1555

Open
olgadodin opened this issue Jul 2, 2020 · 5 comments
Open

Oscap reports (JSON) #1555

olgadodin opened this issue Jul 2, 2020 · 5 comments

Comments

@olgadodin
Copy link

olgadodin commented Jul 2, 2020

Hi, just a question - are there any plans to have an option to convert oscap xml report to json format?

@evgenyz
Copy link
Contributor

evgenyz commented Jul 2, 2020

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)?

@evgenyz evgenyz changed the title Oscap reports Oscap reports (JSON) Jul 2, 2020
@evgenyz
Copy link
Contributor

evgenyz commented Jul 2, 2020

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?

@olgadodin
Copy link
Author

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.

@WSLUser
Copy link

WSLUser commented Jul 21, 2020

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.

@olgadodin
Copy link
Author

I did, for the information I need in json Ansible regex worked finally good enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants