Hub rules-mariadb

rules-mariadb

v3 public Verified

MariaDB

MariaDB is a popular open-source relational database that is a community-developed fork of MySQL. These rules govern MariaDB interactions, preventing SQL injection, insecure connection settings, and unauthorized data access patterns.

@sigmashakeinc 2 pulls 6 rules published Apr 8, 2026 synced Nov 22, 2026 sigmashakeinc/rules/rulesets/rules-mariadb →
Severity
5 error 1 warn 0 info
demo.cast
MariaDB is a popular open-source relational database that is a community-developed fork of MySQL. These rules govern MariaDB interactions, preventing SQL injection, insecure connection settings, and unauthorized data access patterns.

Rules index

6 governance rules

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

mariadb

mariadb-no-dynamic-where-regex warning log

User-controlled value injected into a MariaDB REGEXP expression. Malicious regex patterns can cause catastrophic backtracking (ReDoS) and may allow injection depending on context. Validate and whitelist the pattern before embedding it in a REGEXP clause.

Rule source requires an active Pro or Enterprise subscription.
mariadb-no-grant-all-privileges error block

GRANT ALL PRIVILEGES on *.* gives a database user superuser-equivalent rights including the ability to read all databases, drop tables, and create new admin accounts. Follow least privilege: grant only SELECT/INSERT/UPDATE/DELETE on specific application schemas.

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

Hardcoded database password (CWE-798). Credentials committed to source are accessible to anyone with repository access and persist in git history even after removal. Use environment variables (process.env.DB_PASSWORD) or a secrets manager; rotate any credential that has been committed.

Rule source requires an active Pro or Enterprise subscription.
mariadb-no-load-data-infile-user-path error block

LOAD DATA [LOCAL] INFILE can read arbitrary server-side (or client-side with LOCAL) files and send their content into the database. CVE-2018-10911 (rogue MariaDB server exploit) abused LOCAL INFILE to read client files. Disable LOAD DATA INFILE in server config (secure_file_priv=''); if bulk import is required, validate and restrict the path to a dedicated import directory.

Rule source requires an active Pro or Enterprise subscription.
mariadb-no-string-interpolation-in-query error block

SQL injection risk (CWE-89): query string is built by interpolating variables directly into SQL. Any user-controlled value in the string becomes a SQL injection vector. Use parameterized queries: db.query('SELECT ... WHERE id = ?', [id]) in JS/TS; cursor.execute('SELECT ... WHERE id = %s', (id,)) in Python; Prepared Statements in Java/C#.

Rule source requires an active Pro or Enterprise subscription.
mariadb-no-where-clause-deletion error ask

DELETE or UPDATE statement with no WHERE clause will affect every row in the table — a common cause of catastrophic data loss (CWE-20). Add a WHERE clause. If wiping the table is intentional, use TRUNCATE TABLE (which is explicit) and confirm in a review.

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
Nov 22, 2026
Hash
dcbb40df67561ed54409e1505a725c3bd32df197f5aa6432cc5320738d1ed9a2
Signature
Verified (publisher key)
Tested with
claude-code@current
Plan
Starter (free)
Visibility
Public

Source history

Recent commits

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

No commit history available.