-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Display vulnerabilities for returned dependencies #249
Conversation
Thanks for your great initiative and your kind words, @shaikhu. I'm going to have a proper look at your code soon(ish). In the meantime, I'll think of whether the 'default configuration' idea (#187) should be implemented first, so this feature could be built on top of it. I think making it possible to specify API credentials will greatly enhance the usability of this feature! |
As far as the output goes, may I ask for the following?
Coordinates Last updated Vulnerabilities
=========== ============ ===============
com.luhuiguo.netty:netty-handler:4.1.63.GM 24 Feb 2022 at 15:26 (CET) -
io.netty:netty-handler:5.0.0.Alpha2 03 Mar 2015 at 17:10 (CET) 1 high
org.jboss.errai.io.netty:netty-handler:4.0.0.Alpha1.errai.r1 23 Feb 2012 at 06:53 (CET) 3 medium, 1 low
io.netty.contrib:netty-handler-proxy:5.0.0.Alpha2 30 Sep 2022 at 08:28 (CEST) 5 medium
io.netty:netty5-handler:5.0.0.Alpha5 28 Sep 2022 at 16:09 (CEST) -
io.netty:netty-handler-proxy:5.0.0.Alpha2 03 Mar 2015 at 17:15 (CET) 2 high, 4 low
io.netty:netty-handler-ssl-ocsp:4.1.97.Final 23 Aug 2023 at 11:04 (CEST) -
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-handler</artifactId>
<version>5.0.0.Alpha2</version>
</dependency>
Vulnerabilities:
CVE-2023-xxxx (High) - https://ossindex.sonatype.org/component/.........
CVE-2023-xxxx (Medium) - https://ossindex.sonatype.org/component/.........
CVE-2023-xxxx (Medium) - https://ossindex.sonatype.org/component/.........
CVE-2023-xxxx (Low) - https://ossindex.sonatype.org/component/......... |
Great suggestions @mthmulders! For the severity text I used the following reference on the NVD website. I think this is consistent with with OSS index reports vuls.
See f11e909 and screen grab below
See 35e5ffb and screen grab below |
Look great @mthmulders! See 7dbcf1b and ed9001c. Also worth mentioning
|
I'd love to have this contribution in MCS, @shaikhu. If you're OK with that, let's remove the 'draft' status and I'll go through the code. A word of warning: I might be picky. This is absolutely not to disappoint you or mock you, it's because I'd love the code to flourish and be maintainable by myself (and possibly others). |
src/main/java/it/mulders/mcs/search/printer/TabularOutputPrinter.java
Outdated
Show resolved
Hide resolved
src/main/java/it/mulders/mcs/search/vulnerability/ComponentReportClient.java
Outdated
Show resolved
Hide resolved
src/test/java/it/mulders/mcs/search/printer/CoordinatePrinterTest.java
Outdated
Show resolved
Hide resolved
src/test/java/it/mulders/mcs/search/vulnerability/ComponentReportClientIT.java
Outdated
Show resolved
Hide resolved
src/test/java/it/mulders/mcs/search/vulnerability/ComponentReportClientIT.java
Show resolved
Hide resolved
src/test/java/it/mulders/mcs/search/vulnerability/ComponentReportResponseBodyHandlerTest.java
Outdated
Show resolved
Hide resolved
src/test/java/it/mulders/mcs/search/vulnerability/ComponentReportResponseBodyHandlerTest.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Maarten Mulders <[email protected]>
…ortResponseBodyHandlerTest.java Co-authored-by: Maarten Mulders <[email protected]>
…ortResponseBodyHandlerTest.java Co-authored-by: Maarten Mulders <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've run some manual tests and found a few issues. Could you please look into them?
src/main/java/it/mulders/mcs/search/vulnerability/ComponentReportClient.java
Outdated
Show resolved
Hide resolved
src/main/java/it/mulders/mcs/search/vulnerability/ComponentReportClient.java
Outdated
Show resolved
Hide resolved
src/main/java/it/mulders/mcs/search/vulnerability/ComponentReportClient.java
Outdated
Show resolved
Hide resolved
I had an email with a question about artifacts without reported vulnerabilities, but I can't find it back here. Anyway,
|
That was me sorry!
I deleted the question/comment and updated to print "-" with 639b16f. Happy to change back to empty space if you prefer.
agreed. a20c616 |
src/main/java/it/mulders/mcs/search/printer/CoordinatePrinter.java
Outdated
Show resolved
Hide resolved
…java Co-authored-by: Maarten Mulders <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think all is fine now!
@all-contributors please add @shaikhu for code. |
I've put up a pull request to add @shaikhu! 🎉 |
Firstly wanted to say thank you for developing such an amazing tool!
I started to look into issue #22 and this draft PR demonstrates a possible implementation. Any thoughts/ideas/feedback would be most welcome.
The OSS Index Rest API provides two endpoints for accessing a component report (listing known vulnerabilities). Sadly both endpoints involve rate limiting (I don't know the figures off the top of my head) but the authorized endpoint provides a higher limit. You can register and use an email and api token to authenticate each request. See instructions.
Do you already have a solution in mind? Any preference for how vulnerabilities should be displayed?