fix(security): resolve CodeQL alerts for regex and replace

This commit is contained in:
diegosouzapw
2026-05-24 18:48:00 -03:00
parent 6a5d1c1479
commit 3e6609a853
2 changed files with 5 additions and 2 deletions

View File

@@ -54,7 +54,7 @@ export function buildCurl({ endpoint, method = "POST", headers, body }: CurlOpti
// Remove trailing backslash from last non-URL line
const last = lines.length - 1;
lines[last - 1] = lines[last - 1].replace(/ \\$/, " \\");
lines[last - 1] = lines[last - 1].replace(/ \\$/, "");
return lines.join("\n");
}

View File

@@ -35,7 +35,10 @@ function getKnowledgeResponse(query: string): string | null {
const q = query.toLowerCase();
// Architecture questions
if (/architecture|arquitectura|pipeline|request.*flow|request.*path/.test(q)) {
if (
/architecture|arquitectura|pipeline/.test(q) ||
(q.includes("request") && (q.includes("flow") || q.includes("path")))
) {
return `## OmniRoute Architecture
The request pipeline flows through: