Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
cd38a59
refactor(macho): extract non-throwing container and slice load-comman…
chordpli Oct 20, 2026
2b41ca6
feat(macho): report per-slice encryption status in inspect_macho
chordpli Oct 20, 2026
f210a4f
fix(macho): keep slice facts and failures under large tables and clos…
chordpli Oct 20, 2026
ee6f565
Merge remote-tracking branch 'origin/main' into feat/macho-encryption…
chordpli Oct 20, 2026
c128c72
Merge remote-tracking branch 'origin/main' into feat/macho-encryption…
chordpli Oct 20, 2026
c6c8c75
Merge remote-tracking branch 'origin/main' into feat/macho-encryption…
chordpli Oct 21, 2026
15db4e6
Merge remote-tracking branch 'origin/main' into feat/macho-encryption…
chordpli Oct 22, 2026
c54ff26
Merge remote-tracking branch 'origin/main' into feat/macho-encryption…
chordpli Oct 24, 2026
0d506e2
fix(macho): map encrypted ranges only within segment VM extents
chordpli Oct 25, 2026
3bd1541
Merge remote-tracking branch 'origin/main' into HEAD
Oct 26, 2026
611ae1e
fix(macho): read encryption through the admitted descriptor facts
chordpli Oct 26, 2026
7e6d57f
fix(macho): retain a finished report when the target close fails
chordpli Oct 26, 2026
9c74d8d
Merge remote-tracking branch 'origin/main' into tmp5359
chordpli Oct 26, 2026
d95f4e3
Merge remote-tracking branch 'origin/main' into tmp5359
chordpli Oct 26, 2026
5a22d73
Merge remote-tracking branch 'origin/main' into tmp5359
chordpli Oct 26, 2026
811c47d
Merge remote-tracking branch 'origin/main' into tmp5359
chordpli Oct 26, 2026
08ed647
Merge remote-tracking branch 'origin/main' into tmp5359
chordpli Oct 27, 2026
29f37e6
Merge remote-tracking branch 'origin/main' into tmp5359
chordpli Oct 27, 2026
d3f63a8
test(native): supply readEncryption in merged dyld refusal cases
chordpli Oct 27, 2026
014a868
test(views): bind the Mach-O encryption page to its facet
chordpli Oct 27, 2026
c2c2e93
Merge remote-tracking branch 'origin/main' into tmp5359
chordpli Oct 28, 2026
7fb4355
Merge remote-tracking branch 'origin/main' into tmp5359
chordpli Oct 28, 2026
3476a90
Merge remote-tracking branch 'origin/main' into feat/macho-encryption…
chordpli Oct 29, 2026
13904db
fix(macho): bound encryption commands and range mapping across slices
chordpli Oct 29, 2026
1bc25f6
Merge remote-tracking branch 'origin/main' into feat/macho-encryption…
chordpli Oct 29, 2026
27edcc0
style(macho): format encryption reader and binding test
chordpli Oct 29, 2026
c806969
fix(macho): stop retaining segments past the mapping budget
chordpli Oct 29, 2026
26280c7
feat(macho): preserve per-slice encryption facts and mapping budgets
gensokyo-dev Oct 29, 2026
90ee1c6
chore(macho): align encryption reporting with current main
gensokyo-dev Oct 29, 2026
0eba2e7
docs(macho): clarify retained mapping allowance
gensokyo-dev Oct 29, 2026
5ffb40d
fix(ci): own the Mach-O encryption test in Apple scope
gensokyo-dev Oct 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat(macho): report per-slice encryption status in inspect_macho
inspect_macho now reports the LC_ENCRYPTION_INFO(_64) state of every
slice in a new `encryption` collection, read in process from load
commands without reading code bytes.

- Each slice is encrypted, not-encrypted, absent, malformed or unknown.
  Absent requires a completed load-command walk; malformed and unknown
  carry a reason and keep commands read before the failure.
- The named range is end-exclusive in slice and input-file coordinates
  and maps to file-backed segment fragments, VM addresses and the
  overlapping nonempty sections.
- A ciphertext range adds a limitation naming its input-file bytes.
- The in-process read and the native tools are bracketed by one regular
  file descriptor and stat identity checks; a change reports
  artifact_changed. A missing or inaccessible target keeps the tool
  facts and reports encryption as non-exhaustive, never absent.
- Retained Evidence recorded before this field is parsed by the owning
  schema and reports encryption as unknown in the macho view and in
  managed/native verification.

Fixes #4306
  • Loading branch information
chordpli committed Oct 20, 2026
commit 2b41ca6a429bebc7d15aa5bff1873ea4d626b8e3
10 changes: 6 additions & 4 deletions docs/mcp-contracts.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,12 @@ reach WABT or change the original source Evidence ID.
Completed `inspect_macho` Evidence supports a summary and
`view: {kind: "macho", facet: "exports", offset: 0, limit: 64}`. Facets are
`entrypoints`, `architectures`, `build_metadata`, `load_commands`,
`dependencies`, `imports`, `exports`, `segments`, and `provenance`; pages return
the original rows. The summary keeps the selected slice, header fields and UUID,
and replaces each collection with its returned count, reported total and
`exhaustive` flag. Each page repeats the paged collection's `source_total` and
`dependencies`, `imports`, `exports`, `segments`, `encryption`, and
`provenance`; pages return the original rows. Evidence retained before
`encryption` was reported pages no encryption rows and reports that collection
as non-exhaustive with an unknown status. The summary keeps the selected
slice, header fields and UUID, and replaces each collection with its returned
count, reported total and `exhaustive` flag. Each page repeats the paged collection's `source_total` and
`source_exhaustive`; exhausting a non-exhaustive collection does not establish
that unreturned symbols are absent. Large frameworks return megabytes of
symbols (Electron Framework: 2.5 MB of imports and exports, 3.3 KB as a
Expand Down
25 changes: 25 additions & 0 deletions docs/native-investigation.md
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,31 @@ segments do not produce file ranges. When the selected slice's container offset
is unknown, those mapped locations are omitted with an explicit limitation;
architecture inventory locations remain available.

`inspect_macho.encryption` reports the `LC_ENCRYPTION_INFO(_64)` state of every
slice, not only the selected one, read from load commands without reading code
bytes. A slice is `encrypted` when its single encryption command has a nonzero
Comment thread
greptile-apps[bot] marked this conversation as resolved.
Resolved
`cryptid`, `not-encrypted` when `cryptid` is zero, and `absent` only when every
load command was read and none was an encryption command. A command whose width
or `cmdsize` contradicts the image, more than one such command, or a range past
the slice is `malformed`; a slice whose commands could not be fully read is
`malformed` or `unknown` with a reason, keeping any commands seen before the
failure. Each slice's `range` is end-exclusive in slice and input-file
coordinates and maps to file-backed segment fragments, VM addresses and the
overlapping nonempty sections; bytes outside every segment remain unmapped
fragments. `architecture` is the lipo name of the record at the same offset,
size and CPU identity, and is null when no single record matches. A ciphertext
range adds a limitation naming its input-file bytes, because disassembly,
decompilation, strings and references derived from them do not describe
program code. The in-process read holds one regular-file descriptor while the
native tools read the path; the descriptor's and the path's stat identity
(device, inode, size, mode and timestamps) must match before and after inspection,
or the call reports `artifact_changed`. The comparison checks only those
endpoints and does not re-hash the bytes, so a path swapped and restored with
identical metadata while the tools ran is not detected. A symlinked,
non-regular or changing target is refused. A target that cannot be opened keeps the
tool facts and reports the encryption collection as non-exhaustive with the
missing-file or access failure, never as absent.

Hopper's `address_to_file_offset` combines the native image-relative mapping with
original-file coordinates only after checking the source against the session's
SHA-256. FAT tables and embedded Mach-O headers come from that same hashing pass.
Expand Down
Loading
Loading