UNPKG

mcp-server-semgrep

Version:

MCP Server for Semgrep Integration - static code analysis with AI

55 lines (54 loc) 1.54 kB
rules: - id: chrome-remote-interface-compilescript-injection message: >- If unverified user data can reach the `compileScript` method it can result in Server-Side Request Forgery vulnerabilities metadata: owasp: - A10:2021 - Server-Side Request Forgery (SSRF) cwe: - 'CWE-918: Server-Side Request Forgery (SSRF)' category: security technology: - chrome-remote-interface references: - https://github.com/cyrus-and/chrome-remote-interface cwe2022-top25: true cwe2021-top25: true subcategory: - vuln likelihood: MEDIUM impact: MEDIUM confidence: MEDIUM languages: - javascript - typescript severity: WARNING mode: taint pattern-sources: - patterns: - pattern-inside: function ... (..., $ARG,...) {...} - focus-metavariable: $ARG pattern-sinks: - patterns: - pattern-either: - pattern-inside: | require('chrome-remote-interface'); ... - pattern-inside: | import 'chrome-remote-interface'; ... - pattern-either: - pattern: | $RUNTIME.compileScript({expression: $SINK},...) - pattern: | $RUNTIME.evaluate({expression: $SINK},...) - pattern: | $PAGE.navigate({url: $SINK},...) - pattern: | $RUNTIME.printToPDF({headerTemplate: $SINK},...) - pattern: | $RUNTIME.printToPDF({footerTemplate: $SINK},...) - pattern: | $PAGE.setDocumentContent({html: $SINK},...) - focus-metavariable: $SINK