Repository navigation
fix(receipts): seal and verify on a clean install; add a no-URL first command - #684
Conversation
trustshell demo exited 3 on a fresh install from the packed tarball, because the receipt hash needed the optional ethers peer. The hash now comes from @noble/hashes 1.3.2, the version ethers already pins. Output is unchanged: a test compares it with ethers byte for byte. Args hashing is not touched. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r own Measured on 1.8.1 from npm in bash and Windows PowerShell on 2026-11-08. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… inline tests/readme-first-screen pins the first fenced recipe as the SUPPORTED path a stranger copies, and the previous commit displaced it. Also rebuilds dist for the receipt hash change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Strix Security Review✅ No open security findings. PR summary: Makes receipt sealing and verification work on a clean install by computing the receipt's keccak256 hash with `@noble/hashes` (now a direct dependency) instead of the optional `ethers` peer, rebuilds the committed `dist/`, adds a test pinning the hash against ethers, adds a no-setup example command to the README, and moves two build output directories into `node_modules/.cache` so the compiled CLI resolves its runtime dependencies. Review summaryNo security findings. The receipt-hash swap to Ruled out (6)
Review history (2)
Review 2 on this PR · Reviewed by Strix |
There was a problem hiding this comment.
Reviewed the receipt-hashing swap, the new dependency, the committed dist/ rebuild, the README line and the new test suite. kernelReceiptHash now calls @noble/hashes' keccak_256 directly — the same function ethers' keccak256 wraps — and I confirmed byte-identical output on non-ASCII input and on all 17 conformance vectors, with the committed dist/ reproducing exactly from a fresh tsc build of the changed src/. Removing the loadEthers call removes only a refusal, never a control: tampered, wrong-key and unpinned receipts still fail closed, and hashKernelArgs still requires ethers. The added dependency is exact-pinned, dedupes with ethers' own pin, and has no advisory. The lint items reached from the changed files (uncaught kernel_receipt handler, --passWithNoTests publish gate, provenance-less runtime dependency, PR-writable dist freshness gate, uncleaned backend strings in CLI output) are pre-existing and are neither introduced nor widened by this diff. No security issues found.
Reviewed by Strix
Configure security review settings
The egress check and the learn-hook suite compiled the CLI into the OS temp directory. Nothing there can find node_modules, so once the CLI had a real runtime dependency (@noble/hashes) every command exited 1 with no output. Build under node_modules/.cache, which is how an install lays it out. The assertions are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
No security findings. The receipt-hash swap to @noble/hashes 1.3.2 is byte-for-byte equivalent to the previous ethers implementation for every reachable input (canonical JSON escapes lone surrogates, so the one primitive-level divergence in surrogate handling is unreachable), the 17 conformance vectors still reproduce, and dropping the loadEthers call removes only a refusal — integrity is now actually recomputed on a cold install instead of being skipped. The committed dist/ is byte-identical to a deterministic tsc rebuild of the changed src/, and the freshness gate that enforces this was not touched. The new dependency was already present in the lockfile as an ethers transitive with the same integrity hash, is exact-pinned and statically imported, and has no reachable advisory. The two build-output relocations into node_modules/.cache strengthen rather than weaken the egress check: from the OS tmpdir the compiled CLI could not resolve its runtime dependencies, so the check was failing loudly and verifying nothing; all failure modes still exit non-zero, and the new paths are __dirname-derived with no user input, no shell, and no arbitrary write or delete.
Reviewed by Strix
Configure security review settings
trustshell demoworks on a clean installInstalled from a packed tarball,
trustshell demoexited 3, because the receipt hash needed the optionaletherspeer.kernelReceiptHashnow uses@noble/hashes1.3.2, the versionethersalready pins. Sealing and verifying a receipt now work withoutethers. Hashing kernel arguments is unchanged and still needs it.This adds a direct dependency to a published package, so it needs an owner decision.
Output is unchanged:
tests/kernel-receipt-hash-no-ethers.test.tscompares it withethersbyte for byte, including non-ASCII text.A first command with no URL of your own
One line in the README's opening paragraph runs against a pinned run and works as written in bash, zsh and PowerShell. It is inline on purpose:
tests/readme-first-screenpins the first fenced recipe as the path a stranger copies, so that stays first.Evidence
dist/, with noethersand an empty environment:demoexits 0, and a passive tracer recorded zero connections.etherskeccak and Node's Ed25519, agrees.dist/commit.Not published.
npm publishstays with the owner.🤖 Generated with Claude Code