首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Paketo buildpack spring-boot-maven-plugin找不到sbom

Paketo buildpack spring-boot-maven-plugin找不到sbom
EN

Stack Overflow用户
提问于 2022-07-28 18:21:06
回答 1查看 128关注 0票数 0

我使用spring maven-plugin来生成buildpack (在内部使用Paketo buildpack)。

在构建阶段,此跟踪多次显示:

代码语言:javascript
复制
 [creator]     Warning: BOM table is deprecated in this buildpack api version, though it remains supported for backwards compatibility. Buildpack authors should write BOM information to <layer>.sbom.<ext>, launch.sbom.<ext>, or build.sbom.<ext>.

当我用--bom选项检查时,我会收到以下警告:

代码语言:javascript
复制
pack inspect-image docker.io/library/my-springboot-test:1.0.0.Final --bom

Warning: Using the '--bom' flag with 'pack inspect-image <image-name>' is deprecated. Users are encouraged to use 'pack sbom download <image-name>'.
{
  "remote": null,
  "local": [
    {...

当我尝试“按建议打包sbom下载docker.io/library/my-springboot-test:1.0.0.Final”时:

代码语言:javascript
复制
ERROR: could not find SBoM information on 'docker.io/library/my-springboot-test:1.0.0.Final'

有人知道如何将sbom信息包含到构建包中吗?

我也尝试在相同的pom中使用CycloneDX插件,这个插件生成sbom,但我不知道如何将它放在Paketo的图像构建中。

代码语言:javascript
复制
<plugin>
    <groupId>org.cyclonedx</groupId>
    <artifactId>cyclonedx-maven-plugin</artifactId>
    <version>2.7.1</version>
    <executions>
        <execution>
            <phase>package</phase>
            <goals>
                <goal>makeAggregateBom</goal>
            </goals>
        </execution>
    </executions>
    <configuration>
        <projectType>library</projectType>
        <schemaVersion>1.4</schemaVersion>
        <includeBomSerialNumber>true</includeBomSerialNumber>
        <includeCompileScope>true</includeCompileScope>
        <includeProvidedScope>true</includeProvidedScope>
        <includeRuntimeScope>true</includeRuntimeScope>
        <includeSystemScope>true</includeSystemScope>
        <includeTestScope>false</includeTestScope>
        <includeLicenseText>false</includeLicenseText>
        <outputReactorProjects>true</outputReactorProjects>
        <outputFormat>json</outputFormat>
        <outputName>../layers/build.sbom.cdx</outputName>
    </configuration>
</plugin>

有可能做到吗?什么失败了?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-08-01 12:06:03

这是Spring & Gradle插件在Spring 2.6中的一个限制。

这个版本的Spring实现了一个早于新的SBOM规范的buildpacks平台规范的旧版本。不过,buildpack和buildpack工具已经转向使用这个新的SBOM规范。

有两种可能的解决办法:

  1. 升级到Spring2.7。这实现了最新的平台规范,并将支持新的SBOM格式.

  1. 如果您还不能升级到2.7,可以使用pack或kpack运行您的构建,直到您可以升级为止。它们都支持使用新的SBOM格式所需的较新的平台API .

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73157498

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档