UNPKG

mcp-server-semgrep

Version:

MCP Server for Semgrep Integration - static code analysis with AI

41 lines (40 loc) 1.08 kB
rules: - id: unquoted-attribute-var message: >- Detected a unquoted template variable as an attribute. If unquoted, a malicious actor could inject custom JavaScript handlers. To fix this, add quotes around the template expression, like this: "{{ expr }}". metadata: cwe: - "CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')" owasp: - A07:2017 - Cross-Site Scripting (XSS) - A03:2021 - Injection references: - https://flask.palletsprojects.com/en/1.1.x/security/#cross-site-scripting-xss category: security technology: - html-templates confidence: LOW cwe2022-top25: true cwe2021-top25: true subcategory: - audit likelihood: LOW impact: MEDIUM languages: - generic paths: include: - '*.html' - '*.mustache' - '*.hbs' severity: WARNING patterns: - pattern-inside: <$TAG ...> - pattern-not-inside: ="..." - pattern-not-inside: ='...' - pattern: '{{ ... }}' fix-regex: regex: '{{(.*?)}}' replacement: '"{{\1}}"'