Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .config/pmd/java/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,28 @@
</properties>
</rule>

<rule name="EnsureZipEntryNameIsSanitized"
language="java"
message="ZipEntry name should be sanitized"
class="net.sourceforge.pmd.lang.rule.xpath.XPathRule">
<description>
ZipEntry name should be sanitized.
Unsanitized names may contain '..' which can result in path traversal ("ZipSlip").

You can suppress this warning when you properly sanitized the name.
</description>
<priority>4</priority>
<properties>
<property name="xpath">
<value>
<![CDATA[
//MethodCall[pmd-java:matchesSig('java.util.zip.ZipEntry#getName()') or pmd-java:matchesSig('org.apache.commons.compress.archivers.ArchiveEntry#getName()')]
]]>
</value>
</property>
</properties>
</rule>

<rule name="JavaObjectSerializationIsUnsafe"
language="java"
message="Using Java Object (De-)Serialization is unsafe and has led to too many security vulnerabilities"
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>12.0.0</version>
<version>12.0.1</version>
</dependency>
</dependencies>
<configuration>
Expand All @@ -70,7 +70,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.27.0</version>
<version>3.28.0</version>
<configuration>
<analysisCache>true</analysisCache>
<includeTests>true</includeTests>
Expand Down
4 changes: 2 additions & 2 deletions vaadin-simple-grid-filter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>12.0.0</version>
<version>12.0.1</version>
</dependency>
</dependencies>
<configuration>
Expand All @@ -291,7 +291,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.27.0</version>
<version>3.28.0</version>
<configuration>
<analysisCache>true</analysisCache>
<includeTests>true</includeTests>
Expand Down