fix(native): preserve verification captures and separate path fragments
This commit is contained in:
@@ -84,3 +84,22 @@ it("preserves definitive invalidity when other components have operational failu
|
||||
expect(observed.status).toBe("invalid");
|
||||
expect(observed.diagnostics).toHaveLength(2);
|
||||
});
|
||||
|
||||
it("preserves unmatched prepared records and ignores unprefixed nested-name fragments as reasons", async () => {
|
||||
const path = "/Applications/Fixture.app";
|
||||
const capture = await new NativeFixtureRunner().run("codesign", [
|
||||
"--verify",
|
||||
path,
|
||||
]);
|
||||
if (!capture.ok) throw capture.error;
|
||||
const stderr = `--prepared:${path}/Contents/Helpers/odd\ninvalid signature\n${path}: permission denied\n`;
|
||||
const result = signatureVerification(
|
||||
{ ...capture.value, exitCode: 1, stderr },
|
||||
path,
|
||||
false,
|
||||
);
|
||||
expect(result.status).toBe("unknown");
|
||||
expect(result.prepared_nested_code).toEqual([`${path}/Contents/Helpers/odd`]);
|
||||
expect(result.raw_stderr).toBe(stderr);
|
||||
expect(result.diagnostics).toContain("invalid signature");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user