WEFT_OS/crates/weft-pack
Marco Allegretti 5cff1f4412 feat(pack): validate Wasm module magic bytes in check
check_package now reads the first 4 bytes of runtime.module and rejects
files that do not begin with the Wasm magic number (0x00 0x61 0x73 0x6D).
An unreadable or too-short file is treated as invalid.

is_wasm_module(path): opens the file, reads 4 bytes, compares to MAGIC.

Test added: check_package_bad_wasm_magic - writes NOT_WASM to app.wasm,
asserts check fails with a message containing bad magic bytes.
2026-03-11 10:21:43 +01:00
..
src feat(pack): validate Wasm module magic bytes in check 2026-03-11 10:21:43 +01:00
Cargo.toml feat(pack): add weft-pack package validator tool 2026-03-11 09:40:34 +01:00