Commit Graph
182 Commits
Author SHA1 Message Date
morluto 5664a6fbd4 docs: clarify parser coverage and verification ownership 2026-11-19 19:42:28 -05:00
Nianze Wuandmorluto 46f6d4638e fix(windows): check fixed Shell Link ExtraData sizes (#10361)
* fix(windows): check fixed Shell Link ExtraData sizes

* fix(windows): preserve unreadable shortcut target uncertainty

---------

Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
2026-11-19 19:21:37 -05:00
RRFZ 0fcace1ad1 fix(nuget): select publisher metadata from the first eligible leaf (#12603) 2026-11-19 19:20:10 -05:00
morluto 57d1d7ca5e fix(uefi): preserve parser coverage and source evidence (#12539)
* fix(uefi): report malformed volume extension metadata

* fix(uefi): preserve parser coverage and source evidence

* fix(uefi): bound inventory and tighten parser framing

* refactor(uefi): reuse shared byte formatting in diagnostics

* fix(uefi): accept extended sections at the compact size marker
2026-11-19 22:34:06 +00:00
morluto 9d0502bc51 fix(uefi): share inspection and extraction scan limits (#12538)
* fix(uefi): share inspection and extraction scan limits

* test(uefi): prove extraction honors the FFS file limit
2026-11-19 22:05:16 +00:00
morluto 745869e707 fix(uefi): account for FFS alignment bytes (#12532) 2026-11-19 21:41:42 +00:00
bartman081523andmorluto d380dc2409 feat(uefi): add pure-TypeScript UEFI firmware analysis tools (#12342)
* feat(uefi): add pure-TS UEFI firmware volume/FFS parser with inspect/extract tools

Add a dependency-free rea-uefi provider that maps AMI/Aptio flash images:
- inspect_uefi_firmware: aligned _FVH discovery, volume-relative FFS walking,
  guided section/compression classification, conservative PSP-directory probing,
  embedded-volume rescan and leftover-region classification; incremental SHA-256
  and explicit integrity notes.
- extract_uefi_firmware: whole-image/volume/FFS-file/section extraction with
  LZMA-custom/LZMAF86 and AMD-zlib decoding, SafeOutputTree staging, derivations
  and extraction_gaps.
- UefiArtifactReader + 'uefi' format wiring across inventory/domain/contracts
  so parsed volumes and extracted PE32/TE files hand off to deep-provider
  analysis (open_binary -> Ghidra).

* feat(uefi): add inspect_uefi_nvram for AMI NVRAM variable stores

Add a pure-TypeScript tool that maps the vendor AMI NVRAM variable stores
(factory-default "StdDefaults" and peers) inside a flash image:
- scan the raw image for NVAR entry chains ("NVAR" + u16 total size +
  u32 attribute 0x8[23]FFFFFF + state + NUL-terminated name + data),
- recurse into a container entry whose data is itself an NVAR chain, so the
  StdDefaults setup variables surface as depth/parent_offset rows,
- report attributes, state, data range, SHA-256 and trailing padding per entry.

Verified against B550 AORUS Elite V2 FId: one StdDefaults store at 0x37090 with
the 11 expected nested variables (Setup, PlatformLang, AMITSESetup, XhciDID,
GcSensorVarName, PCI_COMMON, SioSetupData, UsbSupport, NetworkStackVar,
SecureBootSetup, Setup). Exposed as MCP tool and inspect-uefi-nvram CLI command.

* fix(uefi): address review on checksums, compression, guided sections, NVRAM bounds

- FFS file checksum: verify the two's-complement invariant (payload sum +
  stored byte == 0 mod 256) instead of comparing sums, and encode the correct
  complement in the fixture builder.
- Compression sections (type 0x01): use the 9-byte header and classify EFI
  standard compression instead of 'none', so extraction reports a gap rather
  than publishing compressed bytes as a raw section.
- GUID-defined sections: derive GUID/data-offset/attributes from the parsed
  common header size (compact or extended) and reject out-of-range payload
  offsets.
- AMI NVRAM: bound recursive chains to the enclosing container's data end and
  report partial coverage when a valid nested chain is cut by max_depth.

* fix(uefi): bound decode memory, serialize operations, enforce deadline, mark truncation

- LZMA worker: enforce max_output_bytes while decoding through a bounded output
  sink, so an oversized stream is rejected during expansion instead of after a
  full decompression plus a second Buffer copy.
- Provider: serialize admitted operations (the promised single decode-worker
  lane must not become one worker per overlapping call) and apply one
  whole-request deadline that covers every decode stage, not a fresh per-stream
  timer. close() drains the queue and the resource scope.
- Scan: track truncated sections of known type and report coverage partial
  instead of complete when a section declares more bytes than are present.

* fix(uefi): cancellable queue, timeout surfacing, availability and reader omissions

- Queue: check the caller signal before enqueue and when a job reaches the head,
  and race the queued promise against abort so a cancelled wait returns
  immediately instead of blocking behind the active request.
- Deadline: track the internal deadline and return AnalysisTimeoutError instead
  of the AnalysisCancelledError that runOwnedCommand reports for any external
  abort, preserving the real failure reason for CLI/MCP callers.
- CapabilityInventory: treat inspect_uefi_nvram like the other bundled rea-uefi
  tools so discovery does not demand Unblob for it.
- UefiArtifactReader: report image truncation through onOmission so inventory
  coverage reflects the unread suffix even when no volume was found.

* fix(uefi): limit early cancellation to unstarted jobs and preserve timeout cleanup

- #raceWithAbort only returns early for jobs that have not started; once a
  request is running, await it so worker cleanup and completed output are
  preserved instead of being discarded by a bare cancellation.
- Reclassify a deadline-induced cancellation as AnalysisTimeoutError while
  keeping its cause and cleanup observations, and never override a different
  primary failure.

* docs(licenses): record UEFI decoder dependency notices

* fix(uefi): preserve stream provenance and bound firmware analysis

* feat(uefi): decode LZMAF86 guided sections

* fix(uefi): validate publication before commit and order decoder cleanup

* fix(uefi): preserve unsupported volumes and extraction gaps

---------

Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
2026-11-19 21:19:35 +00:00
morluto 3dfd7c2f0d fix(elf): preserve unprefixed Kconfig hex values (#12516) 2026-11-19 20:53:49 +00:00
morluto 1ec32721af test(pe): pin stored resource name ordering (#12518) 2026-11-19 20:45:29 +00:00
morluto 77d2c62d4d fix(nuget): require the OPC namespace for manifest relationships (#12492) 2026-11-19 19:45:53 +00:00
morlutoandStefano Rizzello 673bd049b7 fix(flutter): inspect unified Dart AOT snapshot profiles (#12480)
* fix(flutter): inspect unified Dart AOT snapshot profiles

Port the unified Dart SDK layout from #3662 and resolve profiles from one dynamic-symbol inventory and the physical snapshot headers. Refs #3629.

Co-authored-by: Stefano Rizzello <rizzellostefano@gmail.com>

* fix(flutter): retain valid pools beside malformed snapshot exports

---------

Co-authored-by: Stefano Rizzello <rizzellostefano@gmail.com>
2026-11-19 19:22:54 +00:00
morlutoandCursor Agent 7df462cbfa feat(managed): retain unresolved definition coordinates (#12462)
* feat(managed): retain unresolved definition coordinates

* fix(managed): describe unresolved definition scope in summaries

* test(managed): isolate the selected coordinate fixture

* test(managed): use owned member scope guidance

* test(managed): use historical evidence for unknown method scope

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-11-19 19:03:27 +00:00
morluto 82fa175d2f fix(managed): refuse empty field definition identities (#12467) 2026-11-19 18:27:36 +00:00
morluto a627952bd5 fix(native): preserve numeric Mach-O identities and CodeView path bytes (#12458) 2026-11-19 18:12:35 +00:00
morluto 2837de5159 fix(har): retain Playwright 1.64.1 bracketed IPv6 addresses (#12456) 2026-11-19 18:04:38 +00:00
morluto 16e3263b10 fix(pe): bound TLS and export reads by declared section content (#12432)
* fix(pe): bound TLS template mappings by section content

* fix(pe): map export tables within declared section content (#12444)
2026-11-19 18:00:01 +00:00
morluto 4377c1a392 fix(managed): keep empty definition names out of member identity (#12448) 2026-11-19 17:51:46 +00:00
morluto 760478c5e9 fix(managed): retain Module identity when its name is unreadable (#12441)
fix(managed): retain module identity when its name is malformed
2026-11-19 17:47:18 +00:00
morluto 7cc7bda6e3 fix(android): validate OTA manifest and signature extents before capacity (#12431)
fix(android-ota): admit complete manifest and signature extents before limits
2026-11-19 17:22:55 +00:00
6a5d77bf21 fix(windows): floor LinkInfo string offsets at the mandatory header (#12403)
A LinkInfoHeaderSize below 0x1C no longer lowers the string-offset floor.
Reserved 0x1D..0x23 headers still end at their declared size, so ANSI
fields after that header stay readable.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: morluto <morluto@users.noreply.github.com>
2026-11-19 10:35:40 -05:00
morluto de9da86333 fix(windows): validate opaque shortcut block framing (#12401)
* fix(windows): check shortcut PropertyStore block size

* fix(windows): validate shortcut Shim block framing
2026-11-19 15:31:11 +00:00
morluto dd4be52a83 fix(windows): flag reserved shortcut LinkInfo header sizes (#12388)
fix(windows): report reserved LinkInfo header sizes
2026-11-19 15:22:03 +00:00
morluto a4c4366db2 fix(windows): report missing shortcut Darwin and Shim blocks (#12378)
* fix(windows): report missing shortcut Darwin and Shim blocks

* test(windows): accept declared Darwin and Shim blocks
2026-11-19 15:17:49 +00:00
Nianze WuandCursor Agent a4a633bae7 fix(windows): bound shortcut string offsets to structure data (#10416)
* fix(windows): reject shortcut paths into LinkInfo headers

* test(windows): cover shortcut suffix header offsets

* fix(windows): bound nested shortcut string offsets

* fix(windows): compare only complete shortcut targets

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-11-19 10:15:38 -05:00
a44ff73676 fix(apple): bound bundle Info.plist reads before decoding (#12279)
* fix(apple): bound bundle Info.plist reads before decoding

* refactor(apple): report plist input limits through shared failures

* fix(apple): retain bundle plist descriptors through target cleanup

* test(apple): verify Hopper retries bundle plist cleanup

* fix(apple): preserve typed cancellation through bundle plist cleanup

* fix(apple): preserve plist read failure through late cancellation

* fix(apple): preserve cancellation during plist close retry

* docs(apple): document bundle plist admission policy

---------

Co-authored-by: ShuaixinHuang <197200901+ShuaixinHuang@users.noreply.github.com>
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
2026-11-19 13:41:40 +00:00
morluto 14aca264ea fix(windows): report out-of-spec shortcut StringData counts (#12352) 2026-11-19 13:33:05 +00:00
morluto f175382ed7 fix(plist): carry keyed archive parser limit facts into errors (#12324)
fix(apple): expose keyed archive parser limits in errors
2026-11-19 12:51:06 +00:00
morluto 39d20dce3d fix(pe): report the enforced resource parser limit (#12328) 2026-11-19 12:49:07 +00:00
morluto c5709b8697 fix(capture): validate PNG headers at the shared boundary (#12310)
fix(screenshot): validate IHDR encoding fields at capture
2026-11-19 12:38:50 +00:00
morluto cffff06ee7 fix(apple): bound FAT disambiguation to plausible JVM classes (#12316) 2026-11-19 07:28:34 -05:00
e91ddc89f9 fix(android-ota): require both payload signature fields (#12273)
* fix(android-ota): require both payload signature fields

* refactor(android-ota): share validated payload signature range

---------

Co-authored-by: ShuaixinHuang <197200901+ShuaixinHuang@users.noreply.github.com>
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
2026-11-19 12:15:06 +00:00
morluto c0d7e440de fix(sbom): preserve local Go modules without a Package URL namespace (#12293)
fix(sbom): require a namespace for Go Package URLs
2026-11-19 11:53:41 +00:00
ShuaixinHuang 9600b3ac7a fix(sbom): retain source-host artifact file names (#12230)
* fix(sbom): preserve backslashes in POSIX artifact names

* test(sbom): preserve fixture drive and recorded file name
2026-11-19 06:35:08 -05:00
morluto b406649be0 fix(managed): require unique Module rows with ambiguous string heaps (#12277)
Apply the Module row cardinality check before interpreting either the nil or nonzero name index in a conflicting #Strings layout.
2026-11-19 11:19:07 +00:00
morluto 1230afc030 fix(web): honor the captured JavaScript language (#12278) 2026-11-19 11:19:04 +00:00
Oke Iyanuoluwa Enoch 41db934de8 fix(native): let plutil decide XML plists REA's reader refuses (#12251)
CoreFoundation reads some XML plists that strict XML rejects, such as
documents with a double hyphen in a comment or a control character in a
string. inspect_plist refused them although plutil -lint accepts them,
and the outcome depended on how file(1) described the bytes.

When REA's XML reader refuses a document's syntax, inspection now takes
the existing plutil conversion route. The result keeps format xml and a
limitation names REA's reason. A document plutil also rejects stays
refused with its diagnostic, and plist structure errors in well-formed
XML are still refused without conversion.

Fixes #12234
2026-11-19 06:15:08 -05:00
hhangandhhang 7419328ea7 fix(android): accept R8 mapping separator spacing (#12247)
Co-authored-by: hhang <169027046+xu91102@users.noreply.github.com>
2026-11-19 06:09:37 -05:00
morluto a4bf59f661 fix(managed): preserve Module identity with an unresolved name (#12265)
Admit exact string heap aliases and retain independent Module row facts for distinct declarations. Bind the optional partial row to the same scope checks as named Module Evidence.
2026-11-19 06:08:59 -05:00
morluto 519547d022 fix(web): verify worker script import identity (#12264) 2026-11-19 06:07:48 -05:00
morluto fe6c9bcf66 fix(javascript): share TypeScript suffix grammar across parsers (#12257)
* fix(javascript): share TypeScript suffix grammar across parsers

* docs(javascript): explain explicit TypeScript suffix diagnostics

* fix(javascript): retain explicit-suffix assertions as complete
2026-11-19 08:56:52 +00:00
morluto ae8fb57ef0 fix(managed): preserve duplicate GUID stream ambiguity (#12217)
* fix(managed): preserve duplicate GUID stream ambiguity

* fix(managed): preserve ambiguous metadata stream declarations (#12226)

Use one stream declaration owner for heap and table diagnostics. Keep user strings and row-layout uncertainty separate from independent PE/CLI observations.

* test(managed): separate heap entries from cache behavior

* fix(managed): preserve duplicate blob heap ambiguity (#12258)

Resolve #Blob in the shared stream layout. Preserve nil references and independent facts without emitting unsupported keys, signatures or hashes.
2026-11-19 03:49:34 -05:00
morluto 0e07437bc7 refactor(macho): report inspection limits from LimitRef (#12205) 2026-11-19 05:33:06 +00:00
ShuaixinHuangandShuaixinHuang 4230ae1cd4 fix(javascript): preserve unknown Electron path bases (#11991)
Co-authored-by: ShuaixinHuang <197200901+ShuaixinHuang@users.noreply.github.com>
2026-11-19 00:21:01 -05:00
morluto 9968f27fac refactor(web): report source-map output limits from LimitRef (#12200) 2026-11-19 05:19:45 +00:00
morluto 0b19b06bf6 fix(native): share ELF, PE, and Mach-O framing across artifact readers (#12156)
* fix(elf): share dynamic table singleton validation

* fix(elf): share note storage and framing across readers

Refs #12130

* fix(elf): retain zero-filled load mapping ambiguity

Refs #12136

* fix(pe): share header extent admission

Refs #12143

* fix(macho): share embedded section backing checks

Refs #12142

* fix(pe): share header facts and validate resource directory order

* fix(macho): require complete carrier load command framing

* fix(pe): probe declared resource headers by file offset

* fix(elf): preserve zero-fill observations across mapping gaps

* refactor(pe): share positional COFF header observation (#12173)

* fix(elf): check load-map agreement across section extents (#12175)

* fix(elf): check load-map agreement across section extents

* fix(elf): preserve agreed section links across unreadable tables
2026-11-19 03:49:13 +00:00
morluto a6469719ce docs: clarify parser ownership and reader contracts 2026-11-18 22:34:45 -05:00
morluto 27e04ea2ec fix(javascript): share source-map admission and path resolution (#12161)
* fix(source-map): share bounded structural inspection with local analysis

Refs #12135

* fix(javascript): retain relative URL traversal and decline unusable map paths

* fix(javascript): retain source content beyond coordinate admission
2026-11-19 03:32:08 +00:00
morluto 261c6d06d1 fix(browser): derive body media types from observed headers (#12159)
* fix(browser): derive scenario media types from observed headers

Issue #12124

* fix(browser): retain body redaction mode through privacy replay
2026-11-19 03:31:13 +00:00
Akshad Jogiandmorluto ae25050dff feat(native): surface inferred prototype instruction conflicts (#8161)
* feat(native): surface inferred prototype instruction conflicts

- Add evidence-backed x86-32 stack-read and stdcall cleanup diagnostics in ReaGhidraBridge.java without rewriting signatures or function bodies.

- Carry prototype conflicts through native API schemas, analysis summaries and retained dossier views so CLI and MCP share the observations.

- Update Ghidra analysis profile digests, documentation and MCP boundary tests for the new diagnostic contract.

* fix(native): follow framed paths and retain zero cleanup conflicts

- Traverse decoded entry-frame paths in ReaGhidraBridge.java instead of stopping at an address-ordered early return, so later reachable reads remain visible.

- Detect explicit, implicit and partial EBP writes and use decoded operands with p-code loads, preventing stale-frame warnings and recognizing real Ghidra stack reads.

- Compare immediate return cleanup with inferred stdcall stack bytes even when either side is zero, and allow zero in the native API contract.

- Add real Ghidra instruction probes and MCP/CI regressions for the reported cases and document the bounded checks.

* fix(native): attribute frame reads before register writes

- Check a decoded stack read before invalidating EBP in ReaGhidraBridge.java so instructions that read and replace the frame still report the conflict.

- Match each candidate operand's address p-code to its LOAD pointer so a POP from ESP into an EBP destination cannot masquerade as an argument read.

- Cover both decoded instruction cases in ReaPrototypeConflictProbe.java and await verifier-owned scratch cleanup on success and failure.

* fix(ghidra): recompute raw profile digests after rebase

- Recompute the 6502 and disabled-analyzer raw-binary profile digests in GhidraRawProfileDigest.test.ts so the pinned values commit to the merged shared policy on current main.

* fix(native): locate the entry frame by address and own verifier cleanup

- Find PUSH EBP; MOV EBP, ESP from the function entry address in ReaGhidraBridge.java so an owned block below the entry cannot hide a reachable argument read.

- Run analyzeHeadless in its own process group and stop that group before removing scratch in verify-ghidra-prototype-conflicts.mjs, so the JVM and decompiler children are addressed as one owned family.

- Cover the lower-owned-block case in ReaPrototypeConflictProbe.java with an entry frame preceded by a decoded lower block.

* fix(native): size prototype fixture and own Ghidra cleanup

- Allocate the instruction fixture through the lower-block offset in verify-ghidra-prototype-conflicts.mjs so the entry frame and decoded block exist for the probe.

- Check the detached process group instead of the leader exit code before cleaning up, so lingering decompiler children receive SIGTERM and SIGKILL before scratch removal.

* fix(native): own Ghidra probe cleanup with shared process owner

- Use REA's ProviderProcessSupervisor and token-verified cleanup in verify-ghidra-prototype-conflicts.mjs so the JVM and descendants are stopped before scratch removal, including failed launches.

- Preserve the source-owned x86 fixture with an entry frame and lower block while asserting verified cleanup.

- Build the pinned verifier dependency graph in the Ghidra bridge CI job and extend its timeout before running the real probe.

* fix(native): end verifier waits on interrupt before cleanup

- Install SIGINT and SIGTERM handlers before spawning Ghidra and abort the wait, so Ctrl-C no longer leaves the detached process group running.

- Keep cleanup handlers installed until the shared process owner reports verified cleanup, then remove scratch only after the process family is stopped.

* fix(native): preserve verifier cleanup interruption errors

- Keep interrupt handlers installed through process cleanup and workspace deletion, then check cancellation before reporting success.

- Preserve and report the failing cleanup step instead of replacing it with an interruption or deleting a tree that may still be unsafe.

* fix(native): retain probe failures across verifier cleanup

- Record the probe error before cleanup so a late SIGINT or SIGTERM cannot replace its stack and captured Ghidra diagnostics.

- Prefer the earlier probe failure when cleanup also fails, while preserving cleanup diagnostics and temporary state for diagnosis.

* test(kuna): raise caller matrix verifier budget for parallel CI

- The multi-target verifier spawn used a 10s timeout while sibling verifier cases use 25s.

- Under 8-way sharded CI load this intermittently exceeded 10s and produced ETIMEDOUT, failing shard 1/8 and portable tests.

- Raise to 30s to match the existing verifier budget and avoid load flakes.

* ci: retrigger checks after transient Ghidra SDK download 403

- The ghidra_bridge lane failed in upstream's untouched SDK acquisition step: curl returned 403 with 0 bytes downloaded in 0.046s from the GitHub release CDN.

- Push an empty commit to start a fresh run because rerunning on the upstream repository requires admin rights.

* fix(native): keep the cleanup lease on combined verifier failures

- Run the prototype-conflict probe through withVerifierFixture so a probe failure and a failed release surface as one AggregateError that keeps the probe error as its cause and attaches the retained fixture as cleanupLeases, instead of throwing the probe error alone and dropping the cleanup owner.

- Report the failed cleanup step and retained project only when the fixture was not released, and keep interrupt handlers installed until release finishes.

* test(native): use shared MCP prototype test deadlines

---------

Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
2026-11-19 01:55:13 +00:00
ShuaixinHuang af20de3509 feat(native): resolve RISC-V ELF initializer pointers (#12109) 2026-11-18 19:45:05 -05:00