Skip to content

armgit / rea

Public Imported from GitHub
0

Reverse engineer anything with agents, from app behavior down to native binaries.

chore: merge main and resolve PR #910 conflicts

morluto4d2faef37b23
diff --cc tests/boundary/providers/native/nativeProvider.test.ts
index 0fb8276cc,fd265d048..68eeee7b3
--- a/tests/boundary/providers/native/nativeProvider.test.ts
+++ b/tests/boundary/providers/native/nativeProvider.test.ts
@@@ -278,29 -278,41 +278,64 @@@ describe("native macOS provider inspect
});
});
+describe("native plist defaults for iOS-style bundles", () => {
+ it("defaults to the Info.plist the bundle program was resolved from", async () => {
+ directory = await createTestTempDirectory("rea-native-flat-");
+ const app = join(directory, "Flat.app");
+ const executable = join(app, "Flat");
+ await mkdir(app, { recursive: true });
+ await writeFile(executable, "fixture");
+ await writeFile(join(app, "Info.plist"), "fixture");
+ const client = new NativeMacOSProvider(
+ new FixtureRunner(),
+ "darwin",
+ ).createClient({
+ ...machoTarget(executable, app),
+ bundleInfoPlist: join(app, "Info.plist"),
+ });
+
+ const plist = await client.execute("inspect_plist", {});
+ expect(plist.ok && plist.value.result).toMatchObject({
+ source_path: join(app, "Info.plist"),
+ });
+ });
+});
+
+ /** Emit entitlements whose dictionary also holds a legal `__proto__` key. */
+ class PrototypeEntitlementsRunner extends FixtureRunner {
+ override async run(tool: string, arguments_: readonly string[]) {
+ const result = await super.run(tool, arguments_);
+ if (!result.ok || !arguments_.includes("--entitlements")) return result;
+ const stdout =
+ '<?xml version="1.0" encoding="UTF-8"?><plist version="1.0"><dict><key>com.apple.security.app-sandbox</key><true/><key>__proto__</key><dict><key>com.apple.security.get-task-allow</key><true/></dict></dict></plist>';
+ return ok({
+ ...result.value,
+ stdout,
+ stdoutBytes: Buffer.byteLength(stdout),
+ });
+ }
+ }
+
+ describe("native signature entitlements", () => {
+ it("reports entitlement entries keyed __proto__ that the result omits", async () => {
+ const client = new NativeMacOSProvider(
+ new PrototypeEntitlementsRunner(),
+ "darwin",
+ ).createClient(machoTarget("/private/fixture"));
+
+ const signature = await client.execute("inspect_signature", {});
+
+ expect(signature.ok).toBe(true);
+ if (!signature.ok) return;
+ expect(signature.value.result).toMatchObject({
+ entitlements: { "com.apple.security.app-sandbox": true },
+ });
+ expect(signature.value.limitations).toContain(
+ "Entitlements: 1 dictionary entry keyed __proto__ was omitted because REA results cannot represent that key.",
+ );
+ });
+ });
+
describe("native dispatch metadata error results", () => {
it("preserves tagged cancellation and integrity failures", async () => {
directory = await createTestTempDirectory("rea-dispatch-errors-");