简体   繁体   English

spring-boot依赖项和安全修复程序

[英]spring-boot dependencies and security fixes

im using spring boot in a recommended way, that is by adding 我以推荐的方式使用spring boot,即添加

classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")

and then adding dependencies i need, like: 然后添加我需要的依赖项,如:

compile('org.springframework.boot:spring-boot-starter-web')

That dependency pulls some predefined version of tomcat that will host my microservice. 这种依赖性拉动了一些预定义的tomcat版本,它将托管我的微服务。

but what happens when there is a security fix for tomcat released? 但是当发布tomcat的安全修复程序时会发生什么? does spring team track all the security issues in all the project they use and bump spring-boot version when new fix is released? Spring团队是否跟踪他们使用的所有项目中的所有安全问题,并在发布新修补程序时使用spring-boot版本? or do i have to track it by myself and control dependencies (like tomcat) manually instead of using 'the spring-boot way'? 或者我必须自己跟踪它并手动控制依赖关系(如tomcat)而不是使用'spring-boot方式'?

Whenever we release a new version of Spring Boot, we update the managed dependency versions to the latest appropriate release of that dependency. 每当我们发布新版本的Spring Boot时,我们都会将托管依赖项版本更新为该依赖项的最新版本。 Appropriate means that we won't, for example, move to a new major or minor version of a dependency in a maintenance release of Spring Boot. 例如,适当意味着我们不会在Spring Boot的维护版本中转移到新的主要版本或次要版本的依赖项。

Generally speaking, a new version of a managed dependency (even if it contains a security fix) won't trigger the release of a new version of Spring Boot. 一般来说,新版本的托管依赖项(即使它包含安全修复程序)也不会触发新版本的Spring Boot的发布。 It's impossible for us to know exactly how a dependency is being used and if the fix is relevant to all, some, or even any of Spring Boot's users. 我们不可能确切地知道如何使用依赖项以及修复是否与Spring Boot的所有用户,某些用户甚至任何用户有关。

This means that you do need to keep track of security vulnerabilities yourself. 这意味着您需要自己跟踪安全漏洞。 If a vulnerability affects you and Spring Boot has not yet updated its managed version then you can easily override that version in your build script. 如果漏洞影响您并且Spring Boot尚未更新其托管版本,那么您可以轻松地在构建脚本中覆盖该版本。 For example, if you are using Gradle: 例如,如果您使用的是Gradle:

ext['tomcat.version']='8.0.36'

Or Maven: 或Maven:

<properties>
    <tomcat.version>8.0.36</tomcat.version>
</properties>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM