Skip to content

fix(dts): bundle ZipSlipGuard into delivery-tier-distribution jar (#65) - #66

Merged
natechadwick merged 1 commit into
mainfrom
bugfix/65-bundle-zipslipguard-into-dts-preinstall
Aug 24, 2026
Merged

fix(dts): bundle ZipSlipGuard into delivery-tier-distribution jar (#65)#66
natechadwick merged 1 commit into
mainfrom
bugfix/65-bundle-zipslipguard-into-dts-preinstall

Conversation

@vijaya-boddipudi

Copy link
Copy Markdown
Collaborator

Summary

Fixes #65

MainDTSPreInstall references com.percussion.security.io.ZipSlipGuard, but delivery-tier-distribution/pom.xml declared no dependency on perc-security-utils and its jar contained only this module's classes. Running java -jar delivery-tier-distribution.jar at pre-install time therefore threw:

NoClassDefFoundError: com/percussion/security/io/ZipSlipGuard
        at com.percussion.preinstall.MainDTSPreInstall.extractArchive(MainDTSPreInstall.java:214)

Changes

deliverytiersuite/delivery-tier-suite/delivery-tier-distribution/pom.xml

  1. Declare compile-scope dep on com.percussion:perc-security-utils.
  2. Add maven-assembly-plugin with the jar-with-dependencies descriptor so the produced delivery-tier-distribution.jar bundles runtime deps (including ZipSlipGuard). Mirrors the pattern in modules/perc-distribution-tree/pom.xml:452-475.

deliverytiersuite/delivery-tier-suite/delivery-tier-distribution/src/main/java/com/percussion/preinstall/MainDTSPreInstall.java

  • Spotless comment-wrap normalization (incidental, applied by mvn-env.sh during rebuild).

Validation

  • mvn-env.bat clean package -DskipTests -pl deliverytiersuite/delivery-tier-suite/delivery-tier-distribution succeeds.
  • jar tf target/delivery-tier-distribution.jar | grep ZipSlipGuard -> com/percussion/security/io/ZipSlipGuard.class
  • Manifest: Main-Class: com.percussion.preinstall.MainDTSPreInstall

JDK 1.8.0 compatible. No CHANGELOG.md entry per AGENTS.md. Version.properties buildNumber not modified.

MainDTSPreInstall calls com.percussion.security.io.ZipSlipGuard but
delivery-tier-distribution declared no dependency on perc-security-utils
and its jar was built without bundled dependencies. Running
java -jar delivery-tier-distribution.jar at pre-install time then
threw NoClassDefFoundError: com/percussion/security/io/ZipSlipGuard.

- Declare compile-scope dep on com.percussion:perc-security-utils.
- Add maven-assembly-plugin with jar-with-dependencies so the
  produced jar bundles runtime deps, mirroring the pattern in
  modules/perc-distribution-tree/pom.xml.

Spotless comment-wrap delta in MainDTSPreInstall.java is incidental.
@natechadwick
natechadwick merged commit 9667df1 into main Aug 24, 2026
3 checks passed
@natechadwick
natechadwick deleted the bugfix/65-bundle-zipslipguard-into-dts-preinstall branch August 24, 2026 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(dts): bundle ZipSlipGuard into delivery-tier-distribution.jar so pre-install runs

2 participants