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

Properly parse json objects #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

bartwalczak
Copy link

This pull request adds support for json objects in the csv file. They are properly parsed now.

@ahmagdy
Copy link
Owner

ahmagdy commented Feb 28, 2019

Hi @bartwalczak
Thanks for your contribution, can you elaborate on that and show me an example?

@bartwalczak
Copy link
Author

I was attempting to convert logs exported from kibana as csv to json, and ran into several issues with deeply nested json objects not being properly interpreted.

Here's an example:

"@timestamp","msg","host_ip","level","subject","origin","trigger","type","content","tags","timestamp"
"""2019-03-06T18:34:40.795+0000""","""CIS report""","""""","""info""","""internal workings""","""agent/cis""","""report""","""http-bulk""","{""assessment_date"":""03/06/2019 10:33:42"",""target"":""thinktank"",""database_host"":""N/A"",""database_name"":""N/A"",""benchmark_version"":""1.0.0"",""benchmark_id"":""xccdf_org.cisecurity.benchmarks_benchmark_1.0.0_CIS_MIT_Kerberos_1.10_Benchmark"",""benchmark_name"":""CIS MIT Kerberos 1.10 Benchmark"",""benchmark_dup_id"":""xccdf_org.cisecurity.benchmarks_benchmark_1.0.0_CIS_MIT_Kerberos_1.10_Benchmark"",""profile"":""KDC with DB2 Database"",""profile_id"":""xccdf_org.cisecurity.benchmarks_profile_KDC_with_DB2_Database"",""rule_id"":""xccdf_org.cisecurity.benchmarks_rule_2.4.3_Secure_the_administrative_server_log_location_admin_server"",""rule_section"":""2.4.3"",""rule_title"":""Secure the administrative server log location (admin_server)"",""result"":""pass"",""cceid"":""CCE-NONE""}","[""_logz_http_bulk_json_8070""]","""2019-03-06T10:33:47.633862905-08:00"""
"""2019-03-06T18:34:40.795+0000""","""CIS report""","""""","""info""","""internal workings""","""agent/cis""","""report""","""http-bulk""","{""assessment_date"":""03/06/2019 10:33:42"",""target"":""thinktank"",""database_host"":""N/A"",""database_name"":""N/A"",""benchmark_version"":""1.0.0"",""benchmark_id"":""xccdf_org.cisecurity.benchmarks_benchmark_1.0.0_CIS_MIT_Kerberos_1.10_Benchmark"",""benchmark_name"":""CIS MIT Kerberos 1.10 Benchmark"",""benchmark_dup_id"":""xccdf_org.cisecurity.benchmarks_benchmark_1.0.0_CIS_MIT_Kerberos_1.10_Benchmark"",""profile"":""KDC with DB2 Database"",""profile_id"":""xccdf_org.cisecurity.benchmarks_profile_KDC_with_DB2_Database"",""rule_id"":""xccdf_org.cisecurity.benchmarks_rule_2.2.2_Secure_the_kadmin_keytab__admin_keytab"",""rule_section"":""2.2.2"",""rule_title"":""Secure the kadmin keytab (admin_keytab)"",""result"":""pass"",""cceid"":""CCE-NONE""}","[""_logz_http_bulk_json_8070""]","""2019-03-06T10:33:47.633850552-08:00"""

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

Successfully merging this pull request may close these issues.

2 participants