Sign the plugin registry and pin plugin files

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
3 changed files with 44 additions and 4 deletions

View File

@ -1,6 +1,6 @@
{ {
"schema": "exbyte-depot-plugin-registry/1", "schema": "exbyte-depot-plugin-registry/1",
"updated": "2026-07-18T00:00:00Z", "updated": "2026-11-01T21:46:59Z",
"plugins": [ "plugins": [
{ {
"id": "unreal", "id": "unreal",
@ -18,7 +18,11 @@
"plugin.json", "plugin.json",
"index.js" "index.js"
], ],
"baseUrl": "https://gitea.exbytestudios.com/ExbytePublicServices/exbyte-depot-plugins/raw/branch/main/plugins/unreal/" "baseUrl": "https://gitea.exbytestudios.com/ExbytePublicServices/exbyte-depot-plugins/raw/branch/main/plugins/unreal/",
"sha256": {
"plugin.json": "638cf0f5bd3cd56a395b1d8644ccc4ac428922fd64ab13b06c491cf10764527f",
"index.js": "f3f13ca2c55a455509e20e15c97d7d8a78ddb58cf0c1701a19c39bd37dd1380e"
}
}, },
{ {
"id": "team-relay", "id": "team-relay",
@ -37,7 +41,11 @@
"plugin.json", "plugin.json",
"index.js" "index.js"
], ],
"baseUrl": "https://gitea.exbytestudios.com/ExbytePublicServices/exbyte-depot-plugins/raw/branch/main/plugins/team-relay/" "baseUrl": "https://gitea.exbytestudios.com/ExbytePublicServices/exbyte-depot-plugins/raw/branch/main/plugins/team-relay/",
"sha256": {
"plugin.json": "f6042d9f059b17b29213485c6129b22aeb533c038afb2f17392c1f7ca63e1fce",
"index.js": "c5b589f9b59fbfe0749ec1751e5c8606ec208b018d3ce2d3405a2d1f450282fe"
}
}, },
{ {
"id": "hello-exbyte", "id": "hello-exbyte",
@ -56,7 +64,11 @@
"plugin.json", "plugin.json",
"index.js" "index.js"
], ],
"baseUrl": "https://gitea.exbytestudios.com/ExbytePublicServices/exbyte-depot-plugins/raw/branch/main/plugins/hello-exbyte/" "baseUrl": "https://gitea.exbytestudios.com/ExbytePublicServices/exbyte-depot-plugins/raw/branch/main/plugins/hello-exbyte/",
"sha256": {
"plugin.json": "55e9121550c7a577731f0fa40283176250acfd18df43b9ec72d0745e5a5716a1",
"index.js": "37668fc9d2c3c907da0efc3383d7024aa674b2fd97ca82acbe7bc2b5032d6308"
}
} }
] ]
} }

1
registry.json.sig Normal file
View File

@ -0,0 +1 @@
kqTnV7Giye/ba255APsc3A7to8IxYN1V5gf8B/9V48mr2bs0IfAdJ9qKISpanii9J5IoaxWRFexUwczTehetBg==

27
tools/sign-registry.mjs Normal file
View File

@ -0,0 +1,27 @@
// Run after changing any plugin: pins each file's SHA-256 in registry.json and
// writes registry.json.sig. Exbyte Depot refuses a catalog with a bad signature.
// Usage: node tools/sign-registry.mjs <ed25519-private-key.pem>
import { createHash, createPrivateKey, sign } from "node:crypto";
import { readFileSync, writeFileSync } from "node:fs";
const root = new URL("../", import.meta.url);
const keyPath = process.argv[2];
if (!keyPath) {
console.error("Usage: node tools/sign-registry.mjs <ed25519-private-key.pem>");
process.exit(1);
}
const reg = JSON.parse(readFileSync(new URL("registry.json", root), "utf8"));
for (const p of reg.plugins) {
p.sha256 = {};
for (const f of p.files) {
p.sha256[f] = createHash("sha256").update(readFileSync(new URL(`plugins/${p.id}/${f}`, root))).digest("hex");
}
}
reg.updated = new Date().toISOString().replace(/\.\d+Z$/, "Z");
const text = JSON.stringify(reg, null, 2) + "\n";
writeFileSync(new URL("registry.json", root), text);
const signature = sign(null, Buffer.from(text, "utf8"), createPrivateKey(readFileSync(keyPath)));
writeFileSync(new URL("registry.json.sig", root), signature.toString("base64") + "\n");
console.log(`Signed ${reg.plugins.length} plugin(s).`);