Skip to content

fix: 移除 pf4j 示例未使用的 Spring 4.3.6 依赖(关闭 22 条安全告警) - #39

Merged
loong10k merged 1 commit into
mainfrom
fix/remove-unused-spring-deps
Aug 13, 2026
Merged

fix: 移除 pf4j 示例未使用的 Spring 4.3.6 依赖(关闭 22 条安全告警)#39
loong10k merged 1 commit into
mainfrom
fix/remove-unused-spring-deps

Conversation

@loong10k

Copy link
Copy Markdown
Collaborator

内容

pf4j 两个插件示例的源码零 Spring import(仅使用 javax.servlet.http.HttpServletRequest),pom 里声明的 Spring 全家桶(spring-aop/aspects/beans/context/context-support/core/web/webmvc 4.3.6)从未被使用——直接移除。

Spring 4.3.x 已 EOL,所涉 CVE(路径穿越、XSS、multipart 请求走私、DoS 等)在 4.x 与 5.x 线均无修复版本,升级无法闭环;移除未使用依赖即消除攻击面。

验证

mvn clean verify 全 14 模块 JDK 8 / 17 / 21 全绿 ✅

安全收益

关闭 Dependabot 告警 ×22:CVE-2024-22262 / 2024-38819 / 2025-22233 / 2026-22741 / 2026-22745 / 2026-41841~41848 / 2026-41853(含 High:路径穿越、XSS、DoS)

注:pf4j-spring/ro.fortsoft.pf4j-spring 仍会在运行时传递引入旧 Spring,但源码未使用且非直接依赖,不在告警范围;如需彻底清理可后续移除。

- 两个 pf4j 插件示例的源码零 Spring import(仅用 javax.servlet),
  pom 中声明的 spring-aop/aspects/beans/context/context-support/
  core/web/webmvc 4.3.6(depMgmt)与 spring-web(test 模块)从未使用
- Spring 4.3.x 已 EOL,相关 CVE(路径穿越/XSS/请求走私/DoS 等)在
  4.x/5.x 线均无修复版本;移除未使用依赖即消除攻击面
- 同步移除 spring.version 属性
@loong10k
loong10k merged commit a744800 into main Aug 13, 2026
3 checks passed
@loong10k
loong10k deleted the fix/remove-unused-spring-deps branch August 13, 2026 19:14
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