Skip to content

Phase 1A: Non-Breaking Dependency Updates (Drop-in Replacements) #2253

@github-actions

Description

@github-actions

Summary

This issue tracks Phase 1A of the dependency update strategy: updating non-breaking, drop-in replacement dependencies that require zero code changes. These updates are guaranteed safe based on changelog analysis and semantic versioning guarantees.

Parent Issue: #2249 (Phase 1: Low-Risk Dependency Updates)
Priority: High (Security updates included)
Risk Level: Minimal (Drop-in replacements)
Testing Required: Standard test suite


Update Categories

🛡️ Apache Commons Libraries (7 dependencies)

Dependency Current Target Notes
commons-text 1.13.1 1.15.0 Bug fixes only, security patches
commons-compress 1.26.0 1.28.0 Bug fixes and improvements, security critical
commons-validator 1.9.0 1.10.1 Bug fixes only
commons-net 3.11.1 3.12.0 Bug fixes only
commons-exec 1.4.0 1.5.0 Bug fixes only
commons-digester3 3.2 3.3 Bug fixes only
commons-dbcp2 2.14.0 ✅ Already latest No update needed

Healthcare Impact: Used throughout the application for file operations, network communication, and data validation


🔐 Security Libraries (2 dependencies)

Dependency Current Target Notes
encoder (OWASP) 1.2.1 1.4.0 New APIs added, fully backward compatible, MUST sync with encoder-jsp
encoder-jsp (OWASP) 1.2.3 1.4.0 New APIs added, fully backward compatible, MUST sync with encoder
spring-security-crypto 6.3.9 6.4.4 Patch releases only, crypto module is Jakarta-independent

Security Impact: Critical - Core XSS protection and PHI encryption

⚠️ Version Synchronization Required: encoder and encoder-jsp MUST be updated to the same version


🔧 Utility Libraries (4 dependencies)

Dependency Current Target Notes
guava 33.4.8-jre 33.5.0-jre Minor version, backward compatible
zxing-core 3.5.3 3.5.4 Patch release, MUST sync with javase
zxing-javase 3.5.3 3.5.4 Patch release, MUST sync with core
twelvemonkeys-common-lang 3.12.0 3.13.0 Minor version, backward compatible
annotations (JetBrains) 24.1.0 26.0.2-1 Patch release

⚠️ Version Synchronization Required: zxing-core and zxing-javase MUST be updated to the same version


🧪 Test Dependencies (2 dependencies)

Dependency Current Target Notes
mockito-core 5.8.0 5.21.0 Already on 5.x, no major breaking changes, sync with mockito-junit-jupiter
mockito-junit-jupiter 5.8.0 5.21.0 Already on 5.x, no major breaking changes, sync with mockito-core
assertj-core 3.24.2 3.27.6 Backward compatible

⚠️ Version Synchronization Required: mockito-core and mockito-junit-jupiter MUST be updated to the same version


🔨 Maven Build Plugins (4 plugins)

Plugin Current Target Notes
maven-surefire-plugin 3.2.5 3.5.4 Bug fixes only
jacoco-maven-plugin 0.8.11 0.8.15 Requires Maven 3.9.9+ (we have this ✅)
maven-checkstyle-plugin 3.6.0 ✅ Already latest No update needed
maven-pmd-plugin 3.27.0 3.28.0 Compatible
pmd-core 7.10.0 7.20.0 Compatible, MUST sync with pmd-java
pmd-java 7.10.0 7.20.0 Compatible, MUST sync with pmd-core

⚠️ Version Synchronization Required: pmd-core and pmd-java MUST be updated to the same version


Implementation Checklist

Pre-Implementation

  • Review Maven Central for exact latest versions on implementation date
  • Check CVE database for security advisories
  • Prepare rollback plan (document current versions)

Implementation Steps

  1. Update Version Properties (pom.xml)

    • Update log4j2.version if applicable (currently at latest 2.25.3)
    • Update other version properties as needed
  2. Update Apache Commons Dependencies

    • commons-text → 1.15.0
    • commons-compress → 1.28.0
    • commons-validator → 1.10.1
    • commons-net → 3.12.0
    • commons-exec → 1.5.0
    • commons-digester3 → 3.3
  3. Update Security Libraries (Synchronized)

    • encoder → 1.4.0
    • encoder-jsp → 1.4.0 (verify same version as encoder)
    • spring-security-crypto → 6.4.4
  4. Update Utility Libraries (Synchronized)

    • guava → 33.5.0-jre
    • zxing-core → 3.5.4
    • zxing-javase → 3.5.4 (verify same version as core)
    • twelvemonkeys-common-lang → 3.13.0
    • annotations (JetBrains) → 26.0.2-1
  5. Update Test Dependencies (Synchronized)

    • mockito-core → 5.21.0
    • mockito-junit-jupiter → 5.21.0 (verify same version as core)
    • assertj-core → 3.27.6
  6. Update Maven Plugins (Synchronized)

    • maven-surefire-plugin → 3.5.4
    • jacoco-maven-plugin → 0.8.15
    • maven-pmd-plugin → 3.28.0
    • pmd-core → 7.20.0
    • pmd-java → 7.20.0 (verify same version as pmd-core)
  7. Update Dependency Lock Files

    • Run make lock to update dependencies-lock.json
    • Run make lock with modern tests to update dependencies-lock-modern.json

Testing Requirements

  • Run make clean
  • Run make install --run-tests (all tests must pass)
  • Manual smoke tests:
    • Login/logout
    • Patient search and demographics
    • E-Chart encounter notes (tests OWASP encoding)
    • File upload operations (tests Commons libraries)
    • Lab results display (tests OWASP encoding)

Post-Implementation


Version Synchronization Requirements

CRITICAL: These dependency groups MUST stay synchronized:

  1. OWASP Encoder - encoder and encoder-jsp at same version
  2. ZXing - zxing-core and zxing-javase at same version
  3. Mockito - mockito-core and mockito-junit-jupiter at same version
  4. PMD - pmd-core and pmd-java at same version

Security Priorities

Highest Priority (update first):

  1. OWASP Encoder (XSS protection core)
  2. Apache Commons Compress (zip bomb CVEs)
  3. Apache Commons Text (script injection CVEs)
  4. Spring Security Crypto (PHI encryption)

Success Criteria

  • All 19 non-breaking dependencies updated
  • Zero test failures
  • Zero new security vulnerabilities
  • No deprecation warnings introduced
  • All healthcare workflows functional
  • Dependency lock files updated
  • CI/CD pipeline green
  • All version synchronization requirements met

Risk Assessment

Risk Level: Minimal
Rationale: All updates are:

  • Backward compatible (no breaking changes per changelogs)
  • Drop-in replacements (no code changes required)
  • Patch or minor version updates only
  • Verified through official release notes

Rollback Time: < 5 minutes (git revert + redeploy)


Estimated Effort: 1-2 hours implementation + 1 hour testing
Next Phase: Phase 1B - Deprecation-Only Updates (see parent issue #2249)

Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: maintenanceCode refactoring, dependency updates

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions