How to fix vulnerability warning for 'rest-assured' dependency?
Answered
Hi everyone,
I'm working on a Maven project in IntelliJ IDEA and having trouble properly setting up RestAssured as a test dependency.
My current is:
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<version>5.4.0</version>
</dependency>IntelliJ is showing this vulnerability warning:
WS-2019-0379 | Transitive Input Validation

I’ve tried a lot of things and also using other RestAssured versions (like 5.3.0, 5.2.0) and also added Groovy manually to address transitive dependency issues:
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy</artifactId>
<version>2.4.21</version> <!-- Safe version -->
</dependency>But the problem persists. Please let me know if you have any ideas or suggestions.
Thanks in advance!
Please sign in to leave a comment.
Hi Emma,
The
rest-assureddependency that you are using provides the following transitive dependencies:commons-codec:commons-codecversion1.11org.apache.commons:commons-lang3version3.11Each of these dependencies has a known security vulnerability:
commons-codecdependency should be at least of version1.13-RC1to avoid this issue.commons-langdependency needs to be at least version3.18.0With that in mind, you can manually add higher versions of the transient dependencies to your pom.xml (and reload the project in the Maven tool window) in order for Maven to use them and for the warning to go away: