pom.xml中解决Provides transitive vulnerable dependency maven:org.yaml:snakeyaml:1.33警告

article/2025/9/19 20:18:35

警告出现

构建springboot3项目时,pom文件的spring-boot-starter-web依赖部分整体高亮,

显示Provides transitive vulnerable dependency maven:org.yaml:snakeyaml:1.33

        <dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId></dependency>

警告原因

这个警告提示我们的Maven项目中使用了一个被认为是有漏洞的依赖项,并且这个依赖项也被其他依赖项所传递。

具体来说,这个警告是指:

在我们的pom文件中,org.yaml:snakeyaml:1.33这个库是存在漏洞的。

解决警告

1.升级依赖项

尝试升级依赖项版本,如果有更新的版本可用,则可能已经修复了该漏洞,

去中央仓库搜索此依赖可以看见最新的版本是2.0,并且它没有红字漏洞警告,说明2.0版本已经解决了这个漏洞。(当前日期为2023.03.31)

既然在新版本中,这个依赖已经解决了漏洞,那么我们可以升级依赖项版本

在Maven项目中,可以使用dependencyManagement标签来管理依赖项。

在这个标签中,可以指定一个特定版本,以便所有依赖项都将使用这个版本

例如,将以下内容添加到pom文件中

    <dependencyManagement><dependencies><dependency><groupId>org.yaml</groupId><artifactId>snakeyaml</artifactId><version>2.0</version></dependency></dependencies></dependencyManagement>

这将确保所有使用snakeyaml库的依赖项都使用指定的2.0版本,而不是使用其他版本。如果有可用的更高版本,可以选择将版本号更新为最新版本。

2.移除依赖项

如果这个库不是必须的,你可以考虑从你的项目中移除它。

例如尝试移除spring-boot-starter-web依赖中的snakeyaml依赖

        <dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter</artifactId><exclusions><exclusion><groupId>org.yaml</groupId><artifactId>snakeyaml</artifactId></exclusion></exclusions></dependency>

3.忽略警告

如果你确定你的代码和应用程序环境能够安全地处理这个漏洞,你可以选择忽略警告,但这并不是一种推荐的做法。


http://chatgpt.dhexx.cn/article/dJB2EQ2w.shtml

相关文章

css3的过度,transition

transition 版本:CSS3 transitionCSS属性是 示例/* apply to 1 property */ /* property name | duration */ transition: margin-right 4s; /* property name | duration | delay */ transition: margin-right 4s 1s; /* property name | duration | timing function */ tran…

CSS transition

一&#xff0c;过渡属性 1.transition用于属性过渡&#xff0c;即属性值改变前后有过渡效果。 2.注意&#xff0c;过渡属于一定要定义过渡前的属性和过渡后的属性&#xff0c;若过渡前属性未明确定义则不会产生过渡效果&#xff0c;如下&#xff0c;若过渡前width没有直接定义…

is invalid, transitive dependencies (if any) will not be available解决方案

问题描述 maven项目在编译的时候报如下WARNING&#xff1a; [WARNING] The POM for com.winwill.test:0.0.1-SNAPSHOT is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details 翻译一下&#xff1a; com.winwill.test…

Transition of CSS3

文章目录 Transition of CSS3transition-propertytransition-durationtransition-timing-functionlineareaseease-inease-outease-in-out transition-delaycubic-bezier Transition of CSS3 这个属性如果说是动画&#xff0c;其实有点不太准确&#xff0c;准确的来说是一个过渡…

transitive dependencies (if any) will not be available, enable debug logging for more details

问题描述 reload all maven projects 时 报的警告 [WARNING] The POM for xxx is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details 原因 1.网络问题,导致jar没下载完成 2.依赖传递的问题&#xff0c;父pom中的dep…

Transitive attribute传递属性

今天看到了这个属性。 我就很奇怪。因为这个属性在属性下面能看到。但是在传输里面没看到。 因为它是个导航属性&#xff0c;我以为在end routine里面写的。结果没看到它。 那么这个是啥&#xff1f; 传递属性是导航属性的导航属性。 下面这个country就是customer的传递属性。…

transition和transform

transition-property属性指定CSS属性的nametransition效果&#xff08;transition效果时将会启动指定的CSS属性的变化&#xff09;&#xff0c;默认是all&#xff0c;width和height也可以。 提示:一个转场效果&#xff0c;通常会出现在当用户将鼠标悬停在一个元素上时。 transi…

transition 用法

一、animation有哪些属性值 animation-name 规则名称 animation-duration 动画时间 animation-timing-function animation-delay animation-iteration-count animation-direction 二、transition有哪些属性: transition-property 对哪个属性设置过渡 transition-duration 过渡周…

迁移学习——Transitive Transfer Learning

《Transitive Transfer Learning》学习 Proceedings of the 21th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining 文章目录 摘要关键词 一、介绍二、问题定义三、中间域选择四、传递知识转移4.1非负矩阵三因子分解4.2迁移学习的NMTF4.3TTL迁移学…

Provides transitive vulnerable dependency - Intellij IDEA

打开pom.xml报 Provides transitive vulnerable dependency org.apache.commons:commons-collections4:4.1 Cx78f40514-81ff 7.5 Uncontrolled Recursion vulnerability pending CVSS allocation Results powered by Checkmarx© 查了下插件列表&#xff0c;idea自带了一…

maven编译问题之 -The POM for XXX is invalid, transitive dependencies (if any) will not be available

问题一&#xff1a; 把父工程tao-parent install 到maven本地仓后&#xff0c;接着install tao-common工程&#xff0c;然后报错 报错信息如下&#xff1a; [WARNING] The POM for com.fasterxml.jackson.core:jackson-databind:jar:2.4.2 is invalid, transitive dependencie…

Provides transitive vulnerable dependency org.yaml:snakeyaml:1.33

一、错误介绍 新创建了一个springboot3的项目&#xff0c;弹出警告。 <parent><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-parent</artifactId><version>3.0.1</version><relativePath/>…

CSS3 Transition

Transition 简介 Transition 可以设置 CSS 属性的过渡效果&#xff0c;它有以下几个属性。 transition-property 用于指定应用过渡属性的名称transition-duration 用于指定这个过渡的持续时间transition-delay 用于指定延迟过渡的时间transition-timing-function 用于指定过渡…

Gradle依赖项学习总结,dependencies、transitive、force、exclude的使用与依赖冲突解决...

http://www.paincker.com/gradle-dependencies https://docs.gradle.org/current/userguide/dependency_management.html http://www.concretepage.com/build-tools/gradle/gradle-exclude-transitive-dependency-example Gradle是一个非常好用的编译工具&#xff0c;特别是继承…

Gradle依赖项之transitive/exclude/force/(+)

传递(transitive)排除(exclude)强制(force)动态版本() implementation(com.xxx:xxx:1.0.0aar) {transitive truechanging trueforce trueexclude group: com.xxx, module: xxx}强制使用指定版本号 configurations.all {resolutionStrategy {force com.github.bumptech.glid…

mptcp on mininet

这篇文章主要记录mptcp在mininet上的仿真实验。mininet中的网络实验&#xff0c;数据包走的是内核协议栈。这样得出的结果&#xff0c;好处就是实际网络协议栈的性能。缺点就是&#xff0c;要验证新的想法&#xff0c;需要修改内核协议栈。而且关于内核中的数据&#xff0c;比如…

mininet操作

mn:启动mininet sudo mn -- topo single , 3 -- mac -- switch ovsk -- controller remote &#xff08;1&#xff09;--topo:指定openflow网络拓扑&#xff0c;四种类型的openflow网络拓扑&#xff1a;tree&#xff0c;single&#xff0c;linear&#xff0c;minimal ①缺省情…

mininet 主机双网关拓扑设计

这次的拓扑是一个主机拥有两个接口&#xff0c;两个接口分别有不同的网关&#xff0c;拓扑图如下&#xff0c;拓扑可以通过前两篇中提到的miniedit.py去生成&#xff1a; 主要配置指令如下&#xff1a; 截得不全直接看代码吧 #!/usr/bin/pythonfrom mininet.net import Minine…

Mininet笔记-基本命令

命令详解 拓扑构建命令 –topo  单一&#xff08;single&#xff09;拓扑&#xff0c;永远只有一个交换机&#xff0c;主机&#xff08;host&#xff09;可以有N个  线形&#xff08;linear&#xff09;拓扑&#xff0c;可以有多个交换机和主机&#xff0c;每个交换机只连接…

mininet基本操作

mininet是由斯坦福大学基于Linux Container架构开发的一个进程虚拟化网络仿真工具&#xff0c;可以创建一个包含主机&#xff0c;交换机&#xff0c;控制器和链路的虚拟网络&#xff0c;其交换机支持OpenFlow&#xff0c;具备高度灵活的自定义软件定义网络。 在ubuntu系统中安…