mcp-server-semgrep
Version:
MCP Server for Semgrep Integration - static code analysis with AI
29 lines (28 loc) • 782 B
YAML
rules:
- id: eval-use
patterns:
- pattern: eval(...);
- pattern-not: eval('...');
message: >-
Evaluating non-constant commands. This can lead to command injection.
metadata:
cwe:
- "CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')"
references:
- https://www.php.net/manual/en/function.eval
- https://github.com/FloeDesignTechnologies/phpcs-security-audit/blob/master/Security/Sniffs/BadFunctions/NoEvalsSniff.php
category: security
technology:
- php
owasp:
- A01:2017 - Injection
- A03:2021 - Injection
cwe2022-top25: true
cwe2021-top25: true
subcategory:
- audit
likelihood: LOW
impact: HIGH
confidence: LOW
languages: [php]
severity: ERROR