From 308ee0edffeba5f9a497a4f32492a50614529b59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=92=D0=B5=D1=80=D0=B5=D1=89=D0=B0=D0=B3=D0=B8=D0=BD=20?= =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=A1=D0=B5=D1=80=D0=B3?= =?UTF-8?q?=D0=B5=D0=B5=D0=B2=D0=B8=D1=87?= Date: Mon, 2 Nov 2026 00:46:59 +0300 Subject: [PATCH] Sign the plugin registry and pin plugin files Co-Authored-By: Claude Opus 5.5 --- registry.json | 20 ++++++++++++++++---- registry.json.sig | 1 + tools/sign-registry.mjs | 27 +++++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 4 deletions(-) create mode 100644 registry.json.sig create mode 100644 tools/sign-registry.mjs diff --git a/registry.json b/registry.json index 8bff30c..1c7309d 100644 --- a/registry.json +++ b/registry.json @@ -1,6 +1,6 @@ { "schema": "exbyte-depot-plugin-registry/1", - "updated": "2026-07-18T00:00:00Z", + "updated": "2026-11-01T21:46:59Z", "plugins": [ { "id": "unreal", @@ -18,7 +18,11 @@ "plugin.json", "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", @@ -37,7 +41,11 @@ "plugin.json", "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", @@ -56,7 +64,11 @@ "plugin.json", "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" + } } ] } diff --git a/registry.json.sig b/registry.json.sig new file mode 100644 index 0000000..81db8f5 --- /dev/null +++ b/registry.json.sig @@ -0,0 +1 @@ +kqTnV7Giye/ba255APsc3A7to8IxYN1V5gf8B/9V48mr2bs0IfAdJ9qKISpanii9J5IoaxWRFexUwczTehetBg== diff --git a/tools/sign-registry.mjs b/tools/sign-registry.mjs new file mode 100644 index 0000000..4a2f857 --- /dev/null +++ b/tools/sign-registry.mjs @@ -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 +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 "); + 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).`);