build: Spring Boot 2.7.18 补丁升级(修复 htmlunit / spring-boot-devtools / json-lib 告警) - #12
Merged
Merged
Conversation
Ruffianjiang
force-pushed
the
fix/spring-boot-2.7.18-patch
branch
3 times, most recently
from
August 20, 2026 04:21
1f8e256 to
a18294d
Compare
…ib->Jackson、Java 8->11,CI 同步 JDK 11
Ruffianjiang
force-pushed
the
fix/spring-boot-2.7.18-patch
branch
from
August 20, 2026 06:11
11dd9eb to
7c55be8
Compare
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.
背景
java4fun 当前存在以下 Dependabot 安全告警,本 PR 在 Spring Boot 2.7.x 范围内做补丁升级,以真正消除这些告警(不跨大版本):
spring-boot-devtools高危 ×3(GHSA-56v8-86gj-66jp,分别位于 banner / img2text / html2md 三个模块)htmlunit严重(GHSA-3xrr-7m6p-p7xh,html2md 模块)json-lib中危(GHSA-wwcp-26wc-3fxm,html2md 模块)变更内容
1. 根
pom.xmlspring.boot.version:2.7.3→2.7.18(2.7.x 最新补丁版,修复 devtools 高危漏洞)java.version及maven.compiler.source/target:1.8→112. 三个模块
pom.xml(banner / img2text / html2md)spring-boot-devtools:去掉显式2.7.3版本号,统一改由根 BOM(2.7.18)管理,修复高危漏洞(banner、img2text 此前显式钉死 2.7.3,不会随 BOM 升级,故需一并处理)。spring-boot-starter/spring-boot-starter-test等 Spring Boot 构件去掉显式2.7.3版本号,统一由 BOM 管理(保持 2.7.18 一致)。banner/img2text的java.version由1.8调整为11,与根工程一致。net.sourceforge.htmlunit:htmlunit:2.64.0→org.htmlunit:htmlunit:3.11.0(groupId/包名随 3.x 变更,修复严重漏洞)json-lib依赖(改用 Jackson,见下)source/target1.8→113. 源码
BaiduCrawlerUrl.java、InnotreeService.java、Test.java、test2.java)将com.gargoylesoftware.htmlunit包名重命名为org.htmlunit:htmlunit 3.x 仅包名变化,API 完全兼容,属纯重命名。WebLogAspect.java与InnotreeService.java:将net.sf.json(JSONObject / JSONArray)替换为 Jackson(com.fasterxml.jackson.databind,spring-boot-starter-web已自带,无需新增依赖),移除 json-lib 依赖以修复中危漏洞。验证建议
maven.test.skip=true已开启,跳过测试)。html2md已同步将编译器目标调整为 Java 11。关联