Last week CVE (Common Vulnerabilities and Exposures) -2021-44228 in Apache Log4J logging library which is a RCE (Remote Code Execution) class vulnerability was reported.
Log4J is a popular logging library which is open sourced and used by many projects all over the tech space.
Patch and resolvable techniques are already provided in many blogs and websites.
Recently i learned about from banned dependencies from @gunnarmorling’s tweet . Maven’s enforcer plugin can ban certain dependencies using rules.
|
|
here <bannedDependencies>
rule enforces to exclude any log4j dependency to get excluded if its not 2.15.0 or greater. searchTransitive is by default true so it will check transitive dependencies and apply this rule for them.
On gradle there are constraints that can help to do similar rule enforcement for excluding vulnerable dependencies from project. That i learned from @CedricChampeau tweet.
|
|