Commit Graph

1050 Commits

Author SHA1 Message Date
Vincent Koc f2506d0378 refactor(artifacts): share extractable role container capabilities (#16032) 2026-12-02 15:46:22 +00:00
Vincent Koc 31082cacc9 refactor(macos): share package archive metadata merging (#16014) 2026-12-02 14:53:58 +00:00
Vincent Koc 4e4b508509 refactor(bun): share graph suffix reads (#15975) 2026-12-02 13:29:49 +00:00
Vincent Koc 96beae708e refactor(media): simplify RIFF XMA2 framing state (#15961) 2026-12-02 13:16:29 +00:00
Vincent Koc 13feb8c1be refactor(unityfs): share compression codec selection (#15957) 2026-12-02 13:13:02 +00:00
Vincent Koc 2c550d3929 refactor(godot): share desktop PCK header facts (#15907) 2026-12-02 12:02:03 +00:00
Vincent Koc 8333d1c655 refactor(iso9660): reuse unpaired surrogate matcher (#15902) 2026-12-02 11:48:43 +00:00
Vincent Koc b9dd76c687 refactor(wxapkg): retain one produced record per package member (#15887) 2026-12-02 11:06:30 +00:00
Vincent Koc 2601a0f615 refactor(tar): share gzip carrier tail accounting (#15885) 2026-12-02 10:54:13 +00:00
Vincent Koc 0d4cddc698 refactor(fit): share property string decoding (#15876) 2026-12-02 10:30:18 +00:00
Vincent Koc 4875c24b49 refactor(switch): share executable root report projection (#15867) 2026-12-02 09:56:25 +00:00
Vincent Koc 2f19d0527a refactor(apple): share bundle reader cleanup ownership (#15865) 2026-12-02 09:46:28 +00:00
ShuaixinHuang 76c4e7fa18 perf(artifacts): verify and decode journal header pages in one pass (#15835)
* perf(artifacts): verify and decode journal header pages in one pass

* test(artifacts): verify journal cancellation during header streaming

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-12-02 09:02:09 +00:00
Saim Shafique ebf4efaabd fix(artifacts): treat GLB data URI images as embedded (#15654) 2026-12-02 16:53:19 +08:00
Vincent Koc d70e3c0afe refactor(inventory): forward reader-owned snapshot facts (#15846) 2026-12-02 08:40:37 +00:00
Vincent Koc 6ac20743d0 refactor(pyinstaller): share entry source metadata (#15843) 2026-12-02 08:29:50 +00:00
Vincent Koc 3fdef14c43 test(artifacts): share pre-admission cancellation checks (#15817) 2026-12-02 06:53:58 +00:00
Vincent Koc 624d2f1ec1 fix(artifacts): preserve FAT table coverage for unsupported Mach-O slices (#15802)
* fix(artifacts): preserve FAT table coverage for unsupported Mach-O slices

* test(artifacts): check retained FAT table extent on truncated slices
2026-12-02 14:51:45 +08:00
Vincent Koc da6199ed90 test(artifacts): share UnityFS decoder cancellation setup (#15812) 2026-12-02 06:42:59 +00:00
Vincent Koc 68d26d5f4f test(artifacts): share PackageInfo XAR fixture setup (#15808) 2026-12-02 06:29:07 +00:00
Vincent Koc bdab4b8565 test(ogg): reuse Opus packet fixtures (#15788) 2026-12-02 05:57:18 +00:00
ShuaixinHuang b67c7b0eca perf(zip): use the bundled decoder for small deflated members (#15753)
* perf(zip): use the bundled decoder for small deflated members

* test(zip): cover both small Deflate size boundaries

* test(zip): verify the Deflate cutoff in its routing fixture

---------

Co-authored-by: ShuaixinHuang <197200901+ShuaixinHuang@users.noreply.github.com>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-12-02 05:57:10 +00:00
hhang ff188a3d29 fix(artifacts): check packed DDS payload extents (#15731)
Co-authored-by: hhang <169027046+xu91102@users.noreply.github.com>
2026-12-02 13:45:02 +08:00
Anurag Singh d4cefde290 fix(artifacts): keep universal Mach-O coverage unknown when bytes lie outside every slice
The universal Mach-O reader reported complete coverage whenever lipo and
the FAT table agreed, without comparing the slice ranges with the file.
Bytes appended after the last slice, or placed before a slice beyond the
padding its alignment needs, were never exposed and nothing said so.

readMachoImage now reports where the FAT table ends, including Apple's
hidden ARM64 row. fatUnaccountedBytes measures the bytes outside the
table, every slice and each slice's alignment padding, following lipo's
placement of every slice at the first offset its alignment allows. Any
such bytes keep coverage unknown with a limitation that counts them and
names the first offset. Without a FAT parse only the fixed header is
known, which measures leading bytes conservatively.

The FAT fixture no longer pads its last slice, matching lipo output; the
two tests that needed bytes past the last slice now add them explicitly.

Fixes #15534
2026-12-02 13:41:41 +08:00
Vincent Koc 134af8fa5a refactor(plist): share XML signature delimiter checks (#15784) 2026-12-02 05:23:06 +00:00
Vincent Koc 3f8d97f4bb refactor(node-sea): share budgeted table text reading (#15776) 2026-12-02 04:57:57 +00:00
Vincent Koc fcac9c09d7 refactor(nib): share length-prefixed name parsing (#15758) 2026-12-02 03:00:26 +00:00
Vincent Koc 67a4531be2 refactor(bink): share table layout results (#15736) 2026-12-02 02:18:21 +00:00
Vincent Koc ed6f32720c test(gpu-assets): share GLB fixture envelopes (#15732) 2026-12-02 02:06:54 +00:00
gensokyo-dev 3474dd6716 fix(artifacts): report a DDS with no payload bytes as truncated
Every DDS surface holds at least one texel, so a file that ends at its
payload offset is truncated even when the format's exact size is not
derived, such as planar video formats.

Fixes #15674

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-12-02 09:03:56 +08:00
gensokyo-dev ea8b79b362 fix(artifacts): derive the DDS payload size for every fixed-size DXGI format
The DXGI table listed only RGBA32, RGBA16 and RGBA8/BGRA8 formats, so a
DX10 texture in R8_UINT, R16_FLOAT, R32_FLOAT, RG8 and other single- or
two-channel formats had no expected payload size and passed the extent
check even with no pixel data. List every format with a fixed number of
bytes per texel.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-12-02 09:03:56 +08:00
morluto 4c3159568c fix(limits): report a limit requirement only when the reader knows it (#15685)
* fix(limits): report a limit requirement only when the reader knows it

OCI image layouts, SWF movies, Zstandard frame walks, LZMA streams without
a declared size, XAR TOCs, cpio archives and VSIX/NuGet metadata members
stopped at the first excess and reported that stopping counter or running
sum as the requirement. Raising the limit to it failed again one step later.

None of those inputs declares a total before the stop, so the refusal now
leaves the requirement unknown. A declared size or count (ZIP member sizes,
the ZIP entry total, SWF FileLength, an LZMA declared size) is still
reported, and VSIX/NuGet now pass every such requirement as required_value
instead of only those above the control's maximum.

Fixes #15647

* test(oci): assert descriptor limits report no requirement
2026-12-02 00:01:47 +00:00
Vincent Koc 374f392e15 refactor(node-sea): share ELF note table scanning (#15644) 2026-12-01 22:26:18 +00:00
Vincent Koc a3a57ef998 test(pyinstaller): share stored PYZ member fixtures (#15643) 2026-12-01 22:13:55 +00:00
morluto a5bf175e06 fix(artifacts)!: report reader admission limits as resource_constraint (#15588)
* fix(artifacts)!: report reader admission limits as resource_constraint

An artifact read refused by a reader limit (artifact_limits.*) or a
release-fixed allowance was code partial, which the error contract
reserves for a result cut short by a delivery or decode limit. The
read was refused at admission, so it is now resource_constraint, like
every other admission limit. The retry class is unchanged: change_first
when the limit can be raised, never when it cannot. A limit without
admission facts, such as a parser budget, stays partial.

The reader's own recovery, which names the parameter, its supported
range and the next step, and the reader_limit fact are unchanged.

Refs #15323

BREAKING CHANGE: artifact refusals with details.reason "limit" and a
details.reader_limit or fixed allowance report code and category
resource_constraint instead of partial. Match resource_constraint, or
read details.reason and details.reader_limit, which are unchanged.

* fix(errors): catalogue each artifact admission limit with the retry it returns

The catalogue listed one row for reader limits and fixed allowances with
change_first, though a fixed allowance and a reader limit already at its
maximum return never, and the release-fixed row still said partial.
List the raisable reader limit, the reader limit at its maximum and the
release-fixed allowance as separate rows, and test each row against the
error it projects.
2026-12-01 17:10:56 -05:00
Vincent Koc ecc6ba0f96 refactor(deno): share record copying in the reader (#15641) 2026-12-01 21:52:13 +00:00
morluto 0f1bedc65a fix(packages): report the declared ZIP entry total in entry-count refusals (#15634)
* fix(packages): report the declared ZIP entry total in entry-count refusals

inspect_vsix_package and inspect_nuget_nupkg reported the stopping counter
(max_entries + 1) as the requirement, so retrying with it failed one entry
later each time. The end-of-central-directory record declares the total
before enumeration; zipDirectoryRecords now carries that total with each
record, and the VSIX, NuGet and artifact ZIP readers report it as the
requirement (artifact_limits.zip.member_count now reports required_value).

inspect_pe_imports said the image "declares" max + 1 descriptors or
functions. Those tables are null-terminated and declare no total, so the
refusal now says the count is above the allowance and leaves the total
unknown.

Refs #15608

* test(zip): cover the ZIP64 entry total in member-count refusals
2026-12-01 16:35:49 -05:00
morluto 05a9e8fb66 fix(desktop): recognize unpacked resources/app Electron applications (#15632)
* fix(desktop): recognize unpacked resources/app Electron applications

Electron loads an application from resources/app.asar, resources/app or
resources/default_app.asar. The desktop path convention recognized only the
ASAR names, so VS Code and GitHub Desktop, which ship an unpacked
resources/app folder, got no Electron candidate and only .NET probes for the
managed helpers they bundle.

The convention owner now reports the Electron application layout and its
depth for both forms. inspect_desktop_application emits an
electron-app-directory-convention fact for resources/app/package.json, adds it
to the Electron candidate and offers analyze_javascript_application on the
folder. Electron application probes are now application priority, so bundled
managed or native helpers no longer lead next_probes. Release exposure reads
the layout folder from the same convention, so an unpacked build names its
fuse host like an ASAR build.

* fix(desktop): derive Electron probes before bundled managed helpers

A bundled managed helper with its own .runtimeconfig.json, such as Git
Credential Manager in GitHub Desktop, is application priority too. Its probe
was derived first, so the stable priority sort still put it ahead of the
Electron application. Derive the Electron candidate and probes first.
2026-12-01 16:35:04 -05:00
morluto 3ff4a50481 fix(artifacts/ar): list members recorded under absolute paths (#15631)
lib.exe records the absolute object path it was given, such as
C:\build\Release\decode.obj, as the member name. The ar reader passed
that name to the shared path validator, which rejects absolute names,
so every such member was dropped and a static library built this way
looked empty with unknown coverage.

An absolute member name names a build-host location, not archive
structure. The reader now lists it under its last component, as
`llvm-ar x` writes it, keeps the recorded name in source_path, and adds
one reader-level limitation counting such members. Coverage stays
complete. A last component that is itself unsafe (empty, `.`, `..`)
is still refused and counted as before.

The absolute-name rule now has one owner in ArtifactPaths:
absoluteArtifactPathBasename classifies drive-absolute and POSIX-rooted
names, and normalizeArtifactPath uses it for its refusal.

Fixes #15618
2026-12-01 21:20:51 +00:00
Vincent Koc f8ed8c70af test(pyinstaller): reuse interned PYZ fixture builder (#15617) 2026-12-01 20:48:21 +00:00
Vincent Koc 39ec1f7113 test(deno): share Intel trailer fixture records (#15607) 2026-12-01 20:35:19 +00:00
Vincent Koc ab426d590b refactor(artifacts): share exact preparation reads (#15579) 2026-12-01 18:55:05 +00:00
Vincent Koc 7c02d53b1f test(dos): share padded MZ image fixture (#15575) 2026-12-01 18:27:39 +00:00
morluto a69837647b test: fix false-pass assertions, consolidate suites, and close coverage gaps (#15519)
* test: fix false-pass assertions, consolidate suites, and close coverage gaps

* test: finish signal-0, unchecked close_binary, and vacuous .every() audit

* test(registration): run shared capture inside test so child inherits scaled deadline

* test(artifacts): bind final verification fault to reader source and post-read phase
2026-12-01 18:10:12 +00:00
morluto 9fabd0323f test(providers): assert the specific refusal behind each bare toThrow (#15528)
* test(providers): assert the specific refusal behind each bare toThrow

Replace bare toThrow() in adapter, artifact, parser and server tests with the errno code of a removed path or closed descriptor, the Zod issue path and code per case, the parse failure kind and message or reason per case, the cleanup retry failure and the resources it still holds, or the contract message each refusal reports.

* test(artifacts,ghidra): assert retained cleanup resources instead of their message

* test(artifacts): assert the keyed-archive truncation as its parse failure facts
2026-12-01 12:49:19 -05:00
Vincent Koc a7000d5088 test(ubi): share volume table padding fixture (#15529) 2026-12-01 16:40:39 +00:00
morluto 6ac87697e7 fix(errors)!: make retry_class the only retry field of a target failure (#15450)
* fix(errors)!: make retry_class the only retry field of a target failure

A target failure reported two retry fields: its own `retry` hint
(`none | backoff | after_change`) and the `retry_class` every error
carries. They mapped one to one, so readers had to reconcile both.
`retry_class` is now the single owner: the target-failure table declares
it directly, the projection no longer emits `retry`, the error schema no
longer accepts it, and the CLI recovery rewrite reads `retry_class`.

BREAKING CHANGE: target failures no longer include `retry`, and the
error schema rejects it. Read `retry_class` instead: `backoff` is
`same_call`, `after_change` is `change_first` and `none` is `never`.

* test(errors): readers reject the removed target-failure retry field
2026-12-01 10:36:15 -05:00
morluto 6549264a54 fix(errors): name the next step for schema-valid refusals, including missing files (#15435)
* fix(errors): report a missing selected file with its next step, not the schema

Nine readers hand-built their own copy of the selected-file refusal
(access denied, or an input issue for ENOENT, ENOTDIR, ELOOP and the
other path errnos) instead of using the shared
projectSelectedArtifactFileFailure. The copies left out the conforming
outcome and next step, so a well-formed path to a missing file was
presented as a schema mismatch with inspect_input_contract.

API contract, APK signature, byte entropy, Electron fuse, Playwright
trace, NTFS journal, release exposure, Android mapping and web capture
reads now use the shared owner. A missing OCI image-layout directory
names a directory as its next step.

The first-contact sweep lists none of these as known failures any more;
#15372 already fixed the other 35 entries and the stale-revision replay.

Refs #15312

* fix(errors): give the remaining schema-valid refusals their next step

These refusals accepted a well-formed request and still sent the caller
back to the input schema:

- update_analysis_settings with a stale expected_revision now names
  inspect_analysis_settings and the current revision.
- inspect_electron_fuses on an app or file that is not Electron names
  what to select; capture_electron_scenario reports the same refusal
  on executable_path instead of path.
- inspect_analysis_view on a multi-record Evidence bundle without
  source.evidence_id, or with an absent one, says to pick a listed id.
- extract_uefi_firmware with an unmapped or ambiguous target names
  inspect_uefi_firmware or target.source_stream.
- inspect_labview_artifact on a file without LabVIEW RSRC data names
  what to select.

Refs #15312
2026-12-01 10:36:08 -05:00
Vincent Koc 2cb2c80ce0 refactor(macos-pkg): report XAR recovery at refusal (#15497) 2026-12-01 15:28:42 +00:00
Vincent Koc 54e6bbdd20 refactor(unityfs): share compressed block decoding (#15490) 2026-12-01 14:56:03 +00:00