# LLM Insecure Plugin Design - ID: javascript-llm-insecure-plugin - Severity: HIGH - CWE: Improper Access Control (CWE-284) - Languages: JavaScript, TypeScript - Frameworks: nodejs, express ## Description Detects insecure plugin/function calling implementations in AI/LLM systems. OWASP LLM07 - Insecure Plugin Design. Insecure plugin design can lead to: - Remote code execution via tool/function calls - Unauthorized data access through plugins - Privilege escalation via overly permissive tools - SSRF through URL-handling plugins - Command injection through shell plugins This rule detects: - Function calling without input validation - Dynamic function execution from LLM output - Plugin execution without access control - Dangerous functions exposed to LLM ## Detection Message Insecure plugin implementation: {issue_type} ## Remediation Validate tool inputs against schemas and use allowlists for permitted tools. ```javascript if (!allowedTools.includes(name)) throw new Error('Unknown tool'); const validate = ajv.compile(toolSchemas[name]); if (!validate(JSON.parse(args))) throw new Error('Invalid arguments'); ``` Learn more: https://shoulder.dev/learn/javascript/cwe-284/llm-insecure-plugin ## Documentation [object Object] ## Related Rules - **LLM Insecure Plugin Design** [HIGH]: - **Missing Network Policy** [MEDIUM]: - **LLM Insecure Plugin Design** [HIGH]: