Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
fix(control-api): redact registry claim tokens and client secrets in logs
Jose Ramirez0d1b2e55146c
diff --git a/control-api/package-lock.json b/control-api/package-lock.jsonindex 7237060ca..4a0d29c1f 100644--- a/control-api/package-lock.json+++ b/control-api/package-lock.json@@ -1,12 +1,12 @@{"name": "clerum-control-api",- "version": "0.1.368",+ "version": "0.1.369","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "clerum-control-api",- "version": "0.1.368",+ "version": "0.1.369","dependencies": {"@clerum/image-policy": "file:../packages/image-policy","@clerum/llm-providers": "file:../packages/llm-providers",diff --git a/control-api/package.json b/control-api/package.jsonindex 96a068da6..e709a9ce8 100644--- a/control-api/package.json+++ b/control-api/package.json@@ -1,6 +1,6 @@{"name": "clerum-control-api",- "version": "0.1.368",+ "version": "0.1.369","description": "Internal Clerum control plane REST API + UI for managing CRDs and secrets","main": "dist/main.js","engines": {diff --git a/control-api/src/utils/log/redact.ts b/control-api/src/utils/log/redact.tsindex 2309df9a2..9f4c52484 100644--- a/control-api/src/utils/log/redact.ts+++ b/control-api/src/utils/log/redact.ts@@ -13,6 +13,10 @@ export const TOKEN_LEAK_REDACT_PATHS: readonly string[] = ['password','password_hash','passwordHash',+ 'claim_token',+ 'claimToken',+ 'client_secret',+ 'clientSecret',]/** Asserted by unit tests so redactions can grow but never shrink. */@@ -22,4 +26,8 @@ export const REQUIRED_REDACT_PATHS: readonly string[] = ['headers.authorization','accessToken','refreshToken',+ 'claim_token',+ 'claimToken',+ 'client_secret',+ 'clientSecret',]diff --git a/control-api/test/utils.log.redact.test.ts b/control-api/test/utils.log.redact.test.tsindex 1cbb5eaa9..6fbcd69c8 100644--- a/control-api/test/utils.log.redact.test.ts+++ b/control-api/test/utils.log.redact.test.ts@@ -25,4 +25,11 @@ describe('token-leak redaction', () => {it('redacts the registry voucher field (defense-in-depth)', () => {expect(TOKEN_LEAK_REDACT_PATHS).toContain('voucher')})++ it('redacts registry connect claim tokens and client secrets', () => {+ for (const p of ['claim_token', 'claimToken', 'client_secret', 'clientSecret']) {+ expect(TOKEN_LEAK_REDACT_PATHS).toContain(p)+ expect(REQUIRED_REDACT_PATHS).toContain(p)+ }+ })})