我使用spring maven-plugin来生成buildpack (在内部使用Paketo buildpack)。
在构建阶段,此跟踪多次显示:
[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选项检查时,我会收到以下警告:
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”时:
ERROR: could not find SBoM information on 'docker.io/library/my-springboot-test:1.0.0.Final'有人知道如何将sbom信息包含到构建包中吗?
我也尝试在相同的pom中使用CycloneDX插件,这个插件生成sbom,但我不知道如何将它放在Paketo的图像构建中。
<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>有可能做到吗?什么失败了?
发布于 2022-08-01 12:06:03
这是Spring & Gradle插件在Spring 2.6中的一个限制。
这个版本的Spring实现了一个早于新的SBOM规范的buildpacks平台规范的旧版本。不过,buildpack和buildpack工具已经转向使用这个新的SBOM规范。
有两种可能的解决办法:
。
。
https://stackoverflow.com/questions/73157498
复制相似问题