Repository navigation
Conversation
A random 32-byte key per universe, made once in ~/.config/typetorch/keys/<universeId>.private-record.key (0600, outside every repo; --private-record-key-file) and reused by every kernel deploy; --rotate-private-key makes a new one and keeps the old file. Baked as ServerStorage.TypeTorchKernelSecrets.PrivateRecordKey, a kernel slot every engine replaces, only for a kernel that reads it (0.5.10+). Only its fingerprint is printed or logged (kernel-deploys.jsonl privateRecordKey); dry runs never write the file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nel name drift check Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The CLI half of kernel audit item S2.1, proposal (a), which the owner approved ("Needs your call" item 1 in typetorch/kernel#19). The kernel half is typetorch/kernel#22, stacked on kernel #19.
What
typetorch kernel deploybakes a random private record key into the place. The kernel MACs everyprivate/<id>record it writes with this key. A reserved server follows a stored non-default branch or pin only when the record's mac verifies. So a leaked DataStore key can no longer send reserved match servers to a branch the attacker controls.ServerStorage.TypeTorchKernelSecrets, attributePrivateRecordKey(64 lowercase hex = 32 random bytes).TypeTorch*child of a service in the stamped project), so every engine replaces it on every kernel deploy: luau, splice/lune with--place-file, and--replace-place.~/.config/typetorch/keys/<universeId>.private-record.key, beside the signing keys.{ v: 1, kind: "typetorch-private-record-key", universeId, key, createdAt }.assertOutsideRepos). Loose permissions get achmod 600warning.--private-record-key-file <path>--rotate-private-key: a new key. The old file is kept as<file>.old-<time>and never deleted.privateRecordKey: { fingerprint, state, path, createdAt }inkernel-deploys.jsonland the patch records). The key is registered for redaction (registerSecret).Kernel.server.luaunamesTypeTorchKernelSecrets, i.e. kernel 0.5.10+). An older kernel would leave the folder where game code can read it. For an older kernel the deploy warns "not baked", and--rotate-private-keyis refused.Rollout: release together with the kernel PR; the order doesn't matter
kernel deploymakes the key. Copy~/.config/typetorch/keys/<universeId>.private-record.keyto every other machine that runskernel deploy.Judgment calls
env.ts(touched by Security fixes from the 2026-12-05 audit #48 and apikeys with groups, groups and members commands, TYPETORCH_FLEET_KEY alias (backend plans/38) #51) out of this PR..typetorch/hold the key:out/place.rbxl,out/kernel-slots.rbxm,place-patches/*.rbxlandplace-backups/*.rbxl, like the rest of the place. They are local and gitignored (.typetorch/), and that is accepted. The temporary gen project JSON holds it until the Rojo build finishes.kernelReadsPrivateKey), not a package.json field. That works for checkouts and packaged kernels (both shipsrc/).Expected conflicts with open PRs
src/index.ts: help text (typetorch settings secrets: move the record's tokens to the Roblox Secrets Store #50, apikeys with groups, groups and members commands, TYPETORCH_FLEET_KEY alias (backend plans/38) #51 also edit index.ts, in other sections).test/fixtures/kernel-luau/lune-cloud.ts: one added export (Correctness fixes from the 2026-12-05 audit #49 touches the same fixture folder).src/commands/kernel.tsis not touched by Security fixes from the 2026-12-05 audit #48 to apikeys with groups, groups and members commands, TYPETORCH_FLEET_KEY alias (backend plans/38) #51.keyfiles.ts(Security fixes from the 2026-12-05 audit #48) is only imported (assertOutsideRepos,KeyFileError), not changed.Tests
bun test: 921 pass, 2 skip, 1 fail. The one failure is the pre-existingbackend blesstest, which also fails onorigin/main.tsc --noEmit: clean.test/privatekey.test.ts(12 tests):preparePrivateKey: not baked for an old kernel, and--rotate-private-keyrefused there. Made, then reused. Output shows the fingerprint, never the key. A dry-run rotation keeps the file.kernelLayoutandslotsProject.verify.json), the summary and the place summary never contain the key.FindFirstChild("TypeTorchKernelSecrets")andGetAttribute("PrivateRecordKey"). It runs when../kernel, orTYPETORCH_KERNEL_DIR, has the support.backend bless > sends the public keys ...fails in the full run on this machine and also fails onorigin/main(passes alone): a pre-existing order-dependent test, not from this change.TYPETORCH_ROJO= rokit's rojo 7.7.0-rc.1 (7.6.1 isn't installed here).🤖 Generated with Claude Code