UNPKG

mcp-server-semgrep

Version:

MCP Server for Semgrep Integration - static code analysis with AI

51 lines (50 loc) 1.47 kB
rules: - id: insufficient-rsa-key-size message: >- The RSA key size $SIZE is insufficent by NIST standards. It is recommended to use a key length of 2048 or higher. languages: [ruby] severity: WARNING metadata: technology: - ruby category: security references: - https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-57Pt3r1.pdf cwe: - 'CWE-326: Inadequate Encryption Strength' owasp: - A03:2017 - Sensitive Data Exposure - A02:2021 - Cryptographic Failures subcategory: - vuln likelihood: HIGH impact: MEDIUM confidence: HIGH patterns: - pattern-either: - pattern: OpenSSL::PKey::RSA.generate($SIZE,...) - pattern: OpenSSL::PKey::RSA.new($SIZE, ...) - patterns: - pattern-either: - patterns: - pattern-inside: | $ASSIGN = $SIZE ... - pattern-either: - pattern: OpenSSL::PKey::RSA.new($ASSIGN, ...) - pattern: OpenSSL::PKey::RSA.generate($ASSIGN, ...) - patterns: - pattern-inside: | def $METHOD1(...) ... $ASSIGN = $SIZE ... end ... - pattern-either: - pattern: OpenSSL::PKey::RSA.new($ASSIGN, ...) - pattern: OpenSSL::PKey::RSA.generate($ASSIGN, ...) - metavariable-comparison: metavariable: $SIZE comparison: $SIZE < 2048