fix(verifier): require signature verification, reject timestamp-only bundles#3217
Conversation
…bundles VerifyBundle only verified the DSSE signature when the bundle carried an X.509 certificate. A cert-less bundle with a valid RFC3161 timestamp fell through to the timestamp path and was reported as verified, even though the signature was never checked against any key. Because the timestamp signs only the signature bytes and not the payload, a forged statement with arbitrary signature bytes plus a trusted-TSA timestamp passed verification. Make signature verification mandatory: a certificate-backed signature must verify before the timestamp is considered, and the timestamp now only validates the signing window. Public-key bundles are rejected as unsupported rather than falling through to the timestamp-only path. Cert-less bundles with no verifiable key are reported as missing material instead of verified. Assisted-by: Claude Code Signed-off-by: Jose I. Paris <jiparis@chainloop.dev> Chainloop-Trace-Sessions: 18d8fc72-9d5f-4bb9-9268-b0eee03058db
AI Session Analysis
|
| Status | Attribution | File | Lines |
|---|---|---|---|
| modified | ai | pkg/attestation/verifier/verifier.go |
+43 / -31 |
| modified | ai | pkg/attestation/verifier/verifier_test.go |
+43 / -5 |
| created | ai | pkg/attestation/verifier/testdata/bundle_with_publickey.json |
+17 / -0 |
Policies (4)
| Status | Policy | Material | Messages |
|---|---|---|---|
| ✅ Passed | ai-config-ai-agents-allowed |
ai-coding-session-18d8fc |
- |
| ✅ Passed | ai-config-no-dangerous-commands |
ai-coding-session-18d8fc |
- |
| ✅ Passed | ai-config-no-secrets |
ai-coding-session-18d8fc |
- |
| ✅ Passed | ai-config-mcp-servers-allowed |
ai-coding-session-18d8fc |
- |
Powered by Chainloop and Chainloop Trace
migmartri
left a comment
There was a problem hiding this comment.
Let's make sure this doesn't cause any issue with old CLIs that were not bundling the same format
Summary
VerifyBundleonly verified the DSSE signature when a bundle carried an X.509 certificate. A bundle with no certificate but a valid RFC3161 timestamp skipped signature verification and was reported as verified, even though the signature was never checked against any key. Since the timestamp signs only the DSSE signature bytes and not the payload, a forged in-toto statement with arbitrary signature bytes plus a timestamp from a trusted TSA could pass verification.This change makes signature verification mandatory:
AI assistance disclosure
This change was produced with the assistance of Claude Code, as disclosed via the
Assisted-by:commit trailer.