Wire R4 (Ed25519 author signatures) into the worker dialect-install path #6
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
cbcl-rs has type-level support for R4 (Ed25519 signatures on dialect bodies) —
Signertrait,verify_r4(d, signer). But hark'sDialectCache::try_installdoes not call it. Today any define that passes R1+R2+R3+R5 lands in the cache regardless of whether the author signed it or whether the worker trusts that author.Under the threat model "honest workflow easy, dishonest no wire harm," dialect-name squatting and forged-author defines are the most acute open vector. R4 enforcement on the worker install side, combined with a worker-side trusted authors policy, collapses squatting to "spoof an Ed25519 key" — the hard cryptographic case, which is exactly where you want the trust horizon.
Mitigation
Two layered changes:
verify_r4into the install path. ExtendDialectCache::try_installto accept a&dyn Signer(or aVec<TrustedAuthor>) and reject defines whose:signatureclause doesn't verify against any trusted author. Honest-actor install path passes a real signer; today's tests pass a permissive stub.config.toml(e.g.[trusted_authors] anuna = "ed25519:abc…"). Pushed defines from unknown authors are logged and dropped, not installed.Acceptance
DialectCache::try_installtakes an&impl Signer(or trusted-author registry) and runs R4 in addition to R1-R5.[trusted_authors]section: name → hex-encoded Ed25519 pubkey.Signerfrom config at startup; passes to every cache instance.:signatureare rejected when any trusted_authors are configured (open mode when none configured — backwards-compatible for current dev flows).hark dialect query <name>shows the author + signature status alongside<digest> <name>.r4_signature_unverifiedmapped to exit 8.Out of scope
See discussion in hark conversation on the dialect-distribution threat model.