ZTGIT

How to verify a ZTGIT image: signature, SBOM and scan

ZTGIT team

What you need

  • cosign installed (Sigstore project);
  • Trivy or Grype, to rerun the scan;
  • a registry access key, obtained at acesso.ztgit.com, because the images are kept in a registry with identified access.

The examples use ZTGIT-AccessControl. For any other component, replace the name and the digest with the ones shown on its page, in the evidence section.

Step 1: download the public key

curl -fsSLO https://ztgit.org/cosign.pub

Step 2: log in to the registry

docker login registry.ztgit.com

Use the key and the secret you received from the access portal.

Step 3: verify the signature by digest

cosign verify --key cosign.pub --insecure-ignore-tlog=true \
  registry.ztgit.com/ztgit/accesscontrol@sha256:be9be1b224fd3478c23a6d8745890dcdf333551048b15b8d43088330554c0e76

Always use the digest (sha256), not the tag: the digest uniquely identifies the content and cannot be swapped. The --insecure-ignore-tlog=true option is there because ZTGIT signatures are made with ZTGIT’s own key and are not sent to the Sigstore public transparency log; verification is still done against the public key.

The expected result is a confirmation that the signature was validated against the key. Any other output means the image is not the one published by ZTGIT.

Step 4: download the SBOM

curl -fsSLO https://ztgit.org/sbom/accesscontrol.cdx.json

The file follows the CycloneDX format and lists every package in the image.

Step 5: rerun the scan

With either tool:

trivy sbom accesscontrol.cdx.json
grype sbom:accesscontrol.cdx.json

Compare the results with the table on the component page. Small differences are normal: vulnerability databases change every day, and each engine has its own rules. The date of the database used by ZTGIT appears below the table.

Automating it

The evidencias.json file lists, for each image, the signed digest, the SBOM name and the scan results. A pipeline can download this file, verify each digest with cosign and reject any image that does not match.

See also: From source code to signed image and the transparency page.

From the blog