File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
java/maven/abstract-project Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -121,3 +121,28 @@ The concept is to seal `postgresql` jar.
121
121
java.lang.SecurityException: sealing violation: package org.postgresql is
122
122
sealed
123
123
```
124
+
125
+ ### Java Modules
126
+
127
+ See https://github.com/FredBonux/class-hijack-poc/tree/mitigation-module
128
+
129
+ The packaging of victim application will fail.
130
+
131
+ ### Maven Enforcer Plugin
132
+
133
+ Using any of the above packaging techniques with profile ` enforcer ` and
134
+ expect a build failure.
135
+ Example:
136
+ ``` shell
137
+ mvn clean package -Passembly,enforcer
138
+ ```
139
+ ``` text
140
+ [ERROR] Rule 0: org.codehaus.mojo.extraenforcer.dependencies.BanDuplicateClasses failed with message:
141
+ [ERROR] Duplicate classes found:
142
+ [ERROR]
143
+ [ERROR] Found in:
144
+ [ERROR] dev.scored:D11:jar:1.0.0:compile
145
+ [ERROR] org.postgresql:postgresql:jar:42.7.7:compile
146
+ [ERROR] Duplicate classes:
147
+ [ERROR] org/postgresql/Driver.class
148
+ ```
You can’t perform that action at this time.
0 commit comments