if both direct and transtive depedency of same artifact are present in pom.xml, which will be used
Below is snippet from my pom.xml in the same order-
<dependency>
<groupId>com.browserstack</groupId>
<artifactId>browserstack-local-java</artifactId>
<version>1.0.6</version>
</dependency>
<!-- https://mvnrepository.com/artifact/junit/junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.1</version>
<scope>test</scope>
</dependency>```
browserstack-local-java has transitive dependency - junit 4.11
junit 4.11 has direct vulnerability. If I scan this project for vulnerability -
which version of junit will be considered?
Will it be junit 4.11 which is transitive to broswerstack-local-java
or the later one which is 4.13.1 ?
Thanks