fix(plist): report omitted __proto__ entries in signatures and Interface Builder
#885 decodes XML plists that contain a __proto__ key by omitting those entries, but signature entitlements and Interface Builder plists dropped the omission count. inspect_signature returned an entitlement set that looked complete, and archive_decode stayed complete. Both now report the omission: a signature limitation, and a partial archive_decode facet with reason dictionary_entries_omitted and a per-document limitation. The placeholder that stands in for __proto__ was reserved against the raw XML text, so an entity-encoded key such as __rea_prototype_key__ decoded to the placeholder and was omitted as if it were __proto__. The placeholder is now reserved against the decoded text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
faaee693d5
commit
6729ee7636
@@ -111,6 +111,34 @@ describe("bounded Interface Builder archive decoding", () => {
|
||||
expect(result.graph.truncated).toBe(true);
|
||||
});
|
||||
|
||||
it("marks archive decoding partial when __proto__ entries are omitted", async () => {
|
||||
const root = await createTestTempDirectory("rea-ib-test-");
|
||||
const bundle = join(root, "Example.app");
|
||||
const resources = join(bundle, "Contents", "Resources");
|
||||
await mkdir(resources, { recursive: true });
|
||||
await writeFile(
|
||||
join(resources, "Prototype.nib"),
|
||||
'<?xml version="1.0"?><plist version="1.0"><dict><key>$archiver</key><string>NSKeyedArchiver</string><key>__proto__</key><string>hidden</string><key>$objects</key><array><string>$null</string></array><key>$top</key><dict/></dict></plist>',
|
||||
);
|
||||
|
||||
const result = await analyzeInterfaceBuilderBundle({
|
||||
bundlePath: bundle,
|
||||
targetSha256: "f".repeat(64),
|
||||
});
|
||||
|
||||
expect(result.graph.coverage).toContainEqual(
|
||||
expect.objectContaining({
|
||||
facet: "archive_decode",
|
||||
status: "partial",
|
||||
reason: "dictionary_entries_omitted",
|
||||
}),
|
||||
);
|
||||
expect(result.graph.truncated).toBe(true);
|
||||
expect(result.limitations).toContain(
|
||||
"Contents/Resources/Prototype.nib: 1 dictionary entry keyed __proto__ was omitted because REA results cannot represent that key.",
|
||||
);
|
||||
});
|
||||
|
||||
it.skipIf(process.platform !== "darwin" || !existsSync("/usr/bin/ibtool"))(
|
||||
"decodes an Xcode-compiled storyboard NIB and recovers its UI routes",
|
||||
async () => {
|
||||
|
||||
Reference in New Issue
Block a user