Skip to main content

Module signing

Module signing 

Source
Expand description

Detached Ed25519 signing for the user-override registry (#865).

The bundled registry is trusted by construction — it is compiled into the binary. The risk surface is the user override (<data_dir>/addon_registry.json): a local file that can shadow trusted addon names with attacker-controlled wiring.

When addons.require_signature is on, an override is honoured only if a sidecar addon_registry.json.sig carries a valid signature by a trusted org key — the same pinned-key trust anchor as the signed org-policy floor (crate::core::policy::org::trust). This reuses the engine’s Ed25519 primitives (crate::core::agent_identity); the signature covers the exact file bytes, so any tampering invalidates it.

Structs§

RegistrySignature
A detached signature sidecar, written next to the registry file.

Enums§

OverrideVerdict
Outcome of gating an override file against the signature policy.

Functions§

gate_override
Decide whether to honour an override given the file content, its optional sidecar sig, and whether signatures are required. is_trusted resolves a hex public key to trust (inject crate::core::policy::org::trust::is_trusted in production; a closure in tests). Pure.
sidecar_path
Sidecar path for a registry file (<registry>.sig).
sign_detached
Sign content with key, embedding the public key. For maintainers / the addon registry sign path. Pure.
signature_valid
Whether sig is a cryptographically valid signature of content by the embedded key. Says nothing about whether that key is trusted. Pure.