Skip to content

Commit 609beef

Browse files
authored
Add SBOM for Docker image (#731)
Adds SBOM generation for the Docker image. This will also attach the SBOM to the manifest for the image.
1 parent ae00fa8 commit 609beef

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

.github/workflows/ci.yml

+2
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,8 @@ jobs:
201201
cache-to: type=gha,mode=max
202202
pull: true
203203
no-cache: ${{ github.event_name != 'pull_request' }}
204+
sbom: ${{ github.event_name != 'pull_request' }}
205+
provenance: false
204206

205207
- name: Run Trivy vulnerability scanner
206208
uses: aquasecurity/trivy-action@b43daad0c3c96202fc5800b511dfae8e6ecce864 # 0.11.0

README.md

+17
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,23 @@ The following table lists the software versions NGINX Kubernetes Gateway support
5151

5252
\*the installation manifests use the minor version of NGINX container image (e.g. 1.25) and the patch version is not specified. This means that the latest available patch version is used.
5353

54+
## SBOM (Software Bill of Materials)
55+
56+
We generate SBOMs for the binaries and the Docker image.
57+
58+
### Binaries
59+
60+
The SBOMs for the binaries are available in the releases page. The SBOMs are generated using [syft](https://github.com/anchore/syft) and are available in SPDX format.
61+
62+
### Docker Images
63+
64+
The SBOM for the Docker image is available in the [GitHub Container](https://github.com/nginxinc/nginx-kubernetes-gateway/pkgs/container/nginx-kubernetes-gateway) repository. The SBOM is generated using [syft](https://github.com/anchore/syft) and stored as an attestation in the image manifest.
65+
66+
For example to retrieve the SBOM for `linux/amd64` and analyze it using [grype](https://github.com/anchore/grype) you can run the following command:
67+
```
68+
$ docker buildx imagetools inspect ghcr.io/nginxinc/nginx-kubernetes-gateway:edge --format '{{ json (index .SBOM "linux/amd64").SPDX }}' | grype
69+
```
70+
5471
## Contacts
5572

5673
We’d like to hear your feedback! If you experience issues with our Gateway Controller, please [open a bug][bug] in

0 commit comments

Comments
 (0)