Files
codex/codex-rs/plugin-archive-verification
Alex Ionescu 05d375287d Add signature verification for Plugin Service archives (#63487)
## Why

A SHA-256 digest can detect changed archive bytes, but someone who replaces
both the archive and its digest can still pass that check. A signature
verified with a Plugin Service release signing key lets callers detect
that replacement before extraction.

## What changed

Add `RemotePluginArchiveDownload::verify` to check the archive's SHA-256
digest and verify its detached RSA signature with the matching
release key from the authenticated `/ps/plugins/signing-keys` endpoint.

Allow downloads with missing or null signing metadata to proceed without
verification. Report malformed metadata when verification is called so
catalog responses can still be parsed, and omit signing metadata when
serializing download records.

## Testing

Add a signed archive fixture and tests for successful verification,
tampering with both archive bytes and the reported digest, redirected key
responses, invalid signing metadata and keys, and unsigned downloads.

GitOrigin-RevId: 8dd1575cb24ca3e531223faf57d23c12445651bf
2026-11-24 01:09:47 +00:00
..