UNPKG

mcp-server-semgrep

Version:

MCP Server for Semgrep Integration - static code analysis with AI

49 lines (48 loc) 1.26 kB
rules: - id: md5-loose-equality mode: taint pattern-sinks: - pattern: | $VAR1 == $VAR2 - pattern: | $VAR1 != $VAR2 pattern-sources: - pattern: $PHAR->getSignature() - pattern: $RARENTRY->getCrc() - pattern: base_convert(...) - pattern: bin2hex(...) - pattern: dechex(...) - pattern: hash_file(...) - pattern: hash_final(...) - pattern: hash_hmac_file(...) - pattern: hash_hmac(...) - pattern: hash_pbkdf2(...) - pattern: hash(...) - pattern: md5_file(...) - pattern: md5(...) - pattern: openssl_x509_fingerprint(...) - pattern: rnp_locate_key(...) - pattern: sha1_file(...) - pattern: sha1(...) - pattern: sodium_bin2hex(...) pattern-sanitizers: - pattern: strlen(...) message: >- Make sure comparisons involving md5 values are strict (use `===` not `==`) to avoid type juggling issues metadata: cwe: - 'CWE-697: Incorrect Comparison' references: - https://www.php.net/manual/en/types.comparisons.php - https://www.whitehatsec.com/blog/magic-hashes/ category: security technology: - php subcategory: - audit likelihood: LOW impact: LOW confidence: LOW languages: [php] severity: ERROR