Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 92c13b4

Browse files
committedJul 1, 2021
Add implementation details
1 parent b8bf197 commit 92c13b4

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed
 

‎text/0000-sbom.md

+11-12
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ This RFC proposes the following -
1515

1616
- Use of CycloneDX as the SBOM storage format.
1717
- Moving the SBOM from `<layer>.toml`, `launch.toml` and `build.toml` to a separate file.
18-
- Enhancements to the platform spec and pack to allow easy interaction with SBOMs including conversion between major SBOM formats.
1918

2019
# Definitions
2120
[definitions]: #definitions
@@ -54,7 +53,6 @@ Having a structured and consistent SBOM that can be consumed by downstream syste
5453

5554
- Use of CycloneDX as the SBOM storage format and updates the the specification and lifecycle to reflect the same.
5655
- Moving the SBOM from `<layer>.toml`, `launch.toml` and `build.toml` to a separate file.
57-
- Enhancements to the platform spec and `pack` to allow easy interaction with SBOMs including conversion between major SBOM formats.
5856

5957
# What it is
6058
[what-it-is]: #what-it-is
@@ -66,14 +64,16 @@ The above bom documents need to be created in CycloneDX format.
6664

6765
The lifecycle of the respective `bom` files during rebuilds would be exactly the same as the `bom` table currently.
6866

69-
The lifecycle would be responsible for taking all of the above `bom` files, merging it while tagging it with the originating layer or buildpack the `bom` came from and storing it in `/layers/config/sbom.cdx.json`. This file would also be stored in a layer of its own and the lifecycle would be responsible for storing the layer digest in a label `io.buildpacks.bom.digest`.
70-
71-
Platforms like `pack` would be responsible for fetching the `bom` from the above layer and displaying it to the user in a format of their choice via something like `pack inspect-image <image-name> --bom --format=spdx_2_2`.
67+
The lifecycle would be responsible for taking all of the above `bom` files, merging it while tagging it with the originating layer or buildpack the `bom` came from and storing it in `/layers/config/bom.cdx.json`.
7268

7369
# How it Works
7470
[how-it-works]: #how-it-works
7571

76-
TODO
72+
The lifecycle would be responsible for reading, merging and restoring the appropriate `bom` files. The lifecycle of these `bom` files would be tied to their respectice metadata `toml` files. See [RFC 0087](https://github.com/buildpacks/rfcs/blob/main/text/0087-bom-in-layer-metadata.md#how-it-works) for more details. For merging the `bom` files, the lifecycle could replicate or use tooling from [CycloneDX-cli](https://github.com/CycloneDX/cyclonedx-cli) which has a merge operation. The only additional piece of information that the lifecycle would inject are `CycloneDX` [`metadata`](https://cyclonedx.org/use-cases/#properties--name-value-store) the following property keys -
73+
74+
`io.buildpacks.bom.buildpack.id` - Buildpack ID for the buildpack that created the BOM
75+
`io.buildpacks.bom.type` - Set to `build` or `launch` as applicable.
76+
`io.buildpacks.bom.layer.name` (Optional) - Set to the name of the layer if the `bom` was associated with a specific layer.
7777

7878
# Drawbacks
7979
[drawbacks]: #drawbacks
@@ -105,15 +105,14 @@ The main reason that the lifecycle needs to have a hard dependency on CycloneDX
105105
# Unresolved Questions
106106
[unresolved-questions]: #unresolved-questions
107107

108-
- What parts of the design do you expect to be resolved before this gets merged?
109-
- What parts of the design do you expect to be resolved through implementation of the feature?
110-
- What related issues do you consider out of scope for this RFC that could be addressed in the future independently of the solution that comes out of this RFC?
108+
- Implementation details about how the lifecycle should be merging the SBOMs.
109+
- Moving the SBOM from the `io.buildpacks.build.metadata` label to a file in the output image to avoid large labels
110+
- Interactions with the stack SBOM and how to represent that and merge it with the Buildpack SBOM.
111111

112112
# Spec. Changes (OPTIONAL)
113113
[spec-changes]: #spec-changes
114-
Does this RFC entail any proposed changes to the core specifications or extensions? If so, please document changes here.
115-
Examples of a spec. change might be new lifecycle flags, new `buildpack.toml` fields, new fields in the buildpackage label, etc.
116-
This section is not intended to be binding, but as discussion of an RFC unfolds, if spec changes are necessary, they should be documented here.
114+
115+
Yes, see above.
117116

118117
# References
119118

0 commit comments

Comments
 (0)
Please sign in to comment.