fix(security): upgrade Spring dependency baseline - #29
Merged
Conversation
Upgrade to the current supported Spring Boot 3.5 line and let its BOM align Spring Data, Hibernate, and test dependencies. Move CI to Java 17 and make Maven verification fail if the test suite is not discovered. Co-Authored-By: Dhiman's Agentic Suite <dhiman.seal@hotmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The default branch has three high-severity Dependabot alerts in Spring Boot and Hibernate. The
affected Spring Boot 2.7 and Hibernate 5 lines do not have patched releases for every advisory, so
keeping those baselines cannot close the alerts honestly.
This change moves the build to the supported Spring Boot 3.5 line and Java 17, then imports Spring
Boot's dependency BOM so Spring Data, Hibernate, JUnit, Mockito, and H2 stay mutually compatible.
It also replaces the obsolete test runner and makes Maven fail when it discovers no tests. Without
that guard, the first migration attempt exited successfully while silently running zero tests.
Changes
6.6.53.Final release.
spring-boot-dependenciesinstead of independently pinning related framework and testdependencies.
verifyon Java 17.Test plan
mvn --batch-mode --no-transfer-progress -Dgpg.skip=true clean verify: 25 tests passed,with zero failures, errors, or skips; JAR, sources, and Javadocs were built.
mvn --batch-mode --no-transfer-progress dependency:tree: resolved Spring Boot 3.5.16,Spring Data JPA 3.5.13, Hibernate 6.6.53.Final, and aligned JUnit 5.12.2 artifacts.
actionlint: workflow syntax and action expressions passed.gitleaks detect --no-git --source .: no secrets found.git diff --check: no whitespace errors.Local
verifyskips only GPG signing because the release key is intentionally unavailable in thisworkspace. Compilation, test discovery, all 25 tests, packaging, source JAR, and Javadocs still run.
Trade-offs
This intentionally raises the minimum runtime baseline to Java 17 and Spring Boot 3.5. That is a
breaking compatibility boundary for Spring Boot 2.x consumers, but those end-of-life dependency
lines cannot satisfy the current security advisories. Production source code and generated public
API shapes are unchanged; the existing generator tests compile generated configurations and invoke
their data source, entity-manager-factory, and transaction-manager paths against the new stack.
How to review
pom.xmldependency management first: the BOM should be the only source of versions forthe Spring, Hibernate, and managed test dependencies.
.github/workflows/maven.yml: Java 17 must match the POM and the singleverifycommandmust retain the complete build/test/package gate while skipping only local release signing.
the three vulnerable default-branch dependency lines are absent.