Open ocervell opened 1 year ago
If we understand the ask properly, to output JSONL, each line would be each match record -- is this what you are expecting? Your jq example wouldn't quite work, as the .matches[]
would be the top-level lines -- I think it would be something like this:
grype <INPUT> -o jsonl | xargs -I {cve_id} ./cve-search.py {cve_id}
We probably wouldn't stream each result individually, but only output a JSONL file at the end.
@kzantow sorry for the late response, but yes, this is what I meant ;) Any reason why we can't stream result individually in a more "live" manner ?
What would you like to be added: Add JSON line output like
grype <INPUT> -o jsonl
Why is this needed: Tail the output of grype to other tools in real-time
Additional context: This would allow pipes like:
grype <INPUT> -o jsonl | jq -r '.matches[].vulnerability.id | xargs -I {cve_id} ./cve-search.py {cve_id}