Aaron, You can use a little python script I wrote. It is nothing fancy. Feel free to download it from github. It takes the output of pkg_admin audit and outputs either csv or JSON, depending on what you want.
https://github.com/rgeorgia/nbaudit_fmt On 5/30/19, 5:59 AM, "Leonardo Taccari" <[email protected] on behalf of [email protected]> wrote: Hello Aaron, Aaron B. writes: > [...] > Is there a mode, or some other utility/combination of commands, to get > the output of 'pkg_admin audit' in a machine-readable way - something > like CSV/JSON/etc? > > A regular expression should be able to do it, but I'm hoping there's > some format intended to be scripted. > [...] I would just pipe it to AWK (without any regular expression), e.g. to have a corresponding TSV of them: | % pkg_admin audit | | awk '{ pkg = $2; vuln_type = $5; url = $NF; print pkg "\t" vuln_type "\t" url }'
