Skip to content

Commit f9dc7af

Browse files
committed
Add provenance to Docker image
1 parent 43e920b commit f9dc7af

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ jobs:
190190
push: ${{ github.event_name != 'pull_request' }}
191191
cache-from: type=gha
192192
cache-to: type=gha,mode=max
193-
provenance: false
193+
provenance: ${{ github.event_name != 'pull_request' && 'mode=max' || 'false' }}
194194
sbom: ${{ github.event_name != 'pull_request' }}
195195

196196
- name: Scan image

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,22 @@ For example to retrieve the SBOM for `linux/amd64` from Docker Hub and analyze i
478478
docker buildx imagetools inspect nginx/nginx-prometheus-exporter:edge --format '{{ json (index .SBOM "linux/amd64").SPDX }}' | grype
479479
```
480480

481+
## Provenance
482+
483+
We generate provenance for the Docker image and it's available in the
484+
[DockerHub](https://hub.docker.com/r/nginx/nginx-prometheus-exporter),
485+
[GitHub Container registry](https://github.com/nginxinc/nginx-prometheus-exporter/pkgs/container/nginx-prometheus-exporter),
486+
[Amazon ECR Public Gallery](https://gallery.ecr.aws/nginx/nginx-prometheus-exporter) and
487+
[Quay.io](https://quay.io/repository/nginx/nginx-prometheus-exporter) repositories, stored as an attestation in the
488+
image manifest.
489+
490+
For example to retrieve the provenance for `linux/amd64` from Docker Hub
491+
you can run the following command:
492+
493+
```console
494+
docker buildx imagetools inspect nginx/nginx-prometheus-exporter:edge --format '{{ json (index .Provenance "linux/amd64").SLSA }}'
495+
```
496+
481497
## Contacts
482498

483499
We’d like to hear your feedback! If you have any suggestions or experience issues with the NGINX Prometheus Exporter,

0 commit comments

Comments
 (0)