spring-cloud / spring-cloud-contract

Support for Consumer Driven Contracts in Spring
https://cloud.spring.io/spring-cloud-contract
Apache License 2.0
720 stars 439 forks source link

Get rid of commons-beanutils #2129

Open vkochnev opened 4 months ago

vkochnev commented 4 months ago

Spring Cloud Contract uses commons-beanutils which is extremely old and depends on even more outdated and moreover vulnerable commons-collections library, there is also no evidence that common-beanutils will be updated any time soon.

The use of the aforementioned library is quite limited and should be easy to rewrite without use of this library. I actually found only one usage: https://github.com/spring-cloud/spring-cloud-contract/blob/d771b76c333508a85e1bc672f46b0b5ab2dae1f4/spring-cloud-contract-verifier/src/main/java/org/springframework/cloud/contract/verifier/builder/JsonBodyVerificationBuilder.java#L303

Also there are several usages of commons-collections in one file: https://github.com/spring-cloud/spring-cloud-contract/blob/d771b76c333508a85e1bc672f46b0b5ab2dae1f4/spring-cloud-contract-verifier/src/main/java/org/springframework/cloud/contract/verifier/converter/YamlToContracts.java#L43 Which can be replaced with Spring specific implementations or commons-collections4 if it's not possible.