Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add "vertical" output format (#889)
This adds a new "vertical" output format that is designed for humans and based on the output of `osv-detector`, which effectively aims to group the output relating to each entity being scanned in vertical slices: <img width="898" alt="image" src="https://github.com/google/osv-scanner/assets/3151613/61297153-5c22-43a4-a78e-e07ce648142a"> Unfortunately I think it suffers significantly due to the assumptions made by the rest of the codebase for outputting that made sense when the final output was a table i.e. we dump a lot of information as we go about scanning, config files, vulnerability filtering, and so on that really should be grouped but currently cannot because they're all outputted at different stages - I think a way to address that could be using some sort of event-emitter type pattern so that the reporters could be responsible for deciding what they actually do (e.g. `r.Emit("filtered-vulnerability", ...)` and then most reporters could choose to just print immediately, and ones like "vertical" could choose to add it to an internal struct), but I think that'll involve a lot more work; for now I'm just going to ignore the pre-results output. Resolves #85
- Loading branch information