Skip to content

graff — a fast agentic coding harness in Zig: multi-provider, MCP, workflows, DGM evolution loop, TS/Python SDKs

Python
1.7 KB
Raw Blame
```diff
diff --git a/apps/native/electron/webauthn-profile.test.cjs b/apps/native/electron/webauthn-profile.test.cjs
--- a/apps/native/electron/webauthn-profile.test.cjs
+++ b/apps/native/electron/webauthn-profile.test.cjs
@@ -1,5 +1,12 @@
 test('accepts a profile until its expiration boundary', () => {
   const profile = fixture();
   profile.ExpirationDate = new Date(now + 1);
   assert.deepEqual(authorize(profile), { 'com.apple.application-identifier': appId });
 });
+
+test('rejects TEAM.* keychain groups when application-identifier is another bundle', () => {
+  const profile = fixture();
+  profile.Entitlements['com.apple.application-identifier'] = 'ABCDE12345.org.example.other';
+  assert.throws(() => authorize(profile), /application-identifier/);
+});
diff --git a/apps/native/electron/webauthn-signing.test.cjs b/apps/native/electron/webauthn-signing.test.cjs
--- a/apps/native/electron/webauthn-signing.test.cjs
+++ b/apps/native/electron/webauthn-signing.test.cjs
@@ -1,5 +1,12 @@
 test('invalid metadata fails before writing config or invoking signer', async () => {
   let called = false;
   await assert.rejects(signBundle({ app: 'Fixture.app', identity, teamId: '', readBundleId: () => bundleId, sign: () => { called = true; } }), /valid signing team/);
   assert.equal(called, false);
 });
+
+test('rejects a same-team profile for a different bundle before the signer runs', async () => {
+  let called = false;
+  await assert.rejects(signBundle({ app: 'Fixture.app', identity, teamId: 'ABCDE12345', readBundleId: () => bundleId, readProvisioningProfile: () => profile('org.example.other'), sign: () => { called = true; } }), /application-identifier/);
+  assert.equal(called, false);
+});
```