Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript

fix(np08): make security gates portable and codeql-clean

Alfredo Lopez67aa5f448f31
diff --git a/mcp-host/package-lock.json b/mcp-host/package-lock.json
index 56457afba..60a2f3989 100644
--- a/mcp-host/package-lock.json
+++ b/mcp-host/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "clerum-mcp-host",
- "version": "0.1.270",
+ "version": "0.1.271",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-mcp-host",
- "version": "0.1.270",
+ "version": "0.1.271",
"license": "SEE LICENSE IN LICENSE",
"dependencies": {
"@anthropic-ai/sdk": "^0.32.0",
diff --git a/mcp-host/package.json b/mcp-host/package.json
index f9f2c0aab..885b9390f 100644
--- a/mcp-host/package.json
+++ b/mcp-host/package.json
@@ -1,6 +1,6 @@
{
"name": "clerum-mcp-host",
- "version": "0.1.270",
+ "version": "0.1.271",
"description": "MCP Host - reads Host CRD and provides LLM access via OpenAI/Claude",
"main": "dist/main.js",
"engines": {
diff --git a/mcp-host/src/contextMapperClient.ts b/mcp-host/src/contextMapperClient.ts
index 9173dcafc..c017def74 100644
--- a/mcp-host/src/contextMapperClient.ts
+++ b/mcp-host/src/contextMapperClient.ts
@@ -292,10 +292,7 @@ export class ContextMapperClient {
}
)
const data = decodeCredentialResponse(await response.json())
- if (
- expectedCredentialRevision !== undefined &&
- data.credentialRevision !== expectedCredentialRevision
- ) {
+ if (data.credentialRevision !== expectedCredentialRevision) {
throw new ContextMapperCredentialRevisionError()
}
return data.token ?? undefined
diff --git a/scripts/tests/test-np08-v1-reference-inventory.sh b/scripts/tests/test-np08-v1-reference-inventory.sh
index 56596843d..212aba4ea 100755
--- a/scripts/tests/test-np08-v1-reference-inventory.sh
+++ b/scripts/tests/test-np08-v1-reference-inventory.sh
@@ -6,27 +6,27 @@ cd "${ROOT}"
fail=0
-if rg -n -F '/api/v1/mcpservers' mcp-host/src; then
+if grep -RInF -- '/api/v1/mcpservers' mcp-host/src; then
echo "FAIL: mcp-host must not retain an HCC v1 discovery or credential path" >&2
fail=1
fi
-if rg -n 'listServersByContext|getAuthTokenForServer|pollServers\([^)]*context' mcp-host/src; then
+if grep -RInE -- 'listServersByContext|getAuthTokenForServer|pollServers\([^)]*context' mcp-host/src; then
echo "FAIL: mcp-host retains a caller-selected Context or legacy credential API" >&2
fail=1
fi
-if ! rg -q -F '/api/v1/mcpservers' mcp-proxy/src/hccClient.ts; then
+if ! grep -qF -- '/api/v1/mcpservers' mcp-proxy/src/hccClient.ts; then
echo "FAIL: the temporary PR 2 global-inventory consumer is no longer explicit" >&2
fail=1
fi
-if rg -n '/api/v1/mcpservers/(context/|[^/]+/auth)' mcp-proxy/src; then
+if grep -RInE -- '/api/v1/mcpservers/(context/|[^/]+/auth)' mcp-proxy/src; then
echo "FAIL: mcp-proxy must not consume caller-selected v1 Host routes" >&2
fail=1
fi
-if rg -n 'getMcpServers\s*\([^)]*context|getMcpAuth|getAuthTokenForServer' tests/e2e; then
+if grep -RInE -- 'getMcpServers[[:space:]]*\([^)]*context|getMcpAuth|getAuthTokenForServer' tests/e2e; then
echo "FAIL: E2E helpers retain a caller-selected v1 Host contract" >&2
fail=1
fi