rubysec / bundler-audit

Patch-level verification for Bundler
GNU General Public License v3.0
2.68k stars 228 forks source link

format: adding a Junit presenter format inspired by #206 #314

Closed paulRbr closed 3 years ago

paulRbr commented 3 years ago

This is an addition of a new 'junit' format as a follow up to the closed #206 PR.

I've mainly taken inspiration from the original template of @salzig and adapted to the new Formats module.

postmodern commented 3 years ago

FYI this could be it's own gem. As long as the gem is installed and provides a lib/bundler/audit/cli/formats/junit.rb file, --format unit should require the file and find the registered :junit format.

paulRbr commented 3 years ago

Would prefer that all XML String interpolations be wrapped in a xml(...) escaping method that does CGI.escapeHTML(string.to_s).

Thanks for your review @postmodern. I've done what you suggested. And thanks for the tip about the ruby gem.

The junit format is simple enough that I don't really feel like creating a dedicated gem just for that. But if you don't think it's going to land in bundler-audit let me know :slightly_smiling_face:

paulRbr commented 3 years ago

Thanks for the quick review @postmodern :bow: