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
Merge remote-tracking branch 'origin/main' into feat/macho-encryption…
…-info

# Conflicts:
#	src/domain/managed/managedNativeVerificationMatch.ts
  • Loading branch information
chordpli committed Oct 22, 2026
commit 15db4e6ee3caba0578947536b286c11a4c42e639
57 changes: 3 additions & 54 deletions src/domain/managed/managedNativeVerificationMatch.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import { basename } from "node:path";

import canonicalize from "canonicalize";

import { parseEvidence } from "../evidence.js";
import { functionDossierSchema } from "../hopperValues.js";
import { retainedInspectMachoSchema } from "../native/nativeInspection.js";
import { digestCanonicalValue } from "../canonicalDigest.js";
import type { Evidence } from "../evidence.js";
import type { ManagedNativeObservationFacts } from "./managedNativeVerificationSource.js";
import type { ManagedNativeBoundaryInspection } from "./managedArtifact.js";
import type {
ManagedNativeVerificationResult,
Expand All @@ -17,55 +15,6 @@ type VerifiedPinvoke = {
readonly verification: PinvokeVerification;
};

const moduleName = (
evidence: ReturnType<typeof parseEvidence>,
): string | null => evidence.subject?.name ?? null;

const modulePath = (
evidence: ReturnType<typeof parseEvidence>,
): string | null => evidence.subject?.local_path ?? null;

const symbolsForEvidence = (
evidence: ReturnType<typeof parseEvidence>,
): {
readonly supported: boolean;
readonly symbols: readonly NativeSymbol[];
} => {
if (evidence.operation === "inspect_macho") {
const result = retainedInspectMachoSchema.parse(evidence.normalized_result);
return {
supported: true,
symbols: result.exports.items.map((symbol) => ({
evidence_id: evidence.evidence_id,
operation: evidence.operation,
name: symbol.name,
address: symbol.address,
module_name: moduleName(evidence),
module_path: modulePath(evidence),
source: "macho-export" as const,
})),
};
}
if (evidence.operation === "analyze_function") {
const dossier = functionDossierSchema.parse(evidence.normalized_result);
return {
supported: true,
symbols: [
{
evidence_id: evidence.evidence_id,
operation: evidence.operation,
name: dossier.procedure.name,
address: dossier.procedure.address,
module_name: moduleName(evidence),
module_path: modulePath(evidence),
source: "function-dossier" as const,
},
],
};
}
return { supported: false, symbols: [] };
};

export const collectNativeSymbols = (
observations: readonly ManagedNativeObservationFacts[],
): {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { MANAGED_NATIVE_VERIFICATION_EXAMPLE } from "../../contracts/managed/man
import { createEvidence } from "../evidence.js";
import { jsonValueSchema } from "../jsonValue.js";
import { inspectMachoSchema } from "../native/nativeInspection.js";
import { collectNativeSymbols } from "./managedNativeVerificationMatch.js";
import { readManagedNativeVerificationSource } from "./managedNativeVerificationSource.js";

describe("managed/native verification symbol collection", () => {
describe("managed/native verification source", () => {
it("accepts inspect_macho Evidence retained before encryption reporting", () => {
const original = MANAGED_NATIVE_VERIFICATION_EXAMPLE.native_observations[0];
if (original === undefined)
Expand All @@ -23,9 +23,15 @@ describe("managed/native verification symbol collection", () => {
rawResult: null,
limitations: [],
});
const collected = collectNativeSymbols([evidence]);
expect(collected.accepted).toBe(1);
expect(collected.symbols.map(({ name }) => name)).toEqual(
const source = readManagedNativeVerificationSource({
managed_boundaries:
MANAGED_NATIVE_VERIFICATION_EXAMPLE.managed_boundaries,
native_observations: [evidence],
});
if (!source.ok) throw source.error;
const [observation] = source.value.nativeObservations;
expect(observation?.supported).toBe(true);
expect(observation?.symbols.map(({ name }) => name)).toEqual(
legacy.exports.items.map(({ name }) => name),
);
});
Expand Down
4 changes: 2 additions & 2 deletions src/domain/managed/managedNativeVerificationSource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { analysisInputErrorFromIssues } from "../inputIssueProjection.js";
import { readEvidence, readEvidencePayload } from "../evidenceValidation.js";
import { err, ok, type Result } from "../result.js";
import { functionDossierSchema } from "../hopperValues.js";
import { inspectMachoSchema } from "../native/nativeInspection.js";
import { retainedInspectMachoSchema } from "../native/nativeInspection.js";
import {
managedNativeBoundaryInspectionSchema,
type ManagedNativeBoundaryInspection,
Expand Down Expand Up @@ -55,7 +55,7 @@ const readNativeObservation = (
const evidence = read.value;
if (evidence.operation === "inspect_macho") {
const payload = readEvidencePayload(
inspectMachoSchema,
retainedInspectMachoSchema,
evidence.normalized_result,
);
if (!payload.ok) return payload;
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.