building-ai-chat
Audited by Socket on Sep 16, 2026
2 alerts found:
AnomalySecurityNo evidence of intentional malware or supply-chain compromise is present in the visible code. The primary security issue is potential XSS in the Vue example because marked output is inserted with v-html without visible sanitization. The Next.js example has reasonable authentication and rate-limiting structure but should validate message input and carefully constrain user-controlled system-prompt data. The credential-like environment entries are placeholders, not exposed secrets.
The fragment is a mock tool-calling implementation, but calculate introduces arbitrary JavaScript execution through eval() and should be replaced with a safe expression parser or constrained arithmetic evaluator. No evidence of intentional malware or supply-chain sabotage is present in this fragment; the principal issue is a high-impact code-injection vulnerability if tool arguments can be influenced by users or external model output.