r/learnjava • • 4h ago

Maven Dependency Report: how to identify false positives?

For an assignment I need to identify false positives in a dependency check report.

However, I have no idea to do so.

A lot of resources I found online state that it is typically "obvious" when there is a false positive, but to me it's not obvious at all. Without a single example of a false positive it's really hard to recognize one.

The report I have identifies 13 vulnerable dependencies and 290 vulnerabilities. Do I really need to check the 290 CVE one by one to identify the false positive?

What should be my workflow here?

Dependency Maven Package Version CVE Count
bcprov-jdk15on org.bouncycastle:bcprov-jdk15on 1.46 4
hibernate-validator org.hibernate.validator:hibernate-validator 6.0.18.Final 3
jackson-databind com.fasterxml.jackson.core:jackson-databind 2.10.2 11
log4j-api org.apache.logging.log4j:log4j-api 2.12.1 3
logback-core ch.qos.logback:logback-core 1.2.3 2
snakeyaml org.yaml:snakeyaml 1.25 8
spring-boot org.springframework.boot:spring-boot 2.2.4.RELEASE 9
spring-boot-starter-web org.springframework.boot:spring-boot-starter-web 2.2.4.RELEASE 9
spring-core* org.springframework:spring-core 5.2.3.RELEASE 29
spring-web* org.springframework:spring-web 5.2.3.RELEASE 30
spring-webmvc* org.springframework:spring-webmvc 5.2.3.RELEASE 29
tomcat-embed-core* org.apache.tomcat.embed:tomcat-embed-core 9.0.30 76
tomcat-embed-websocket* org.apache.tomcat.embed:tomcat-embed-websocket 9.0.30 77
1 Upvotes

3 comments sorted by

•

u/AutoModerator 4h ago

Please ensure that:

  • Your code is properly formatted as code block - see the sidebar (About on mobile) for instructions
  • You include any and all error messages in full - best also formatted as code block
  • You ask clear questions
  • You demonstrate effort in solving your question/problem - plain posting your assignments is forbidden (and such posts will be removed) as is asking for or giving solutions.

If any of the above points is not met, your post can and will be removed without further warning.

Code is to be formatted as code block (old reddit/markdown editor: empty line before the code, each code line indented by 4 spaces, new reddit: https://i.imgur.com/EJ7tqek.png) or linked via an external code hoster, like pastebin.com, github gist, github, bitbucket, gitlab, etc.

Please, do not use triple backticks (```) as they will only render properly on new reddit, not on old reddit.

Code blocks look like this:

public class HelloWorld {

    public static void main(String[] args) {
        System.out.println("Hello World!");
    }
}

You do not need to repost unless your post has been removed by a moderator. Just use the edit function of reddit to make sure your post complies with the above.

If your post has remained in violation of these rules for a prolonged period of time (at least an hour), a moderator may remove it at their discretion. In this case, they will comment with an explanation on why it has been removed, and you will be required to resubmit the entire post following the proper procedures.

To potential helpers

Please, do not help if any of the above points are not met, rather report the post. We are trying to improve the quality of posts here. In helping people who can't be bothered to comply with the above points, you are doing the community a disservice.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/GeorgeFranklyMathnet 2h ago

Short of the report misidentifying the library or the version you're actually depending upon, a false positive is when you're not using the feature from the library that's actually vulnerable. 

For instance, a famous vuln from years ago was Heartbleed in OpenSSL. We had an affected version in our product. But we knew we weren't using the heartbeat feature, so we weren't actually affected. We read the code at all our OpenSSL usage points to confirm that fact. 

Sometimes the case is even simpler, and you're only vulnerable if you use a particular configuration setting. But, yeah, someone has to read the CVE, or a trustworthy summary of it, to find that stuff out.

1

u/HookGroup 2h ago

How do I know if the report is misidentifying the library or the version?