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

Is there a way to create report in csv format? #1018

Closed
huikang opened this issue Jul 13, 2020 · 5 comments · Fixed by #1034
Closed

Is there a way to create report in csv format? #1018

huikang opened this issue Jul 13, 2020 · 5 comments · Fixed by #1034
Labels

Comments

@huikang
Copy link

huikang commented Jul 13, 2020

Is the --format-csv available in subcommand report? or is there any other way to save the report in csv format? Thanks.

@gy741
Copy link
Contributor

gy741 commented Jul 14, 2020

Hello @huikang

I don't think it's applying at the momentarily.

If you need that function, I will add it.

Currently, it supports the following formats.

[-format-json]
[-format-xml]
[-format-one-email]
[-format-one-line-text]
[-format-list]
[-format-full-text]

@huikang
Copy link
Author

huikang commented Jul 14, 2020

yes, that would be very helpful as I'd like to input the data in csv format to some data mining pipeline. Thanks.

@jirib
Copy link

jirib commented Jul 15, 2020

Would it be possible to little bit describe JSON format? Eg. how to find unfixed vulnerabilities...

@gy741
Copy link
Contributor

gy741 commented Jul 16, 2020

@jirib You can use the jq command to filter the desired fields.

For example:

$ cat localhost.json | jq '.scannedCves[] | {cveID, affectedPackages}' | head

{
  "cveID": "CVE-2009-5080",
  "affectedPackages": [
    {
      "name": "groff-base",
      "notFixedYet": true,
      "fixState": "Not fixed yet"
    }
  ]
}

@gy741
Copy link
Contributor

gy741 commented Aug 15, 2020

Hello, @huikang

I just added the CSV format.

You can try it.

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

Successfully merging a pull request may close this issue.

3 participants