Skip to content

fix(native): inspect mixed-signature Mach-O slices - #701

Merged
kaoru0822-kitauji merged 1 commit into
morluto:mainfrom
kaoru0822-kitauji:fix/mixed-signature-slices
Oct 6, 2026
Merged

kaoru0822-kitauji merged 1 commit into
morluto:mainfrom
kaoru0822-kitauji:fix/mixed-signature-slices

Conversation

@kaoru0822-kitauji

Copy link
Copy Markdown
Collaborator

Summary

  • treat a nonzero supplemental codesign query as an observation only when its captured output says the code object is unsigned
  • when aggregate signature data proves a mixed-signature universal Mach-O, probe each displayed architecture and report unsigned slices explicitly
  • retain every per-slice probe, including nonzero unsigned observations, in exact command provenance
  • preserve hard failures for unrelated nonzero codesign output

Closes #684.

Evidence

For the reported x86_64 + arm64/arm64e inputs, aggregate codesign -d --verbose=4 succeeds, while codesign -d -r- exits 1 with code object is not signed at all. The provider previously set acceptNonZero only from the successful aggregate display, so the runner converted that expected supplemental observation into a provider failure before its output could be classified.

The regression replays that exact exit/output combination through the production runner seam for both arm64 and arm64e displays. It asserts a typed signed result, an explicit Unsigned Mach-O slices: x86_64. limitation, and per-slice provenance. A control proves unrelated nonzero supplemental output still returns ProviderAdapterError; the existing fully unsigned and missing-file controls continue to pass.

Validation

Passed:

  • npx vitest run tests/boundary/providers/native/nativeInventory.golden.test.ts --project boundary (4 tests)
  • signature-focused native boundary selection (5 tests)
  • npm exec [email protected] -- tsc --noEmit
  • npm run lint
  • npm run knip
  • npm run metadata:check
  • targeted oxfmt --check for both changed files

Materially unverified:

  • Real codesign execution on macOS was unavailable in this Linux environment.
  • The repository's TypeScript 7 binary panics while resolving /proc/self/exe, so npm run check could not complete; the stable TypeScript compiler passed.
  • Whole-tree formatting and two process-spawn native tests hit the same sandbox's missing process/memory facilities. Targeted formatting and all signature-focused tests passed.

@kaoru0822-kitauji
kaoru0822-kitauji force-pushed the fix/mixed-signature-slices branch 2 times, most recently from b597b85 to 9b78c4f Compare October 6, 2026 08:23
@kaoru0822-kitauji
kaoru0822-kitauji force-pushed the fix/mixed-signature-slices branch 2 times, most recently from 8487495 to df6c9d6 Compare October 6, 2026 09:45
@kaoru0822-kitauji
kaoru0822-kitauji force-pushed the fix/mixed-signature-slices branch from df6c9d6 to 66f3cfa Compare October 6, 2026 11:59
@kaoru0822-kitauji
kaoru0822-kitauji merged commit 1dccd0d into morluto:main Oct 6, 2026
19 checks passed
darsrc pushed a commit to darsrc/rea that referenced this pull request Oct 10, 2026
…ture-slices

fix(native): inspect mixed-signature Mach-O slices
@morluto morluto added bug Something isn't working area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior labels Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] inspect-signature fails with execution_failure on universal Mach-O binaries with a signed arm64/arm64e slice and an unsigned x86_64 slice

2 participants