Sign and verify¶
Sign reports with an Ed25519 key or Sigstore, and check signatures on reports and model repositories.
With a key¶
Good for offline machines, air gapped clusters and organisations that already manage keys.
private key keys/acme.key (keep it secret)
public key keys/acme.pub (publish it so others can verify)
The private key is written with mode 0600. Sign an existing report:
Or sign as part of the audit:
Anyone with the public key checks it:
With Sigstore¶
No keys to manage. The signature is tied to an identity such as a GitHub Actions workflow or an email address, and recorded in the public Rekor log.
Verify with the identity you expect:
modeldiffr verify audit/report.json \
--identity https://github.com/acme/models/.github/workflows/audit.yml@refs/heads/main \
--issuer https://token.actions.githubusercontent.com
Use --staging on both commands to try the Sigstore staging instance.
Signatures on model repositories¶
Model publishers can sign their files with OpenSSF model signing, which writes model.sig next to the weights. verify --models downloads it with the weights and checks it when the model-signing package is installed:
pip install model-signing
modeldiffr verify audit/report.json --models \
--identity publisher@example.org --issuer https://github.com/login/oauth
PASS base_model_files weights match the report
PASS base_model_signature OpenSSF model signature verified
What verify reports¶
Every attestation found next to report.json adds a check. Missing inputs skip a check rather than fail it, so unsigned reports still verify.
| Check | Reads | Needs |
|---|---|---|
signature |
report.dsse.json |
--key |
sigstore |
report.sigstore.json |
--identity and --issuer |
opentimestamps |
statement.sha256.ots |
the ots client |
eas |
anchors.json |
--rpc |
*_model_signature |
model.sig in the model |
--models, model-signing |
Next: Timestamp and anchor.