Repository navigation
Validate frozen patch_hash pins for runtime originals - #252
Open
callumalpass wants to merge 1 commit into
Open
callumalpass wants to merge 1 commit into
callumalpass wants to merge 1 commit into
Conversation
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.
Summary
runtimeSourcePins()inscripts/lib/writer-runtime-originals.mjsto validatepnpm-lock.yamlimporter pins of the form<version>(patch_hash=<sha256>)when a runtime package (such aspandoc-wasm@1.1.0, patched in Fix Writer Word media export, improve accessibility, and speed up manuscript assembly #251) carries a committed pnpm patch.patchedDependenciesinpnpm-lock.yamlmust record the exact<key>: <sha256>digest.patches/<name>@<version>.patch(no symlinks) must match that SHA-256 digest...path traversal, or touch the official WASM member (src/pandoc.wasm/pkg/typst_ts_web_compiler_bg.wasm) orpackage.json, keeping the R2-served WASM binary 100% bound to the official upstream npm tarball SRI.tests/writer-hosting-policy.test.mjscovering both the live repository'spnpm-lock.yaml/patches/and refusal cases for missing/mismatched digests, symlinks, binary patches, WASM/manifest patches, traversal, and non-patch_hashsuffixes.Context
Fixes the Writer app-stop
mdbase-dev/mdbase-cloud-ops#2337(staging run46151341942on5b22cbf52f2ffailed inUnprivileged frozen Writer buildwithError: Runtime original refusal: frozen importer pin).Verification
node --test tests/writer-hosting-policy.test.mjs tests/native-publish-bytes.test.mjs— 106/106 passedrpnpm run test:publisher— 187/187 passed