Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
test(auth): respect restrictive public key creation permissions
Alfredo Lopezdd9a24a74f61
diff --git a/control-api/package-lock.json b/control-api/package-lock.jsonindex 37384ce6c..f7155b2dc 100644--- a/control-api/package-lock.json+++ b/control-api/package-lock.json@@ -1,12 +1,12 @@{"name": "clerum-control-api",- "version": "0.1.710",+ "version": "0.1.711","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "clerum-control-api",- "version": "0.1.710",+ "version": "0.1.711","dependencies": {"@clerum/display-field": "file:../packages/display-field","@clerum/grok-provider-attempt-contract": "file:../packages/grok-provider-attempt-contract",diff --git a/control-api/package.json b/control-api/package.jsonindex 91e23bfe5..f094b1583 100644--- a/control-api/package.json+++ b/control-api/package.json@@ -1,6 +1,6 @@{"name": "clerum-control-api",- "version": "0.1.710",+ "version": "0.1.711","description": "Internal Clerum control plane REST API + UI for managing CRDs and secrets","main": "dist/main.js","engines": {diff --git a/control-api/test/devSigningKeys.test.ts b/control-api/test/devSigningKeys.test.tsindex 374e430a8..61cdb6024 100644--- a/control-api/test/devSigningKeys.test.ts+++ b/control-api/test/devSigningKeys.test.ts@@ -353,7 +353,13 @@ describe('devSigningKeys persistence contract', () => {const expected = createPublicKey(signing).export({ type: 'spki', format: 'pem' }).toString()const fd = openSync(join(store, 'rpc.public.pem'), 'r')try {- expect(fstatSync(fd).mode & 0o777).toBe(0o644)+ // publishMaterial requests 0644 for public material but leaves it subject+ // to the process umask; the store only forbids group/other write, so a+ // hardened umask such as 077 legitimately yields 0600 here.+ const mode = fstatSync(fd).mode & 0o777+ expect(mode & 0o600).toBe(0o600)+ expect(mode & 0o022).toBe(0)+ expect(mode & 0o111).toBe(0)expect(readFileSync(fd, 'utf8').trim()).toBe(expected.trim())} finally {closeSync(fd)diff --git a/docs/architecture/grok-subscription-transport-contract.md b/docs/architecture/grok-subscription-transport-contract.mdindex a49ed75e6..1ffac7a6f 100644--- a/docs/architecture/grok-subscription-transport-contract.md+++ b/docs/architecture/grok-subscription-transport-contract.md@@ -28,8 +28,8 @@ The part structure, the source union and the image validator are copies ofthe Codex V2 contract (issue #650); the Grok contract package does not importthe Codex one, and a parity test runs one image corpus through both copies.-Limits, from the xAI documentation (grok-4.5, 4.6 and 4.7 list-"Text, Image → Text"):+Local limits, informed by the public xAI image documentation and shared+ingress policy:- at most 20 images per request (xAI sets no count limit; 20 matches theshared ingress);@@ -42,7 +42,9 @@ There is **no dimension or pixel limit**. The validator reads the PNG orJPEG header to check the container. It has no upper bound on width or height(a declared 9000×9000 PNG is accepted and reaches the upstream); it refusesonly a zero dimension. This differs from-Codex, whose 2048 px bound comes from its measured endpoint. The validator+Codex, whose conservative local 2048 px hard limit is informed by historical+endpoint and client evidence. Current private-service visual acceptance remains+unverified (G8). The validatorchecks canonical base64, MIME/container framing and header dimensions; it doesnot decode pixels.diff --git a/external-rest-api/package-lock.json b/external-rest-api/package-lock.jsonindex d1d9584d6..ec891878c 100644--- a/external-rest-api/package-lock.json+++ b/external-rest-api/package-lock.json@@ -1,12 +1,12 @@{"name": "clerum-external-rest-api",- "version": "0.1.95",+ "version": "0.1.96","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "clerum-external-rest-api",- "version": "0.1.95",+ "version": "0.1.96","dependencies": {"@clerum/jwt-key-policy": "file:../packages/jwt-key-policy","cors": "^2.8.5",diff --git a/external-rest-api/package.json b/external-rest-api/package.jsonindex 7947a2c34..8cc5df649 100644--- a/external-rest-api/package.json+++ b/external-rest-api/package.json@@ -1,6 +1,6 @@{"name": "clerum-external-rest-api",- "version": "0.1.95",+ "version": "0.1.96","description": "External REST API for profile, team management, and RPC token brokerage","main": "dist/main.js","engines": {diff --git a/external-rest-api/src/releaseManifest.ts b/external-rest-api/src/releaseManifest.tsindex 493d6be80..f13defdec 100644--- a/external-rest-api/src/releaseManifest.ts+++ b/external-rest-api/src/releaseManifest.ts@@ -8,8 +8,8 @@ export type ReleaseManifest = {export const releaseManifest: ReleaseManifest = {releaseId: 'v0.10.0',- externalRestApiVersion: '0.1.95',- rpcProxyVersion: '0.1.119',+ externalRestApiVersion: '0.1.96',+ rpcProxyVersion: '0.1.120',desktopVersion: '0.10.0',minimumDesktopVersion: '0.1.252',}diff --git a/packages/jwt-key-policy/test/store-state.test.cjs b/packages/jwt-key-policy/test/store-state.test.cjsindex 63fd45dc6..6944e23a2 100644--- a/packages/jwt-key-policy/test/store-state.test.cjs+++ b/packages/jwt-key-policy/test/store-state.test.cjs@@ -41,7 +41,11 @@ test('missing directory and empty slot create a complete canonical pair', t => {const material = storeApi.loadOrCreateDevSigningMaterial('rpc', directory)assert.equal(fs.statSync(directory).mode & 0o777, 0o700)assert.equal(fs.statSync(path.join(directory, 'rpc.pem')).mode & 0o777, 0o600)- assert.equal(fs.statSync(path.join(directory, 'rpc.public.pem')).mode & 0o777, 0o644)+ // Public creation requests 0644; a restrictive umask may remove read bits.+ const publicMode = fs.statSync(path.join(directory, 'rpc.public.pem')).mode & 0o777+ assert.equal(publicMode & 0o600, 0o600)+ assert.equal(publicMode & 0o022, 0)+ assert.equal(publicMode & 0o111, 0)assert.equal(policy.publicKeyPemFingerprint(material.privatePem), material.fingerprint)assert.equal(policy.publicKeyPemFingerprint(material.publicPem), material.fingerprint)assert.equal(storeApi.readDevVerifierMaterial('rpc', directory).fingerprint, material.fingerprint)diff --git a/rpc-proxy/package-lock.json b/rpc-proxy/package-lock.jsonindex c1e9f51ff..173582f76 100644--- a/rpc-proxy/package-lock.json+++ b/rpc-proxy/package-lock.json@@ -1,12 +1,12 @@{"name": "clerum-rpc-proxy",- "version": "0.1.119",+ "version": "0.1.120","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "clerum-rpc-proxy",- "version": "0.1.119",+ "version": "0.1.120","dependencies": {"@clerum/jwt-key-policy": "file:../packages/jwt-key-policy","cors": "^2.8.5",diff --git a/rpc-proxy/package.json b/rpc-proxy/package.jsonindex 950ad2bac..cd84dce4f 100644--- a/rpc-proxy/package.json+++ b/rpc-proxy/package.json@@ -1,6 +1,6 @@{"name": "clerum-rpc-proxy",- "version": "0.1.119",+ "version": "0.1.120","description": "External-facing RPC proxy for tenant-scoped MCP access","main": "dist/main.js","engines": {