Skip to content

Commit 4fa3aa5

Browse files
committed
Add sigstore
1 parent 6ccb80f commit 4fa3aa5

File tree

3 files changed

+41
-0
lines changed

3 files changed

+41
-0
lines changed

.github/workflows/docker-release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ jobs:
3737
username: ${{ secrets.DOCKERHUB_USERNAME }}
3838
password: ${{ secrets.DOCKERHUB_TOKEN }}
3939
- uses: docker/build-push-action@0adf9959216b96bec444f325f1e493d4aa344497 # v6.14.0
40+
id: build
4041
with:
4142
context: ${{ env.IMAGE }}
4243
platforms: linux/amd64,linux/arm64

.github/workflows/dockerhub.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,12 @@ jobs:
2424
- name: Pull the latest ${{ matrix.platform }} image
2525
shell: bash
2626
run: docker pull --platform "${{ matrix.platform }}" "${GITHUB_REPOSITORY_OWNER}/${IMAGE}"
27+
- name: Pull the latest ${{ matrix.platform }} image SBOM
28+
shell: bash
29+
run: docker buildx imagetools inspect "${GITHUB_REPOSITORY_OWNER}/${IMAGE}" --format "{{ json (index .SBOM \"${{ matrix.platform }}\").SPDX }}"
30+
- name: Install cosign
31+
uses: sigstore/cosign-installer@d7d6bc7722e3daa8354c50bcb52f4837da5e9b6a # v3.8.1
32+
- name: Verify the Docker image signature
33+
shell: bash
34+
run: |
35+
cosign verify "${GITHUB_REPOSITORY_OWNER}/${IMAGE}" --certificate-identity-regexp "https://github\.com/${GITHUB_REPOSITORY}/\.github/workflows/.+" --certificate-oidc-issuer 'https://token.actions.githubusercontent.com'

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,37 @@ docker buildx imagetools inspect leplusorg/json --format '{{ json (index .SBOM "
6767

6868
Replace `linux/amd64` by the desired platform (`linux/amd64`, `linux/arm64` etc.).
6969

70+
### Sigstore
71+
72+
[Sigstore](https://docs.sigstore.dev) is trying to improve supply
73+
chain security by allowing you to verify the origin of an
74+
artifcat. You can verify that the jar that you use was actually
75+
produced by this repository. This means that if you verify the
76+
signature of the ristretto jar, you can trust the integrity of the
77+
whole supply chain from code source, to CI/CD build, to distribution
78+
on Maven Central or whever you got the jar from.
79+
80+
You can use the following command to verify the latest image using its
81+
sigstore signature attestation:
82+
83+
```bash
84+
cosign verify leplusorg/json --certificate-identity-regexp 'https://github\.com/leplusorg/docker-av/\.github/workflows/.+' --certificate-oidc-issuer 'https://token.actions.githubusercontent.com'
85+
```
86+
87+
The output should look something like this:
88+
89+
```text
90+
Verification for index.docker.io/leplusorg/xml:main --
91+
The following checks were performed on each of these signatures:
92+
- The cosign claims were validated
93+
- Existence of the claims in the transparency log was verified offline
94+
- The code-signing certificate was verified using trusted certificate authority certificates
95+
96+
[{"critical":...
97+
```
98+
99+
For instructions on how to install `cosign`, please read this [documentation](https://docs.sigstore.dev/cosign/system_config/installation/).
100+
70101
## Request new tool
71102

72103
Please use [this link](https://github.com/leplusorg/docker-json/issues/new?assignees=thomasleplus&labels=enhancement&template=feature_request.md&title=%5BFEAT%5D) (GitHub account required) to request that a new tool be added to the image. I am always interested in adding new capabilities to these images.

0 commit comments

Comments
 (0)