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

Custom delimiter for CSV / SSV outputs #4461

Open
pedrooot opened this issue Jul 17, 2024 · 9 comments
Open

Custom delimiter for CSV / SSV outputs #4461

pedrooot opened this issue Jul 17, 2024 · 9 comments
Labels
feature-request New feature request for Prowler.

Comments

@pedrooot
Copy link
Member

pedrooot commented Jul 17, 2024

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:

@pedrooot pedrooot added feature-request New feature request for Prowler. status/needs-triage Issue pending triage labels Jul 17, 2024
@pedrooot pedrooot pinned this issue Jul 17, 2024
@abant07
Copy link
Contributor

abant07 commented Aug 26, 2024

Hey @pedrooot

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

@pedrooot
Copy link
Member Author

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
Copy link
Contributor

abant07 commented Aug 27, 2024

Sounds good

@abant07
Copy link
Contributor

abant07 commented Sep 19, 2024

Hey @pedrooot

Am I okay to start on this issue?

@jfagoagas
Copy link
Member

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
Copy link
Contributor

abant07 commented Sep 23, 2024

Sounds good

@mitcharoo
Copy link

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
Copy link
Member

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
Copy link

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.

@jfagoagas jfagoagas removed the status/needs-triage Issue pending triage label Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature request for Prowler.
Projects
None yet
Development

No branches or pull requests

5 participants