mirror of
https://github.com/morluto/rea.git
synced 2026-11-29 01:46:39 +00:00
* feat(artifacts): inventory macOS flat installer packages offline * fix(artifacts): keep refused pkg members unavailable during inspection A XAR member whose decode failed or whose decoded size contradicted the TOC stayed a readable entry, so shared inspection reopened it, hit the same mismatch at stream flush and aborted the whole scan. Record those members and have open() report them as unavailable content, so the scan keeps the partial facts and the named refusal. * fix(artifacts): report out-of-range installKBytes as unknown The Distribution parser accepted any safe integer for a pkg-ref's installKBytes, but the report field is uint32. A value such as 4294967296 parsed fine and then failed schema validation, which rejected the whole inventory report. Bound the attribute to uint32 at parse time so an out-of-range value reads as unknown. * fix(artifacts): charge decoded pkg archive bytes against the shared budget The shared expansion budget charged each Scripts or Payload member by its stored XAR size, so several small gzip members could each decode toward the per-archive allowance while barely moving the total. Decode now stops at what remains of the shared budget, the decoded size is charged, and an archive that would exceed it is listed as not expanded. gunzipBounded also recognizes Node's ERR_BUFFER_TOO_LARGE, which is what maxOutputLength raises, so an oversize gzip member is reported as a limit rather than as invalid gzip data. * fix(artifacts): keep expanded pkg Scripts/Payload archives in inventory Expanding a gzip-cpio Scripts or Payload member deleted the stored XAR entry, so its heap offset, sizes and TOC checksums dropped out of inventory and extraction. Keep the stored occurrence at a sibling logical path (for example Payload.cpio.gz) with sourcePath still naming the XAR member, so it sits alongside the expanded children. * fix(artifacts): count pkg check scripts in UTF-8 bytes scriptLength returned the JavaScript string length, so non-ASCII installation-check and volume-check scripts reported the wrong byte count. Measure the selected text with Buffer.byteLength. * fix(artifacts): keep pkg FIFO and device members non-materializable A cpio member that is not a directory, symlink or regular file (FIFO, character or block device, socket) was inventoried as an empty regular file. Emit it as a metadata declaration with a limitation naming its type, keep its mode in format metadata, and refuse open() on it. * fix(artifacts): bound pkg member archived range before reading it Refuse a zlib-encoded XAR member whose archived heap range exceeds the compress bound of its decode allowance, and never read the range of an unsupported encoding, so a package-controlled archived length cannot reach a buffer allocation unbounded. * fix(artifacts): refuse installer XML with an unexpected root element Distribution must have an <installer-gui-script> root and PackageInfo a <pkg-info> root. Any other root is now a named malformed-input refusal instead of a product or component identity with null fields. * fix(artifacts): keep duplicate XAR TOC paths as distinct pkg entries Key XAR file entries by their TOC occurrence instead of their path, so a later record at the same path no longer overwrites the earlier one. Expanded Scripts/Payload member keys now derive from their archive key for the same reason. * fix(artifacts): cap streamed XAR inflate output before forwarding it maxOutputLength does not bound a zlib stream, so count emitted bytes in createBoundedXarInflate and fail before forwarding past the allowance. The member stream also fails as soon as decoded bytes pass the TOC extracted size instead of waiting for EOF. * fix(artifacts): read XAR TOC execute bits across owner, group and other The XAR TOC <mode> was tested only on its last octal digit, so a mode such as 0750 reported a non-executable entry. Parse the octal text and test (mode & 0o111) like the cpio path. * fix(artifacts): keep XAR TOC directories and link-only symlinks as pkg entries TOC records without a heap body were dropped from the inventory, so directories, symlinks declared only by <link>, and empty files vanished. They now become their own occurrences: directories stay non-openable, symlinks open as their declared target text, empty files open as zero bytes, and other record types are kept as non-materializable metadata. Installer document lookup only considers heap-backed records. The shared lifecycle cases open the first entry, so they now use the component package fixture, whose first TOC record is a heap-backed file. * fix(artifacts): record Scripts and Payload presence from the XAR TOC A listed Scripts or Payload archive is now present before expansion is attempted. When the shared budget skips it or the XAR read is refused, its compression is reported as "unread" instead of "absent". * fix(artifacts): keep pkg coverage unknown when content was refused Coverage was complete whenever no archive hit the shared expansion budget, even when a heap range, encoding, decode, cpio or pbzx refusal left content unread. Any refusal other than the header-version notice now keeps coverage unknown. * fix(artifacts): only treat the cpio archive limit as a shared budget stop A zero or oversize cpio namesize raises the name limit, whose maximum is 4096 bytes. When exactly 4096 bytes of shared budget remained, that limit was mistaken for the budget stop and the refusal was dropped. Match the limit name as well as its maximum. * fix(artifacts): keep cpio members read before a damaged tail A Scripts or Payload archive whose cpio stream ends or breaks after complete members used to discard all of them and report an empty inventory with false script flags. parseCpioOdcPrefix now returns the members read before the failure along with the failure itself, and the pkg reader keeps those members as entries while recording the refusal, so coverage stays unknown. A failure before any complete member is still a plain refusal. * fix(artifacts): keep an out-of-range XAR TOC mode unknown Parse <mode> once in the TOC reader. Octal text that does not fit a uint32 becomes null, so one bad entry no longer fails the inventory schema check for the whole package. * fix(artifacts): cancel paused memory-backed pkg members A retained member streamed into a paused consumer kept its output open after abort, because the in-memory source has no signal and the shared stream owner defers cancellation until production finishes. The member output now retires on abort while its final validation has not started. * Address review feedback * fix(artifacts): share one expansion allowance across XAR members * fix(artifacts): count XAR TOC nodes before building the DOM A small TOC could hold millions of ignored elements under the byte limits, and each became a DOM node before the file count ran. Parse the TOC through parseXmlDocumentWithinNodeLimit with a 256-per-file node allowance and report a capacity limit past it. * fix(artifacts): cancel a paused XAR decoder after its source retires A highly compressed zlib member can finish reading its archived range while the decoder is still paused on a slow consumer. The file source's abort listener is gone by then and ownArtifactStream deferred abort until production finished, so cancellation waited for the consumer to resume. Once the source closes, an abort now destroys a decoder that has not ended. The output's final validation only starts after the decoder ends, so it keeps failure precedence. * fix(artifacts): reset XAR reader state when preparation retries When one caller cancelled preparation and another retried it on the same reader, #prepare built fresh metadata but kept #entries and #refusedContent from the cancelled attempt. The retry then skipped members already refused without recording their refusals, so coverage could report complete while open() still refused the member. #prepare now clears both maps before it reads the package. * fix(artifacts): align macOS pkg reader with format failure API and zlib output limits * fix(artifacts): bound XAR TOC expanded paths, preserve valid TOC records, and populate symlink linkTarget * fix(pkg): enforce package-wide cpio caps, strict UTF-8 names, root Distribution, and stored size checks * fix(macos-pkg): bound package-wide installer metadata bytes and records * fix(macos-pkg): tie installer metadata budgets to artifact_limits.expanded_bytes Wire macOS flat package Distribution/PackageInfo byte, record, and XML-node allowances into artifact_limits.expanded_bytes via macosPkgMetadataBudget: - Preserve the 4 MiB total, 1 MiB per-document, 4,096-record, and 65,536-node defaults when artifact_limits.expanded_bytes is omitted so aliased-heap metadata bombs remain bounded. - Charge every Distribution and PackageInfo read (including aliased stored heap ranges) against the shared expanded_bytes budget alongside zlib XAR members and Scripts/Payload expansion. - Raise the byte allowances and scale record (1 per 1,024 bytes, min 4,096) and XML-node (16 per record) allowances when artifact_limits.expanded_bytes is set, and report effective limits with artifact_limits.expanded_bytes recovery on metadata limit refusals. - Also add qualcomm-mbn to PE_OVERLAY_LEADING_FORMATS to resolve the typecheck conflict introduced by merging origin/main. * fix(macos-pkg): strip repeated ./ prefixes and tie cpio limits to expanded_bytes - Normalize cpio member paths with withoutCurrentDirectoryPrefix (handling repeated leading ./ segments and archive-root entries such as ./. and ././) both when counting retained path bytes and when forming logical paths, preserving the recorded name in sourcePath. - Derive Scripts/Payload cpio archive-byte, member-count, and expanded path-byte allowances from artifact_limits.expanded_bytes via macosPkgCpioBudget (keeping 64 MiB / 4,096 members / 4 MiB defaults when omitted, removing hardcoded cpio clamps, and reporting effective limits with artifact_limits.expanded_bytes recovery). - Update docs/macos-pkg.md and docs/reference/limits-and-recovery.md and add regression tests. --------- Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com> Co-authored-by: Matt Van Horn <mvanhorn@MacBook-Pro-10.local> Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
11 KiB
11 KiB
Documentation directory
Find an installation step, investigation guide, or contributor reference by task. The REA website has worked examples and product pages.
Getting started
- Installation and setup
- Supported targets and requirements
- Client configuration and troubleshooting
- CLI and Evidence
- Guided MCP prompts and completion
Desktop applications
- Desktop installation directories
- Desktop application capture
- Desktop application state
- Desktop application tasks
- Desktop application export
- Desktop build computer
- Desktop build witness
Agent environments
Native binaries
- Native binary investigation
- Go binary build metadata
- DWARF compile units
- Offline binary diagnostics
- ELF separate debug files
- ELF and Mach-O initializer functions
- ELF unwind function ranges
- Linux kernel build config
- Recorded crash evidence
- Windows Shell Link shortcuts
- Acquired NTFS metadata
- Binary hardening
- ELF note tables
- ELF dependency tables
- Linux kernel modules
- PE Authenticode certificate tables
- PE import and delay-load tables
- PE TLS callbacks and load configuration
- PE x64 exception-directory function ranges
- PE overlay
- Match native functions across builds
- Rust binary dependency metadata
- Static CUDA and HIP code objects
JavaScript and Electron
- JavaScript Application Graph
- Cross-layer JavaScript application workflows
- JavaScript artifact reconstruction
- JavaScript source recovery
- Passive Node and Electron runtime observation
- JavaScript static/runtime reconciliation
- Electron file-page observation
- V8 code cache inspection
- Electron fuse state
- Static JavaScript route inventory
- Bun standalone executables
- Deno compile executables
- Node.js single executable applications
Browser and captured websites
- Website observation with CDP
- Browser scenario contract
- Website runtime source attribution
- Historical web network captures
- HTTP/3 capture lab
- Captured website source locations
- Captured website module relationships
- Captured website scripts and static JavaScript analysis
- Offline Playwright traces
Android applications
- Static Android APK analysis
- Apktool resource decoding
- ADB device inspection and acquisition
- Flutter build identification
- Android boot and vendor_boot images
- APK signature schemes
Apple applications
.NET assemblies
- Managed-code analysis
- NuGet packages
- VS Code extension packages
- .NET single-file bundles
- IL2CPP metadata
Firmware
- Firmware analysis
- Android OTA update payloads
- Android Verified Boot vbmeta images
- Android sparse images
- UBI images
- Flattened devicetree inspection
- ESP flash images
- ESP images
- U-Boot FIT images
- Qualcomm MBN images
- Intel HEX and S-record images
- UF2 and DfuSe images
- U-Boot legacy uImage containers
- uClinux bFLT flat executables
HarmonyOS packages
Packages and metadata
- Offline API contract inventory
- CycloneDX dependencies
- Maven POM and Gradle module metadata
- OCI image layouts
- Release exposure
- Model file declarations
- Python packaged applications
- Debian package inspection
- CPython pyc inspection
- Erlang BEAM files
- Godot PCK archives
- UnityFS AssetBundle archives
- iNES containers
- Nintendo DS ROMs
- WeChat mini-program wxapkg archives
- macOS flat installer packages
- ISO 9660 disc images
- tar and gzip-compressed tar archives
- Nintendo Switch NSO and NRO executables
- GPU asset headers: DDS, GLB, KTX and KTX2
WebAssembly
EVM contracts
Databases and recorded packets
Process capture and instrumentation
Provider setup and formats
- Ghidra provider semantics
- DOS MZ and COM analysis with Ghidra
- Optional NativeAOT metadata recovery
- MIPS ELF analysis through Ghidra
- PSP static ELF analysis through Ghidra
- RISC-V ELF analysis through Ghidra
- Windows Ghidra P0
- Headerless raw-binary analysis with Ghidra
- IDA provider
- JEB instrumentation and analysis
- GameCube DOL analysis through Ghidra
- PowerPC ELF analysis through Ghidra
- Kuna provider
- Reverse-engineering tool integrations
Contracts and evidence
- MCP runtime contracts
- Target failures
- Directory identity
- Reconstruction obligation ledgers
- Reconstruction coverage
Development and verification
- Documentation ownership and authoring
- Settings and recovery
- REA limit inventory
- MCP tool design
- Testing REA
- Client and agent verification
- Reconstruction readiness conformance
- Releasing REA
- Testing lanes and provider verification
- Measure MCP catalog costs in Codex
- Static analysis in GitHub Actions
Release migrations
Signal recordings
Generated files and release records
| Path | Owner and update command |
|---|---|
public/product-catalog.json |
Ignored contract projection; npm run docs:generate |
verification/managed-conformance-*.json |
Ignored managed conformance projections; npm run evidence:generate |
error-contract.schema.json |
Tracked schema from contracts; npm run docs:error-schema |
user-visible-errors.csv |
Generated error code and category per domain and provider-owned error case; npm run docs:error-schema |
releases/<version>.contributions.json |
Durable release contribution record; follow the release guide |
Regenerate catalogs and Evidence projections from their canonical source.
Release records preserve the exact commit messages and references for each release.
Guides share authored images in assets/.