[英]How to configure buildpack bindings with the spring-boot-maven-plugin?
[英]Paketo buildpack spring-boot-maven-plugin doesn't find sbom
我正在使用spring-boot-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 信息包含到 buildpack 中嗎?
我也嘗試在同一個 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>
有可能做到嗎? 什么失敗了?
這是 Spring 引導 Maven 和 Gradle 插件在 Z38008DD81C2F4D7985ECF26618 引導中的限制。
此版本的 Spring Boot 實現了舊版本的 buildpacks 平台規范,該規范早於新的 SBOM 規范。 不過,buildpacks 和 buildpacks 工具已經開始使用這個新的 SBOM 規范。
有兩種可能的解決方案:
升級到 Spring 2.7。 這實現了最新的平台規范,並將支持新的 SBOM 格式。
如果你還不能升級到 2.7,你可以使用 pack cli 或 kpack 來運行你的構建,直到你可以升級。 它們還支持使用新 SBOM 格式所需的更新平台 API。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.