* refactor(domain): give strict UTF-8 decoding one owner with an explicit BOM policy
* fix(domain): keep the leading-BOM behaviour every migrated UTF-8 decoder had
* refactor(domain): read the domain layer's strict UTF-8 through the BOM-policy owner (#10803)
Twelve domain decoders built their own fatal TextDecoder with ignoreBOM: true. They now use strictUtf8Decoder("preserve"), which keeps that behaviour: each reads bytes where a leading U+FEFF is content (binary-format names and fields, JSON and XML read byte-for-byte, recorded bodies, registry seeds whose kept bytes are re-emitted). The counted baseline drops from 74 to 62.
* refactor(artifacts): read artifact readers' strict UTF-8 through the BOM-policy owner (#10871)
Fourteen artifact reader modules (17 sites) built their own fatal TextDecoder. They now take it from strictUtf8Decoder with the policy each had: every one kept a leading BOM (ignoreBOM: true), so they use "preserve"; JavaScriptArtifactFiles keeps it for JavaScript and HTML entries and strips it otherwise, as before. The strict-utf8-decoder baseline drops those 17 sites.
* refactor(domain): drop TextDecoder imports left by the strict UTF-8 migration
* refactor(application): read MCP registration metadata through the strict UTF-8 owner
* refactor(formats): read binary-format readers' strict UTF-8 through the BOM-policy owner (#10903)
* refactor(formats): read binary-format readers' strict UTF-8 through the BOM-policy owner
* refactor(formats): drop the model readers' unused TextDecoder imports
* refactor(browser): read browser capture and fetch strict UTF-8 through the BOM-policy owner (#10935)
* refactor(browser): read browser capture and fetch strict UTF-8 through the BOM-policy owner
* refactor(native): read LLDB and Mach-O name strict UTF-8 through the BOM-policy owner (#10936)
* refactor(native): read LLDB and Mach-O name strict UTF-8 through the BOM-policy owner
* refactor(process): read MCP and NDJSON transport frames' strict UTF-8 through the BOM-policy owner (#10937)
* refactor(process): read MCP and NDJSON transport frames' strict UTF-8 through the BOM-policy owner
* refactor(application): read JSON and file inputs' strict UTF-8 through the BOM-policy owner (#10938)
* refactor(application): read JSON and file inputs' strict UTF-8 through the BOM-policy owner
* refactor(providers): read IDA, Electron, Ghidra and reference strict UTF-8 through the BOM-policy owner (#10939)
* refactor(providers): read IDA, Electron, Ghidra and reference strict UTF-8 through the BOM-policy owner
* refactor(evm): read the hex bytecode carrier's strict UTF-8 through the owner and refuse new local decoders (#10940)
* refactor(evm): read the hex bytecode carrier's strict UTF-8 through the BOM-policy owner
* chore(architecture): match local strict UTF-8 decoders in any option order
Artifact classification probes every ELF root for a Node SEA note. Each
PT_NOTE program header was scanned on its own, one read per note, so
headers that declare the same note bytes multiplied the work: a 295 KB
ELF with 4,096 such headers kept inspect-artifact busy for about three
and a half minutes.
Every note header takes at least 12 bytes, so disjoint tables hold at
most one note per 12 file bytes. The scan now stops there. Past that
count the remaining tables are unreadable: an ELF without a confirmed
blob keeps its native classification, and a confirmed blob fails closed.
Separate raw SEA names from safe logical extraction paths. Accept empty asset
keys, retain absolute main paths and conflicting source spellings, and assign
deterministic paths through the shared artifact path registry. Keep duplicate
raw keys malformed and include sourcePath in owned entry equality.
Validate 102 focused regressions including compiled CLI and stdio MCP inventory
and extraction, the canonical SDK schema case, 9 documentation consistency
cases, cached build, typecheck/lint and formatting. A pinned Node-generated
preparation blob is verified in a synthetic ELF carrier; real injected native
executables and the optional Docker lane were not run.
* feat(artifacts): inventory and extract Node.js single executable application blobs
Adds a node-sea artifact reader that locates the NODE_SEA_BLOB payload in
Mach-O sections, ELF notes and PE RCDATA resources, decodes the blob
header, main script, optional snapshot and code cache, and named assets,
and extracts their stored bytes through the existing safe output tree.
The executable is never run. Resource-tree errors in a PE without a
NODE_SEA_BLOB name stay with native classification; truncated, unknown
or over-limit SEA declarations fail closed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016y53PdpyMAp9RSW65fatHe
* fix(artifacts): reuse PE resource facts and bound SEA asset tables
Move the bounded NODE_SEA_BLOB name probe into the shared PE resource
layout module so SEA admission uses the same header and section mapping
as the full parser; the layout reader now accepts a header prefix with
the file size. Bound SEA asset count and decoded name bytes before
records are created and report resource bounds as limit failures. Offer
the JavaScript next probe only for main scripts with a source suffix.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016y53PdpyMAp9RSW65fatHe
* fix(artifacts): make SEA metadata construction cancellable
---------
Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>