Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors
TypeScript a2aai-agentsai-gatewayanthropicclaudeclaude-codeclinecodexcopilotcursordeepseekfree-aigeminikimillm-gatewaymcpopenaiopenai-proxyqwentoken-saver
security: Resolve GitHub CodeQL scan alerts
diegosouzapw3843751c585e
diff --git a/.dockerignore b/.dockerignoreindex 9f7dea5a31..069c1e6781 100644--- a/.dockerignore+++ b/.dockerignore@@ -67,3 +67,42 @@ imagesclipromnirouteCloudomnirouteSite++# Temporary/Scratch Folders+_*++# CI/CD and Version Control (that are not actual code)+.github+.husky+.omc++# Test Configs and Reports+playwright.config.ts+vitest*.ts+audit-report.json+sonar-project.properties++# Deployment Configs+docker-compose*.yml+fly.toml++# Consistent with .gitignore+.DS_Store+.idea/+.config/+.data/+.omnivscodeagent/+*.sqlite-*+*.tsbuildinfo+next-env.d.ts+security-analysis/+.analysis/+antigravity-manager-analysis/+.sisyphus/+.plans/+app.__qa_backup/+.app-build-backup-*/+.gitnexus+.worktrees+.next-playwright/+cloud/diff --git a/.gitignore b/.gitignoreindex 2be9ea05a3..783740a7d7 100644--- a/.gitignore+++ b/.gitignore@@ -171,3 +171,8 @@ docs/superpowers/.gitnexus.worktreesbin/omniroute.mjs++# Consistent with .dockerignore / .npmignore+.omc/+audit-report.json+bun.lockdiff --git a/.npmignore b/.npmignoreindex e0a5b88654..cc14c145c2 100644--- a/.npmignore+++ b/.npmignore@@ -76,3 +76,27 @@ app/_*/app/coverage/app/logs/app/tests/++# Consistent with .gitignore and .dockerignore+.DS_Store+.idea/+.config/+.data/+.omnivscodeagent/+.omc/+*.sqlite-*+*.tsbuildinfo+security-analysis/+.analysis/+antigravity-manager-analysis/+.sisyphus/+.plans/+app.__qa_backup/+.app-build-backup-*/+.gitnexus+.worktrees+.next-playwright/+test-results/+playwright-report/+blob-report/+coverage/diff --git a/open-sse/executors/perplexity-web.ts b/open-sse/executors/perplexity-web.tsindex b0232dd5c2..bab5910356 100644--- a/open-sse/executors/perplexity-web.ts+++ b/open-sse/executors/perplexity-web.ts@@ -33,9 +33,9 @@ const CITATION_RE = /\[\d+\]/g;const GROK_TAG_RE = /<grok:[^>]*>.*?<\/grok:[^>]*>/gs;const GROK_SELF_RE = /<grok:[^>]*\/>/g;const XML_DECL_RE = /<[?]xml[^?]*[?]>/g;-const SCRIPT_RE = /<script[^>]*>.*?<\/script>/gs;-const SCRIPT_TAG_RE = /<\/?script[^>]*>/g;-const RESPONSE_TAG_RE = /<\/?response[^>]*>/g;+const SCRIPT_RE = /<script[^>]*>[^]*?<\/script>/gi;+const SCRIPT_TAG_RE = /<\/?script[^>]*>/gi;+const RESPONSE_TAG_RE = /<\/?response[^>]*>/gi;const MULTI_SPACE = / {2,}/g;const MULTI_NL = /\n{3,}/g;diff --git a/open-sse/services/contextManager.ts b/open-sse/services/contextManager.tsindex 7aa710b60b..92285ecd7a 100644--- a/open-sse/services/contextManager.ts+++ b/open-sse/services/contextManager.ts@@ -217,8 +217,8 @@ function compressThinking(messages: Record<string, unknown>[]) {// Remove thinking XML tags from string contentif (typeof msg.content === "string") {const cleaned = msg.content- .replace(/<thinking>[\s\S]*?<\/thinking>/g, "")- .replace(/<antThinking>[\s\S]*?<\/antThinking>/g, "")+ .replace(/<thinking>[^]*?<\/thinking>/g, "")+ .replace(/<antThinking>[^]*?<\/antThinking>/g, "").trim();return { ...msg, content: cleaned || "[thinking compressed]" };}diff --git a/open-sse/utils/proxyFetch.ts b/open-sse/utils/proxyFetch.tsindex 36714ea614..85790987b0 100644--- a/open-sse/utils/proxyFetch.ts+++ b/open-sse/utils/proxyFetch.ts@@ -81,7 +81,8 @@ function noProxyMatch(targetUrl) {// Support wildcard matching (e.g. 192.168.* or *.local)if (patternHost.includes("*")) {- const regexStr = "^" + patternHost.replace(/\./g, "\\.").replace(/\*/g, ".*") + "$";+ const regexStr =+ "^" + patternHost.replace(/[.+?^${}()|[\]\\]/g, "\\$&").replace(/\*/g, ".*") + "$";if (new RegExp(regexStr).test(hostname)) return true;}diff --git a/scratch.mjs b/scripts/scratch.mjssimilarity index 100%rename from scratch.mjsrename to scripts/scratch.mjsdiff --git a/src/app/(dashboard)/dashboard/providers/[id]/page.tsx b/src/app/(dashboard)/dashboard/providers/[id]/page.tsxindex 5311a400b1..3ddd9a8d99 100644--- a/src/app/(dashboard)/dashboard/providers/[id]/page.tsx+++ b/src/app/(dashboard)/dashboard/providers/[id]/page.tsx@@ -4855,9 +4855,9 @@ function ConnectionRow({{connection.lastError && connection.isActive !== false && (<spanclassName={`text-xs truncate max-w-[300px] ${statusPresentation.errorTextClass}`}- title={connection.lastError.replace(/[<>]/g, "")}+ title={connection.lastError}>- {connection.lastError.replace(/[<>]/g, "")}+ {connection.lastError}</span>)}<span className="text-xs text-text-muted">#{connection.priority}</span>diff --git a/src/lib/usage/callLogArtifacts.ts b/src/lib/usage/callLogArtifacts.tsindex daa2d6c8b6..8957887b84 100644--- a/src/lib/usage/callLogArtifacts.ts+++ b/src/lib/usage/callLogArtifacts.ts@@ -75,7 +75,7 @@ export function writeCallArtifact(try {const serialized = JSON.stringify(artifact, null, 2);const sizeBytes = Buffer.byteLength(serialized);- const sha256 = crypto.createHash("sha256").update(serialized).digest("hex");+ const artifactHash = crypto.createHash("sha256").update(serialized).digest("hex");fs.mkdirSync(path.dirname(absPath), { recursive: true });fs.writeFileSync(tmpPath, serialized);@@ -84,7 +84,7 @@ export function writeCallArtifact(return {relPath: relativePath,sizeBytes,- sha256,+ sha256: artifactHash,};} catch (error) {try {diff --git a/test_reasoning.json b/test_reasoning.jsondeleted file mode 100644index 1af9cbcda3..0000000000--- a/test_reasoning.json+++ /dev/null@@ -1,6 +0,0 @@-{- "type": "response.reasoning_content_text.delta",- "delta": "thinking text",- "item_id": "rs_123",- "output_index": 0-}