* 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>
Inspect local Maven/Gradle metadata as Evidence with bounded report/XML admission, preserved caller choices and owned cleanup.
Refs #8828; broader comparison and resolution work remains outside this change.
Assisted-by: Suika (gensokyo-skills:suika-scatter-gather-planning)
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
Inspect supplied NuGet packages as local Evidence with bounded ZIP parsing, preserved caller choices and credential-safe metadata.
Fixes#8144
Assisted-by: Suika (gensokyo-skills:suika-scatter-gather-planning)
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
Add offline ELF dependency, search-path, symbol-version and import inspection with retained Evidence summaries and pages. Bound GNU-hash work and preserve cancellation, stable identity and caller-selected parameters across CLI/MCP.
Assisted-by: Suika (gensokyo-skills:suika-scatter-gather-planning)
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* fix(adb): run adb commands under owned supervision and start the adb server explicitly
The adb version probe and device commands now run through runOwnedCommand
in their own process group, keeping adb's SIGTERM-first stop through the
termination policy. A device command's escaped descendants are swept with
its cleanup, and cleanup that fails stays owned by the provider, which
retries it before its next operation.
Device operations start the adb server with an explicit `adb start-server`
first. The server is an external shared service: REA may start it but never
stops it, so a device command never forks it into its own cleanup.
runOwnedCommand gains a byte-limited stdout collector: output beyond
maxStdoutBytes is an output-limit failure, like an exceeded diagnostic
budget, and the collected bytes are kept exactly for binary protocols such
as screencap. Ownership preparation that cannot start its own helper for
lack of host capacity is reported as the command's host-capacity launch
failure.
* fix(adb): preserve completed refusals, server startup facts, and lazy server start
* fix(adb): scope runtime-root command cleanup and preserve incomplete command cleanup
* fix(adb): preserve completed bugreports and staging directories across command cleanup failures
* fix(adb): preserve bugreport command cleanup across readback failures and project live cleanup resources
* test(lifecycle): cover browser-transport handshakes and cleanup retry
Close six provider lifecycle gaps: Electron CDP handshake, cleanup and retry; V8 inspector handshake; web-module-trace handshake and retry.
* test(lifecycle): assert retained cleanup finishes before the next acquisition
Hold the retried browser and Electron transport close and check that no replacement launch or connect starts until it completes. Track gated upgrade sockets in the fake CDP browser so close() destroys them.
* test(lifecycle): release held retry gates and join gated work on failure
Teardown for the resolver and Electron retry tests releases the held close and awaits the gated request even when an assertion fails while it is held.
* test(lifecycle): cover worker and tool launch, worker handshake, and decoder completion (#11512)
* test(lifecycle): cover worker and tool launch, worker handshake, and decoder completion
Close six provider lifecycle gaps: SQLite and JavaScript worker launch, JavaScript worker handshake, assetutil launch, and qlog and mitmproxy decoding through the owned decoder child.
* test(lifecycle): run the worker relaunch in a built project and check exits before close
The relaunch starts the built worker entry, so it moves to tests/boundary/javascript. The handshake tests now check that the stand-in child has exited when analyze() returns, before close() runs.
* test(lifecycle): cover in-process cancellation and PE certificate completion (#11524)
* test(lifecycle): cover in-process cancellation and PE certificate completion
Close six provider lifecycle gaps: caller cancellation for the managed, Harmony, JavaScript workflow, runtime reconciliation and V8 code cache providers, and PE certificate completion (an existing CLI/MCP regression). Two Apple application gaps remain (#11509).
* test(lifecycle): compare the whole retained V8 code cache observation
* test(javascript): hold the startup deadline clock until the stand-in worker is running
* test(javascript): restore real timers in a void teardown
* test(lifecycle): join the held Electron request on failure, refuse unmodeled Inspector commands, drop a wording assertion
* fix(apple): run assetutil under owned process supervision and retain unproven cleanup (#11586)
* fix(process): report a cancellation or deadline during refused final cleanup as that interruption
* fix(apple): prepare ownership before the assetutil deadline, keep per-stream allowances, join interrupted-cleanup tests
* fix(artifacts): classify assetutil launch failures through the shared launch owner
After #11615, owned-command launch failures are one launch-failed outcome
classified by the shared owner. The assetutil dialect keeps only its
unavailable report (launchUnavailable) and names its provider; host
capacity and E2BIG become resource constraints.
* fix(artifacts): keep a completed assetutil run's output on its cleanup-only report
When assetutil exits 0 but its process cleanup is unproven, the cleanup
error is the primary report. retainOwnedCommandCleanup now accepts the
completed run's captured output for such a caller, so CLI and MCP keep the
retained output beside the cleanup owner.
* fix(process): classify every launcher failure once by errno in the shared launch owner
* fix(process): keep the launch owner's syscall, cause and facts in RE and pwntools unavailable reports
Eleven tests were named "beyond the former ..." and pinned a value just above
a limit that no longer exists. Each now states and checks the current
contract:
- jsonShape: the caller's byte allowance is the only bound; a shape that fits
exactly is complete and one byte less is a capacity refusal.
- Hopper download: chunks arriving just inside the stall bound complete (the
trickle case already covers the total bound).
- Firmware: a selected analysis_timeout_ms above the default governs the owned
command, expressed from the default constant.
- Provider process output, CDP resources/timeline/WebMCP frames, Playwright
steps/artifacts/Electron waits, scenario diff and Bun ELF names: renamed to
the unbounded-count or exact-selection contract they check, with a note on
what bound (if any) still applies and where it is covered.
The six JavaScript analyzer tests with the same naming are left to their
workstream.
Refs #10515
* test(lifecycle): map every registered provider to its lifecycle regressions or explicit gaps
* test(lifecycle): track the web module and source-map processes and resolve test files against the repository URL
* test(lifecycle): record gaps where named tests did not exercise the claimed stage
* test(lifecycle): cover objdump cleanup and command-provider cleanup retry (#11487)
Close five provider lifecycle gaps: objdump cleanup and retry, sigrok and tshark process cleanup retry, and WABT retry (an existing literal-titled regression).