Created
December 13, 2021 10:26
-
-
Save diakogiannis/45d621b08d0d67b8190b951c4b64cbbd to your computer and use it in GitHub Desktop.
A maven enforcer plugin rule in order to avoid having a vulnerable jog4j versions through a transient dependency
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-enforcer-plugin</artifactId> | |
<version>3.0.0</version> | |
<executions> | |
<execution> | |
<id>block-vulnerable-log4j-versions</id> | |
<phase>validate</phase> | |
<goals> | |
<goal>enforce</goal> | |
</goals> | |
<configuration> | |
<rules> | |
<bannedDependencies> | |
<excludes> | |
<exclude>org.apache.logging.log4j:log4j-core:(,2.15.0)</exclude> | |
</excludes> | |
</bannedDependencies> | |
</rules> | |
<fail>true</fail> | |
</configuration> | |
</execution> | |
</executions> | |
</plugin> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment