UNPKG

mcp-server-semgrep

Version:

MCP Server for Semgrep Integration - static code analysis with AI

40 lines (39 loc) 1.33 kB
rules: - id: insufficient-dsa-key-size message: >- Detected an insufficient key size for DSA. NIST recommends a key size of 2048 or higher. metadata: cwe: - 'CWE-326: Inadequate Encryption Strength' owasp: - A03:2017 - Sensitive Data Exposure - A02:2021 - Cryptographic Failures source-rule-url: https://github.com/PyCQA/bandit/blob/b1411bfb43795d3ffd268bef17a839dee954c2b1/bandit/plugins/weak_cryptographic_key.py references: - https://www.pycryptodome.org/src/public_key/dsa - https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-57pt1r5.pdf category: security technology: - pycryptodome subcategory: - vuln likelihood: LOW impact: MEDIUM confidence: HIGH functional-categories: - crypto::search::key-length::pycryptodome - crypto::search::key-length::pycryptodomex options: symbolic_propagation: true languages: [python] severity: WARNING patterns: - pattern-either: - pattern: Crypto.PublicKey.DSA.generate(..., bits=$SIZE, ...) - pattern: Crypto.PublicKey.DSA.generate($SIZE, ...) - pattern: Cryptodome.PublicKey.DSA.generate(..., bits=$SIZE, ...) - pattern: Cryptodome.PublicKey.DSA.generate($SIZE, ...) - metavariable-comparison: metavariable: $SIZE comparison: $SIZE < 2048