Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC #0095] Restorer should restore bom files from app and cache #733

Closed
buildpack-bot opened this issue Oct 4, 2021 · 1 comment
Closed

Comments

@buildpack-bot
Copy link
Member

buildpack-bot commented Oct 4, 2021

This issue have been automatically created from pull request buildpacks/rfcs#166.

The lifecycle should restore bom layers for detected buildpacks.

For launch=true,cache=true layers, the bom layer can come from the cache. The SHA for the bom layer for each buildpack should be available in the restored layer metadata (e.g., /layers/buildpack.id/some-layer.toml).

For launch=true,cache=false layers, the bom layer must come from the previous image. The SHA for the bom layer for each buildpack should be available in the restored layer metadata (e.g., /layers/buildpack.id/some-layer.toml).

After the layers are restored, the build container would have the following file tree for example:

/layers
  /config
    /sbom
      /launch
        /buildpack.id
          bom.cdx.json
          /cache-true-launch-true
            bom.cdx.json
      /cache
        /buildpack.id
          /cache-true-launch-true
            bom.cdx.json
          /cache-true-launch-false
            bom.cdx.json

Note that the buildpack-level /layers/config/sbom/launch/buildpack.id/bom.cdx.json should be deleted after the layer is unpacked since it is not tied to a layer and should be re-created by the buildpack.

The other bom.cdx.json files should be copied such that the following file tree is created:

/layers
  /buildpack.id
    cache-true-launch-false.bom.cdx.json
    cache-true-launch-true.bom.cdx.json

This is essentially the reverse of #738.

Note that cdx could be replaced with spdx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants