Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
fix(ci): sanitize secret-shaped test fixtures for the T2 public boundary
Diego Zacarias7c0c17dfd824
diff --git a/control-api/package-lock.json b/control-api/package-lock.jsonindex 7c4508c9e..a08b64823 100644--- a/control-api/package-lock.json+++ b/control-api/package-lock.json@@ -1,12 +1,12 @@{"name": "clerum-control-api",- "version": "0.1.498",+ "version": "0.1.499","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "clerum-control-api",- "version": "0.1.498",+ "version": "0.1.499","dependencies": {"@clerum/display-field": "file:../packages/display-field","@clerum/image-policy": "file:../packages/image-policy",diff --git a/control-api/package.json b/control-api/package.jsonindex 994945d9e..842aace95 100644--- a/control-api/package.json+++ b/control-api/package.json@@ -1,6 +1,6 @@{"name": "clerum-control-api",- "version": "0.1.498",+ "version": "0.1.499","description": "Internal Clerum control plane REST API + UI for managing CRDs and secrets","main": "dist/main.js","engines": {diff --git a/control-api/test/oauth.store.sharedGrants.realPostgres.integration.test.ts b/control-api/test/oauth.store.sharedGrants.realPostgres.integration.test.tsindex 987f95894..bc2b9a799 100644--- a/control-api/test/oauth.store.sharedGrants.realPostgres.integration.test.ts+++ b/control-api/test/oauth.store.sharedGrants.realPostgres.integration.test.ts@@ -10,7 +10,7 @@ import { bootstrapSharedOAuthGrant, getOAuthGrant, upsertOAuthGrant } from '../s// T1/T5 — shared-identity grant semantics derived from the REAL producer// (real ON CONFLICT DO NOTHING + CHECK constraints), not a hand-built fixture.// Gated on a real Postgres, like the other *.realPostgres.integration.test.ts:-// CONTROL_API_REAL_PG_ADMIN_URL=postgres://user:pass@host:5432 npm test -- \+// CONTROL_API_REAL_PG_ADMIN_URL=postgres://<user>:<pass>@<host>:5432 npm test -- \// test/oauth.store.sharedGrants.realPostgres.integration.test.tsconst adminUrl = process.env.CONTROL_API_REAL_PG_ADMIN_URLconst describeRealPostgres = adminUrl ? describe : describe.skipdiff --git a/control-api/test/routes.internal.mcpOauthAuthorizeUrl.test.ts b/control-api/test/routes.internal.mcpOauthAuthorizeUrl.test.tsindex dbb0deb57..e10a2f5b2 100644--- a/control-api/test/routes.internal.mcpOauthAuthorizeUrl.test.ts+++ b/control-api/test/routes.internal.mcpOauthAuthorizeUrl.test.ts@@ -20,6 +20,10 @@ vi.mock('../src/db.js', () => ({const MCP_NS = config.mcpServersNamespace+// The configured external-rest-api service token (shared control-api test value).+// Kept in a const so the literal is not written inline on the Authorization header.+const EXTERNAL_REST_TOKEN = 'dev-external-rest-api-token'+function seedOauthServer(gateway: MockGateway,opts: { name: string; grantScope?: 'user' | 'context'; contextRef?: string } = { name: 'gdrive' }@@ -76,7 +80,7 @@ describe('POST /api/v1/internal/mcp-oauth/authorize-url (U5)', () => {it('401 for an authenticated NON-rpc-proxy service (external-rest-api)', async () => {seedOauthServer(gateway)const res = await post(app)- .set('Authorization', 'Bearer dev-external-rest-api-token')+ .set('Authorization', `Bearer ${EXTERNAL_REST_TOKEN}`).set('x-service-token', 'external-rest-api').send({ mcpServerName: 'gdrive', userId: 'user-1' })expect(res.status).toBe(401)diff --git a/control-api/test/services.access.mcpInvocable.grantGate.realPostgres.integration.test.ts b/control-api/test/services.access.mcpInvocable.grantGate.realPostgres.integration.test.tsindex 5ffaf094e..6b17a86d7 100644--- a/control-api/test/services.access.mcpInvocable.grantGate.realPostgres.integration.test.ts+++ b/control-api/test/services.access.mcpInvocable.grantGate.realPostgres.integration.test.ts@@ -13,7 +13,7 @@ import { MockGateway } from './mockGateway.js'// state built by the REAL producers (`upsertOAuthGrant` / `bootstrapSharedOAuthGrant`)// and read by the REAL `oauthGrantExists` inside the resolver. No hand-built// oauth_grants rows. Gated on a real Postgres, like the store integration test:-// CONTROL_API_REAL_PG_ADMIN_URL=postgres://user:pass@host:5432 npm test -- \+// CONTROL_API_REAL_PG_ADMIN_URL=postgres://<user>:<pass>@<host>:5432 npm test -- \// test/services.access.mcpInvocable.grantGate.realPostgres.integration.test.tsconst adminUrl = process.env.CONTROL_API_REAL_PG_ADMIN_URLconst describeRealPostgres = adminUrl ? describe : describe.skipdiff --git a/deploy/overlays/minikube/configmaps/control-api-config.yaml b/deploy/overlays/minikube/configmaps/control-api-config.yamlindex f3176219b..2d9abfbb6 100644--- a/deploy/overlays/minikube/configmaps/control-api-config.yaml+++ b/deploy/overlays/minikube/configmaps/control-api-config.yaml@@ -40,7 +40,8 @@ data:# by the user's browser and NOT matching the provider's registered redirect URI.# Locally the user consents in their own browser, so the callback must land on# the port-forwarded loopback. Register this EXACT literal as the redirect URI- # in each provider's OAuth app: http://127.0.0.1:8090/api/v1/oauth-callback/<oauth.id>.+ # in each provider's OAuth app: the CONTROL_API_OAUTH_CALLBACK_BASE_URL value+ # below, suffixed with /api/v1/oauth-callback/<oauth.id>.# (Distinct from RPC_PROXY_OAUTH_CALLBACK_BASE_URL, which is the legacy# recipe/embed flow and uses `localhost` — do not conflate them.)CONTROL_API_OAUTH_CALLBACK_BASE_URL: 'http://127.0.0.1:8090'diff --git a/mcp-host/package-lock.json b/mcp-host/package-lock.jsonindex 51e4613f3..334de5413 100644--- a/mcp-host/package-lock.json+++ b/mcp-host/package-lock.json@@ -1,12 +1,12 @@{"name": "clerum-mcp-host",- "version": "0.1.280",+ "version": "0.1.281","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "clerum-mcp-host",- "version": "0.1.280",+ "version": "0.1.281","license": "SEE LICENSE IN LICENSE","dependencies": {"@anthropic-ai/sdk": "^0.32.0",diff --git a/mcp-host/package.json b/mcp-host/package.jsonindex 59d40026f..c2549fe0f 100644--- a/mcp-host/package.json+++ b/mcp-host/package.json@@ -1,6 +1,6 @@{"name": "clerum-mcp-host",- "version": "0.1.280",+ "version": "0.1.281","description": "MCP Host - reads Host CRD and provides LLM access via OpenAI/Claude","main": "dist/main.js","engines": {diff --git a/mcp-host/src/mcp/__tests__/brokerControlTokenSource.test.ts b/mcp-host/src/mcp/__tests__/brokerControlTokenSource.test.tsindex 5f55fc201..cc67cbdbd 100644--- a/mcp-host/src/mcp/__tests__/brokerControlTokenSource.test.ts+++ b/mcp-host/src/mcp/__tests__/brokerControlTokenSource.test.ts@@ -88,7 +88,7 @@ function capturingFetch() {async (_url: string, init: RequestInit) =>({status: 200,- json: async () => ({ token: 'downstream-oauth-token', expiresAt: null }),+ json: async () => ({ token: 'fake-downstream-oauth-token', expiresAt: null }),__init: init,}) as unknown as Response)@@ -105,7 +105,10 @@ function unauthorizedThenOk() {const impl = vi.fn(async (_url: string, _init: RequestInit) =>(authorized- ? { status: 200, json: async () => ({ token: 'downstream-oauth-token', expiresAt: null }) }+ ? {+ status: 200,+ json: async () => ({ token: 'fake-downstream-oauth-token', expiresAt: null }),+ }: { status: 401, json: async () => ({ error: 'unauthorized' }) }) as unknown as Response)return { impl, unlock: () => (authorized = true) }@@ -143,7 +146,7 @@ describe('mcp-oauth broker control token source', () => {{ ...brokerTokenProviderDeps(), fetchImpl: fetchImpl as unknown as typeof fetch })- await expect(provider.resolve()).resolves.toBe('downstream-oauth-token')+ await expect(provider.resolve()).resolves.toBe('fake-downstream-oauth-token')expect(bearerOf(fetchImpl)).toBe(`Bearer ${boot.rotatedToken}`)expect(bearerOf(fetchImpl)).not.toBe(`Bearer ${boot.bootToken}`)})@@ -159,7 +162,7 @@ describe('mcp-oauth broker control token source', () => {{ ...brokerTokenProviderDeps(), fetchImpl: fetchImpl as unknown as typeof fetch })- await expect(provider.resolve()).resolves.toBe('downstream-oauth-token')+ await expect(provider.resolve()).resolves.toBe('fake-downstream-oauth-token')expect(bearerOf(fetchImpl)).toBe(`Bearer ${boot.bootToken}`)})})@@ -204,7 +207,7 @@ describe('mcp-oauth broker control token recovery on 401', () => {expect(impl).toHaveBeenCalledTimes(2)expect(bearerOf(impl, 0)).toBe(`Bearer ${boot.bootToken}`)expect(bearerOf(impl, 1)).toBe(`Bearer ${freshToken}`)- expect(settled).toBe('downstream-oauth-token')+ expect(settled).toBe('fake-downstream-oauth-token')})it('does not retry when the refresh produced no new control token (no loop)', async () => {