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

Any tool to read the output JSON file? #70

Open
strus38 opened this issue Sep 4, 2024 · 4 comments
Open

Any tool to read the output JSON file? #70

strus38 opened this issue Sep 4, 2024 · 4 comments
Assignees
Labels
question Further information is requested

Comments

@strus38
Copy link

strus38 commented Sep 4, 2024

Question
Very new to this project, I executed the CIS-RHEL8 audit, and the result is a JSON file, is there a tool to view it in another format (easier to see SUCCESS/FAILURE)?

Environment (please complete the following information):

  • goss version:
  • OS version: RHEL8.9
@strus38 strus38 added the question Further information is requested label Sep 4, 2024
@uk-bolly uk-bolly self-assigned this Sep 4, 2024
@uk-bolly
Copy link
Member

uk-bolly commented Sep 4, 2024

hi @strus38

Thank you for raising the question.
If you are using the script manually you can pass it the option for the documentation output.
e.g.
run_audit -f documentation

If you are using it via the playbook to can set the variable audit_format to be documentation.

This will produce a much more human readable output with all failures in a section of the file.
For quick results I use awk to capture the titles and rules that show as failing
awk 'f;/Failures/{f=1}' {{ insert_filename_here}} | grep -w "Title" | cut -d: -f2 | sort

There is currently in works a method to present/sort/report on this which we hope we are able to show soon.

I hope that helps.

Many thanks

uk-bolly

@strus38
Copy link
Author

strus38 commented Sep 5, 2024

Thanks!!
However, not sure which json file you get since mine does not have 'Title' but 'title', neither 'Failures', I am using the 3.0.0_august' branch.
So I did:

cat /opt/audit_xxx-CIS-RHEL8_1725515602.json | jq '.results[] | select(.successful==false) .title' | sort -u

@uk-bolly
Copy link
Member

hi @strus38

Im not using the json file as mentioned i changed the format to documentation for an easier reading file. The PR should be moved to the correct branch in the next day or so.

Let me know if this is still not working.

many thanks

uk-bolly

@uk-bolly
Copy link
Member

Hi @strus38

The PR was merged last week so i am hoping with the details above this has helped with this issue?
There is also another issue we maybe extending the product to provide more out put to better show where an issue failed.

Please let us know if this resolves your issue?

thanks

uk-bolly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants