# Signing themes and plugins: supply-chain safety for a CMS

> How Vyasa decides whether a plugin or theme may run: a mandatory checksum, ed25519 signatures, and a rule that silence is never trust, so omitting a field cannot downgrade security.

Published 2026-11-25 · Canonical: https://techgopal.com/post/signing-themes-and-plugins-cms

---

> **Summary.** A CMS that installs other people's code has a supply-chain problem, whatever it calls it. In Vyasa every download is checked against a SHA-256 digest, and anything that can run code must also carry an ed25519 signature from a key the install trusts. The rule I care about most is small: silence is never trust. A missing signature is a refusal, not a pass, so an attacker cannot downgrade security by leaving a field out. This post covers that rule and what it costs. It is about Vyasa 0.4.1.

## Key facts

## The problem

A plugin runs on your server. A theme with a script runs in every visitor's browser. Both arrive as a file from somewhere else. If the install trusts whatever it was handed, the person who controls the host, the mirror or the network path between you and it controls your site.

A checksum alone does not solve that. If the checksum travels with the file, whoever can swap the file can swap the checksum. So the checksum has to come from a signed index, and the code itself has to be signed by a key that the install already knows about.

## One function decides

All downloads go through one module. Core releases, marketplace plugins and marketplace themes arrive the same way, over https from a host that is not the authority, so they are checked the same way. The module comment says so, and so does the shape of the code: a mandatory SHA-256 first, then the signature rules.

The part that matters is the match on the signature. Reduced to its cases:

```rust
match signature_hex {
    None if trusted_keys.is_empty() => Ok(()),
    None => Err("this download is unsigned but the install trusts only signed artifacts"),
    Some(_) if trusted_keys.is_empty() => Err("this download is signed but no trusted key is configured to check it"),
    Some(signature) => verify_signature(bytes, signature, trusted_keys),
}
```

Read the second and third arms again. An install that lists trusted keys refuses an unsigned artifact. An install that lists none refuses a signed one, because it has nothing to check the signature against. The only path to success with a signature is a signature that matches a key.

The reason for the second arm is downgrade. If "no signature" meant "nothing to check", an attacker would not need to forge anything. They would delete the `signature` field and the install would wave the file through. Treating silence as a failure removes that whole class of attack.

## Code is never installed unsigned

The marketplace has a stricter rule on top, for packages that carry code. Every plugin, and any theme with `assets/theme.js` or a template that writes script, needs a signature from a trusted key. On an install with no keys it is refused, not allowed, and a released binary always carries the marketplace keys. From the marketplace nothing installs unsigned: an unsigned download is refused. The only unsigned package a site takes is a theme that is pure data, uploaded by hand by an administrator.

How does Vyasa know a theme is pure data? It looks. A theme counts as code-free when it parses as a theme package, has no script asset, and none of its templates contain a `<script` tag, a URL with the `javascript` scheme or an inline event handler such as `onclick=`. Anything that does not parse as a theme, a plugin included, is not code-free.

The scan is deliberately conservative. The comment on it says the trade: a false positive costs an unsigned theme its install, a false negative would cost a visitor. I would rather turn away a harmless theme and ask its author to sign it than ship a scanner that is clever and wrong.

The same rule applies when an administrator uploads a theme by hand: data needs nothing, a scripted theme needs a signature over the exact package bytes from a trusted key.

## Two signatures on a plugin

A marketplace plugin carries two independent signatures. The marketplace signature covers the bytes you download and is checked against keys compiled into the binary, which is the trust anchor. The author signature sits inside the `.vyplugin` and is checked against the `author_key` in the listing, so a listing cannot be re-pointed at someone else's package. How the marketplace is built is the subject of a later post; here the point is only that either signature failing stops the install.

## What it costs

Signing is friction, and I do not want to pretend otherwise.

- **Authors need a key.** `vyasa plugin keygen` prints a secret and a public key. The secret goes in a password manager, never a repository, because a leaked secret lets someone publish under your name.
- **Scripted themes need a signature too,** so the theme author who wants one line of JavaScript takes on the same duty as a plugin author.
- **Unsigned code has no way in.** An unsigned plugin is refused even if the index lists it, and so is a scripted theme. That is the point, but it is a real limit for anyone who wants to try a quick unsigned plugin.
- **Signatures prove who, not whether it is good.** A signed plugin can still have a bug. The sandbox and the capability list, which I covered in the post on why I built the CMS, are the second layer for that.

## What I would check on any CMS

If you are choosing a CMS, or a plugin system of any kind, these questions are quicker than reading a security page:

1. What happens when the signature field is missing?
2. Where does the digest come from, and can the person who can swap the file also swap the digest?
3. Can a theme run script, and if so, who vouches for it?
4. Who can change where updates come from? In Vyasa that is server configuration only, not an administrator setting, because whoever could change it could hand the site any binary they signed.

The first question is the one most systems fail quietly. A match arm costs nothing to write, and it closes the cheapest attack there is.

If you find a hole in this logic, please open an issue on the Vyasa repository.


---

**Feature number:** 006

**Main search phrase:** CMS supply chain security

**Secondary search phrases:** signed plugins CMS, ed25519 package signing

**Summary (answer first):** How Vyasa decides whether a plugin or theme may run: a mandatory checksum, ed25519 signatures, and a rule that silence is never trust, so omitting a field cannot downgrade security.

**Chips:** Vyasa 0.4.1 | Signed plugins | ed25519

