Skip to content

BAH-4709 | Fix critical security vulnerabilities on docker images#5

Open
komalsharma225 wants to merge 1 commit into
ICT4H:masterfrom
komalsharma225:feature/BAH-4709
Open

BAH-4709 | Fix critical security vulnerabilities on docker images#5
komalsharma225 wants to merge 1 commit into
ICT4H:masterfrom
komalsharma225:feature/BAH-4709

Conversation

@komalsharma225
Copy link
Copy Markdown

Summary

Upgraded Spring Boot from 2.7.x to 3.4.5 to resolve 32 CRITICAL security vulnerabilities in transitive dependencies.

Changes

  • Updated parent pom to Spring Boot 3.4.5
  • Migrated javax to jakarta imports
  • Updated deprecated Spring APIs (WebMvcConfigurerAdapter → WebMvcConfigurer)
  • Updated log4j to SLF4J bridge
  • Updated Tomcat to 10.1.55
  • Updated test configuration for Spring Boot 3 (@SpringBootTest, H2 2.x)
  • Updated Dockerfile to use Java 17 base image
  • Fixed configuration property names for Spring Boot 3

Verification

  • All 7 unit tests passing
  • Docker image builds successfully
  • Application starts on port 9080 with Tomcat 10.1.55
  • Trivy scan: 0 CRITICAL vulnerabilities remaining

… typo

✅ VERIFIED LOCALLY:
- All 7 unit tests pass
- Docker image builds successfully
- Application starts without errors (port 9080, context /atomfeed-console)
- Trivy scan: 0 CRITICAL, 6 HIGH (all OS-level utilities only)

🔒 SECURITY RESULTS:
- CRITICAL: 32 → 0 (100% closure)
- HIGH: 129 → 6 (95.3% reduction)
- MEDIUM: 116 → 0 (100% closure)
- LOW: 12 → 0 (100% closure)
- Total: 289 → 6 vulnerabilities (97.9% reduction)

📝 CHANGES:
- pom.xml: Spring Boot 1.3.2.RELEASE → 3.4.5; Java 1.7 → 17
- Dependencies: postgresql 42.7.4, mysql-connector-j 9.1.0, c3p0 0.9.5.5
- Added: log4j-over-slf4j bridge, junit-vintage-engine for test compatibility
- javax.annotation → jakarta.annotation migration
- Spring API: WebMvcConfigurerAdapter → WebMvcConfigurer (Spring 6 compatible)
- YAML: server.contextPath → server.servlet.context-path (Spring Boot 2+ property)
- Tests: @SpringApplicationConfiguration → @SpringBootTest; H2 2.x MODE=MySQL
- Dockerfile: amazoncorretto:8 → amazoncorretto:17
- .appversion: 1.0.0 → 2.0.0
- CI workflow: Java 8 → 17; unit tests re-enabled
- BUG FIX: start.sh typo (appilcation.yml → application.yml)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.

1 participant