Skip to content

Commit 6dd2f26

Browse files
committed
Restruture features/bill-of-materials overview
First present the end-user focused `pack sbom download` command and then present developer information on how to add an SBoM to an image. Signed-off-by: Aidan Delaney <[email protected]>
1 parent a6e288e commit 6dd2f26

File tree

1 file changed

+19
-29
lines changed

1 file changed

+19
-29
lines changed
Lines changed: 19 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,44 @@
11
+++
2-
title="Structured Bill of Materials"
3-
summary="A Software `Structured Bill-of-Materials` (`SBoM`) gives you a layer-by-layer view of what's inside your container in a variety of formats."
2+
title="Software Bill of Materials"
3+
summary="A Software `Software Bill-of-Materials` (`SBoM`) gives you a layer-by-layer view of what's inside your container in a variety of formats."
44
+++
55

66
## Summary
77

8-
A **Structured-Bill-of-Materials** (`SBoM`) provides information necessary to know what's inside your container and how it was constructed.
9-
Cloud Native Buildpacks provides Structured-Bill-of-Materials in either CycloneDX, SPDX, or Syft format.
8+
A **Software-Bill-of-Materials** (`SBoM`) lists all the software components included in an image. Cloud Native Buildpacks provides all the transparency you need to have confidence in your image supply chain. Software-Bill-of-Materials in [CycloneDX](https://cyclonedx.org/), [Syft](https://github.com/anchore/syft) and [Spdx](https://spdx.dev/) formats are supported.
109

1110
1. Buildpacks can populate `SBoM` information about the dependencies they have provided.
12-
2. A list of what buildpacks were used to build the application.
13-
14-
## Adding Bill of Materials
15-
16-
Use the following tutorial to add a `Bill-of-Materials` using buildpacks. <br/>
17-
[Adding bill of materials][adding-bill-of-materials]
1811

1912
## Viewing Bill of Materials
2013

21-
You can use the `download-sbom` command to inspect your app for its `Structured-Bill-of-Materials`. The following command will download the application layer containing the `SBoM` files to `./layers/sbom/...` on your local filesystem.
14+
You can use the `sbom download` command to inspect your app for its Software-Bill-of-Materials. The following command will download the application layer containing the `SBoM` files to `./layers/sbom/...` on your local filesystem.
2215

2316
```bash
24-
pack download-sbom your-image-name
17+
pack sbom download your-image-name
2518
```
2619

2720
You can also choose to download the `SBoM` from an image hosted in a remote registry, as opposed to an image hosted in a Docker daemon. You use the `--remote` flag to do so.
2821

2922
```bash
30-
pack download-sbom your-image-name --remote
23+
pack sbom download your-image-name --remote
3124
```
3225

33-
Cloud Native Buildpacks support `SBoM` metadata in [CycloneDX](https://cyclonedx.org/), [Syft](https://github.com/anchore/syft) or [Spdx](https://spdx.dev/) formats. The following example demonstrates `syft` format `SBoM` metadata to the local filesystem. The combined metadata from all of the `sbom.syft.json` files is the image `SBoM`. Where CycloneDX `SBoM` metadata is generated, the files are named `sbom.cdx.json`. Similarly, Spdx files are named `sbom.cdx.json`.
26+
The following example demonstrates running `pack sbom download ...` on an image containing an `SBoM` in `syft` format. Running `pack sbom download ...` creates a `layers/sbom` directory and populates that directory with `sbom.syft.json` files. The combined metadata from all of the `sbom.syft.json` files is the image `SBoM`. Where an image generates CycloneDX `SBoM` metadata, the files a named `sbom.cdx.json`. Similarly, Spdx files are named `sbom.cdx.json`.
3427

3528
```bash
36-
.
37-
└── layers
38-
└── sbom
39-
└── launch
40-
└── paketo-buildpacks_ca-certificates
41-
├── helper
42-
│ └── sbom.syft.json
43-
└── sbom.syft.json
29+
layers
30+
└── sbom
31+
└── launch
32+
└── paketo-buildpacks_ca-certificates
33+
├── helper
34+
│ └── sbom.syft.json
35+
└── sbom.syft.json
4436
```
4537

46-
The layer information is stored under the `io.buildpacks.lifecycle.metadata` label of the application image.
47-
```bash
48-
docker inspect your-image-name | jq -r '.[0].Config.Labels["io.buildpacks.lifecycle.metadata"]' | jq -r .sbom
49-
{
50-
"sha": "sha256:abcd1234defg5678"
51-
}
52-
```
38+
## Adding Bill of Materials
39+
40+
[`pack`](https://github.com/buildpacks/pack), [`kpack`](https://github.com/pivotal/kpack) and [tekton](https://tekton.dev/) users will find that images created using these tools contain an SBoM.
41+
42+
Developers writing a new buildpack or updating an existing buildpack should use the [Adding bill of materials][adding-bill-of-materials] tutorial to incorporate a `Bill-of-Materials` in their buildpack.
5343

5444
[adding-bill-of-materials]: /docs/buildpack-author-guide/create-buildpack/adding-bill-of-materials/

0 commit comments

Comments
 (0)