Files
reverse-engineering-anything/tests/boundary/cli
26bec6f653 fix(artifacts): name no slice in trace-dylib-resolution Evidence (#11838)
trace_dylib_resolution Evidence named the slice the session happened to
open, not what was traced. On Apple silicon, `rea trace-dylib-resolution
/bin/ls --architecture x86_64` returned a subject selecting the arm64e
slice (offset 65536, architecture "arm64") while its parameters and
roots said x86_64. Whole-file traces of universal images and app bundle
traces also carried that host slice.

Root cause: the artifact provider built the execution without a
subject, and bindExecutionTarget binds such an execution, like any
subject that names the target's own bytes without a selection, to the
open target's selection. A provider had no way to state that an
observation covers the whole file.

EvidenceSubjectTarget.selection now accepts null, meaning the
observation selects nothing even though a session opened one slice.
bindExecutionTarget already inherited a selection only when none was
stated; its comment now says so. The trace states selection: null. This
matches inspect-binary-hardening and the other whole-file inspectors,
which already record no selection for a universal image.

Validation (macOS arm64, Node 24.22.1):
- New CLI boundary regression: a universal arm64 + x86_64 tool, traced
  whole and with --architecture x86_64, has a subject with no
  architecture or selection and the expected roots. Before this change
  the subject carried the opened slice.
- dylibResolutionCli and dylibResolutionMcp: 44 passed, 2 skipped.
- Suites that exercise subject binding (binarySession,
  analysisEvidenceAdapterParity, artifactMcp, bundleResourceRootCliMcp,
  appleBundleTraversalCoverage, AppBundleResourceRoot,
  ArtifactComparisonEvidence): 144 passed, 1 skipped.
- evidence, BinarySession and ArtifactProvider unit tests: 186 passed.
- Real /bin/ls trace with --architecture x86_64: subject selection and
  architecture null, roots [x86_64]. Format, typecheck, lint and
  architecture guards pass.

Not changed: inspect-macho, inspect-signature and
inspect-native-dispatch-metadata also record the opened slice for a
universal image; whether each examines only that slice was not checked.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
2026-11-19 09:07:16 +08:00
..