fix(native): keep path bytes out of signing reason classification

This commit is contained in:
morluto
2026-10-08 18:46:13 +08:00
parent f1f2aa3d86
commit 670b657d0e
6 changed files with 57 additions and 14 deletions
+17
View File
@@ -50,6 +50,23 @@ describe("CodeDirectory flags", () => {
});
describe("derived security facets", () => {
it("does not apply platform policy for a reported zero platform byte", () => {
expect(
states(
derive({
signed: true,
codeDirectory: directory(0x2, 0),
entitlements: null,
entitlementsKnown: true,
appleOrigin: true,
}),
),
).toMatchObject({
"library-validation": "not-enforced",
"dyld-environment-variables": "honored",
"debugger-attach": "allowed",
});
});
it("treats unsigned and plain ad hoc code as unrestricted", () => {
for (const signed of [false, true])
expect(