Verifying certificates and binders

How to check the signature on the Evidence Certificate, the TrustCloud custody certificate, and the signature and integrity of a compliance binder.

Each document Codeego issues can be checked by the person who receives it, without logging in to Codeego. There is currently no public verification page on the Codeego website; verification is done with standard tools, as described below.

The Evidence Certificate#

  1. Download the Assessment Certificate on its own from Available Assets. Do not use the combined PDF from Download all, which does not keep the signature.
  2. Open it in a PDF reader that validates signatures, such as Adobe Acrobat Reader, and open the signature panel.
  3. Check that the signature in the field CodeegoSignature is reported as valid and that the document has not been modified since it was signed.
  4. Check the signer's certificate details. Whether the reader marks the signer as trusted depends on the reader's own list of trusted certificates; an untrusted-signer warning is not the same as a modified document.
  5. For repository sources, check that the Artifact identifier (commit / hash) on the certificate is a commit in your repository, for example with git cat-file -t <commit-sha>, which prints commit when it exists.

The TrustCloud custody certificate#

For assessments under qualified custody, the IP Custody Certificate is issued and signed by TrustCloud, not by Codeego.

  1. Download the IP Custody Certificate from Available Assets.
  2. Validate its electronic signature with a validator that checks against the EU Trusted Lists, for example the European Commission's DSS validation service, or a PDF reader configured to trust the EU Trusted Lists.
  3. Keep the Custody Reference shown on the assessment page with the certificate. It identifies the deposit in the TrustCloud vault.
  4. For repository sources, compute the SHA-256 of the downloaded Source Code Snapshot (for example with sha256sum) and compare it with the hash recorded for source_snapshot.tar.gz in the Custody Manifest.

The compliance binder#

A binder is verified in two steps: the Ed25519 signature over manifest.json, and the binder_root_sha256 recomputed from the files. SIGNING.md, at the root of every binder, gives the signing key identifier and the URL of Codeego's public key, with equivalent commands in Python.

  1. Extract the Evidence bundle ZIP into an empty folder.
  2. Obtain the public key from the URL given in SIGNING.md and check that its key identifier (the first 12 hexadecimal characters of the SHA-256 of the key) matches the one in SIGNING.md and in the key_id field of manifest.sig.
  3. Run the commands below from the extracted folder. They require openssl 1.1 or later, jq, sha256sum and base64.
PUBKEY=compliance-signing-key.pem

# 1. Verify the Ed25519 signature over manifest.json
jq -r .signature manifest.sig | base64 -d > /tmp/manifest.sig.bin
openssl pkeyutl -verify -pubin -inkey "$PUBKEY" -rawin \
  -in manifest.json -sigfile /tmp/manifest.sig.bin
# prints: Signature Verified Successfully

# 2. Recompute binder_root_sha256 from the files
EXPECTED=$(jq -r .binder_root_sha256 manifest.json)
ACTUAL=$(find . -type f ! -name manifest.json ! -name manifest.sig -printf '%P\n' \
  | LC_ALL=C sort \
  | while IFS= read -r f; do
      printf '%s\0%s\0' "$f" "$(sha256sum "$f" | cut -d' ' -f1)"
    done | sha256sum | cut -d' ' -f1)
[ "$EXPECTED" = "$ACTUAL" ] && echo "OK: contents match manifest" || echo "FAIL: contents differ"
Run from the root of the extracted binder. PUBKEY is the path to the downloaded public key.

The second step must run on the binder exactly as issued. Files added under auditor-supplied/ change the recomputed value, so verify the binder before adding evidence, or verify a pristine copy. The LC_ALL=C setting matters: other locales sort file names differently and produce a different hash.