sonatype-nexus-community / nancy

A tool to check for vulnerabilities in your Golang dependencies, powered by Sonatype OSS Index
Apache License 2.0
549 stars 76 forks source link

show number of ignored vulnerabilities in summary table #248

Closed MichelKazi closed 2 years ago

MichelKazi commented 2 years ago

This pull request makes the following changes:

I'm unsure if y'all would rather it not be in the table though. I also think I could probably just list out the dependencies that are ignored but I am just now re-learning go so baby steps :)

I REALLY miss you all. <3

It relates to the following issue #s:

cc @bhamail / @DarthHater

sonatypecla[bot] commented 2 years ago

Thanks for the contribution! Unfortunately we can't verify if the committer(s), Michel Kazi michel.kazi@viacomcontractor.com, signed the CLA because they have not associated their commits with their GitHub user. Please follow these instructions to associate your commits with your GitHub user. Then sign the Sonatype Contributor License Agreement and this Pull Request will be revalidated.

MichelKazi commented 2 years ago

Feels like a brute force leetcode solution to nest a for loop and check for vulnerabilities here

maybe I can add an Exclusions field here https://github.com/sonatype-nexus-community/go-sona-types/blob/main/ossindex/types/types.go and just get the length of that or something

MichelKazi commented 2 years ago

@svilgelm image

Let me know what you think

SVilgelm commented 2 years ago

Looks good 👍

zendern commented 2 years ago

PR changes look good to me. I think we could use a test to validate it does in fact get printed out.

See here : https://github.com/sonatype-nexus-community/nancy/blob/main/internal/audit/auditlogtextformatter_test.go

And if you are up for it we might as well add it to the csv formatter too. https://github.com/sonatype-nexus-community/nancy/blob/main/internal/audit/csvformatter.go

json output it already happens for free as we just serialize the object that gets passed in.