langchain
Audited by Socket on Mar 5, 2026
1 alert found:
MalwareThis code fragment is educational and not itself malicious. However, it contains insecure example patterns that, if copied into production or used with untrusted inputs, create significant security risks. Primary risks: eval(expression) in the calculator tool (high severity — allows remote code execution) and RAG patterns that forward local documents/history to remote model/embedding providers (moderate severity — potential data exfiltration of secrets/PII). Recommended actions: remove or replace eval with a safe expression evaluator or whitelist parser, document and enforce redaction/PII-checking before sending data to external providers, design tools with least privilege and explicit approval flows, and add guidance for secure credential handling and auditing. Treat the examples as non-production-safe templates until hardened.