sonatype-nexus-community / scan-gradle-plugin

Gradle plugin that scans the dependencies of a Gradle project using Sonatype platforms: OSS Index and Nexus IQ Server.
Apache License 2.0
77 stars 21 forks source link

[FEATURE] Ability to filter vulnerabilities based on score #155

Closed sgilhooly closed 6 months ago

sgilhooly commented 6 months ago

cc @bhamail / @DarthHater / @guillermo-varela / @shaikhu

github-actions[bot] commented 6 months ago

Hi!

First of all, thank you for opening your first issue. Elementary, we appreciate all feedback that helps us continue improving this plugin.

As this is a community project we can't commit to official due dates for reviews and developing, but we're definitely committed to delivering services, integrations and plugins of top quality.

So please be patient, we will review your issue and get back to you as soon as we can!

Regards, Sherlock Trunks 🐘

guillermo-varela commented 6 months ago

Hi @sgilhooly!

I have a possible implementation of this in my fork but I am not familiar with Nexus IQ so I don't know how this feature would interact with that.

When using ossIndexAudit there is no interaction with Nexus IQ Server. Instead it uses the free service OSS Index.

As a related note I also would find it useful to be able to allow the build task to succeed even if vulnerabilities are discovered. This would allow me to use the output of the scan to perform additional analysis of the report and decide for myself if the build should be failed or not. Having that ability would mostly make the "minimum score" feature unnecessary (for me anyway). So if that is generally useful, I could create a separate issue/PR for that.

I like that idea! It would keep logic simple in the plugin and each one could decide in their pipeline how to process the output. Also, you wouldn't need to parse plain text but instead could save the results in the CycloneDX 1.4 JSON format for easier interpretation.

I also have not been able to get integration tests to work (even without my change) so not sure what validation I might be missing out on.

You can submit your pull-request and we'll do our best to provide asistance 😄

Contributions from community are more than welcome 🎉

guillermo-varela commented 6 months ago

Hi @sgilhooly!

Your contribution is now available on version 2.8.2: https://github.com/sonatype-nexus-community/scan-gradle-plugin/releases/tag/2.8.2

Please let us know if this works for you and thank you for taking the time to develop this new feature 😄

sgilhooly commented 6 months ago

Thank you so much for considering it, reviewing it, and merging it! Looking forward to making good use of this plugin!