UNPKG

mcp-server-semgrep

Version:

MCP Server for Semgrep Integration - static code analysis with AI

39 lines (38 loc) 1.06 kB
rules: - id: check-http-verb-confusion mode: search patterns: - pattern: | if request.get? ... else ... end - pattern-not-inside: | if ... elsif ... ... end message: Found an improperly constructed control flow block with `request.get?`. Rails will route HEAD requests as GET requests but they will fail the `request.get?` check, potentially causing unexpected behavior unless an `elif` condition is used. languages: - ruby severity: ERROR metadata: source-rule-url: https://github.com/presidentbeef/brakeman/blob/main/lib/brakeman/checks/check_verb_confusion.rb category: security cwe: - 'CWE-650: Trusting HTTP Permission Methods on the Server Side' owasp: - A04:2021 - Insecure Design technology: - ruby - rails references: - https://github.com/presidentbeef/brakeman/blob/main/test/apps/rails6/app/controllers/accounts_controller.rb subcategory: - vuln likelihood: HIGH impact: MEDIUM confidence: MEDIUM