prowler-cloud / prowler

Prowler is an Open Source Security tool for AWS, Azure, GCP and Kubernetes to do security assessments, audits, incident response, compliance, continuous monitoring, hardening and forensics readiness. Includes CIS, NIST 800, NIST CSF, CISA, FedRAMP, PCI-DSS, GDPR, HIPAA, FFIEC, SOC2, GXP, Well-Architected Security, ENS and more
https://prowler.com
Apache License 2.0
10.83k stars 1.54k forks source link

Custom delimiter for CSV / SSV outputs #4461

Open pedrooot opened 3 months ago

pedrooot commented 3 months ago

New feature motivation

Currently Prowler generates the CSV outputs using ; as delimiter. The CSV RFC specifies that the delimiter should be ,. The goal is to make a customizable delimiter for this output.

Solution Proposed

Have a custom separator for the CSV output or create a new output type called SSV which has ; as native separator and use , on the CSV output.

Describe alternatives you've considered

If you have any trouble when opening a CSV file output from Prowler in LibreOffice or Excel we recommend you to follow these steps:

abant07 commented 2 months ago

Hey @pedrooot

Is this issue still open? If so, can I work on it?

pedrooot commented 2 months ago

Hey @abant07 I think that it's better if you start with #4703 The fix for this issue should be evaluated by the team. Thanks for helping!

abant07 commented 2 months ago

Sounds good

abant07 commented 1 month ago

Hey @pedrooot

Am I okay to start on this issue?

jfagoagas commented 1 month ago

Hello @abant07 we are not sure about what to do here. If we decide that we want to add it we'll let you know.

Thanks!

abant07 commented 1 month ago

Sounds good

mitcharoo commented 2 weeks ago

For anyone that finds this, a temporary solution I'm using is to replace commas (due to their presence in control descriptions/results/etc) with a space and then replace semicolons with commas:

sed -e 's/,/ /g' -e 's/;/,/g'

toniblyx commented 2 weeks ago

I think we can take advantage of v5 soon to have this sorted out. Leave default as it is (to not break anything) and add custom delimiter support option. Usage of sed -e 's/,/ /g' -e 's/;/,/g' is not recommended because some checks have comma in their fields, so that will break the CSV (or SSV) for sure.

mitcharoo commented 2 weeks ago

Yep, that's why I'm removing commas before replacing semicolons. As noted, a temporary workaround I've been using with no issue until Prowler supports the comma delimiter.