UNPKG

mcp-server-semgrep

Version:

MCP Server for Semgrep Integration - static code analysis with AI

41 lines (40 loc) 1.09 kB
rules: - id: avoid-tainted-ftp-call metadata: owasp: - A05:2017 - Broken Access Control - A01:2021 - Broken Access Control cwe: - "CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')" references: - https://github.com/presidentbeef/brakeman/blob/main/docs/warning_types/file_access/index.markdown category: security technology: - rails cwe2022-top25: true cwe2021-top25: true subcategory: - vuln likelihood: HIGH impact: MEDIUM confidence: MEDIUM message: >- Using user input when accessing files is potentially dangerous. A malicious actor could use this to modify or access files they have no right to. languages: [ruby] severity: WARNING mode: taint pattern-sources: - pattern: params - pattern: cookies - pattern: request.env pattern-sinks: - pattern-either: - pattern: Net::FTP.$X(...) - patterns: - pattern-inside: | $FTP = Net::FTP.$OPEN(...) ... $FTP.$METHOD(...) - pattern: $FTP.$METHOD(...)