Hub rules-mysql

rules-mysql

v3 public Verified

MySQL

MySQL is an open-source relational database management system. These rules provide governance for MySQL interactions, focusing on SQL injection prevention, secure credential management, and optimized database schema design.

@sigmashakeinc 2 pulls 5 rules published Apr 8, 2026 synced Oct 11, 2026 sigmashakeinc/rules/rulesets/rules-mysql →
Severity
3 error 2 warn 0 info
demo.cast
MySQL is an open-source relational database management system. These rules provide governance for MySQL interactions, focusing on SQL injection prevention, secure credential management, and optimized database schema design.

Rules index

5 governance rules

Indexed from the repository's .rules files, grouped by technology. Expand any rule to read the raw source.

mysql

mysql-block-unsafe-patterns warning ask

Potentially unsafe pattern detected in mysql code: "CONCAT(". Review the use case — this may indicate a security risk, a deprecated API, or a misconfiguration. Confirm the write is intentional.

Rule source requires an active Pro or Enterprise subscription.
mysql-force-updated-api warning log

RISK: mysql_query() is from the deprecated ext/mysql PHP extension (removed in PHP 7). FIX: migrate to PDO or MySQLi with prepared statements to eliminate SQL injection exposure.

Rule source requires an active Pro or Enterprise subscription.
mysql-hardcoded-password error block

RISK: a hardcoded MySQL password in source code exposes the database to anyone with repository access — credential scrapers index public repos within seconds of a push (CWE-798). FIX: read the password from an environment variable or a secrets manager and rotate the exposed credential immediately.

Rule source requires an active Pro or Enterprise subscription.
mysql-sqli-string-concat error block

RISK: string-interpolating user input into a SQL statement is a textbook SQL injection (CWE-89, OWASP A03). FIX: use prepared statements with parameterized placeholders — PDO::prepare/bindParam, cursor.execute(sql, params), db.query(sql, [params]) — and never concatenate request-derived values into query strings.

Rule source requires an active Pro or Enterprise subscription.
mysql-ssl-disabled error block

RISK: disabling MySQL TLS/SSL exposes authentication credentials and all query data to network eavesdropping and MITM attacks (CWE-295). FIX: set ssl_mode=REQUIRED (or VERIFY_CA/VERIFY_IDENTITY) and provide the CA certificate path.

Rule source requires an active Pro or Enterprise subscription.

Version metadata

Published metadata

The hash-locked record of this published ruleset. When source contents change, the maintainer resyncs and the version bumps.

Version
v3
Published
Apr 8, 2026
Source commits
0
Synced
Oct 11, 2026
Hash
371cc4a7faf407749f539f383d456b0adf834931012f227cd9dd35a487a4be23
Signature
Verified (publisher key)
Tested with
claude-code@current
Plan
Starter (free)
Visibility
Public

Source history

Recent commits

Latest commits touching rulesets/rules-mysql/.sigmashake/rules in sigmashakeinc/rules/rulesets/rules-mysql. The published version only bumps when a maintainer resyncs.

No commit history available.