TMAegisBeta
More rules for mariadb

MariaDB

TMA-MARIADB-2.3

Do Not Specify Passwords in the Command Line

MediumLevel 1Manual reviewmariadb

Description

When a command is executed on the command line, for example mariadb -u admin -p password, the password may be visible in the user's shell/command history or in the process list.

How it is checked

Audit method: Manual review

This recommendation cannot be checked automatically. A scan lists it with these instructions when you pass --include-manual.

Check the process list (ps -ef) and shell histories for mariadb/mysqldump invocations with -p<password> or --password=<password>. Any visible password is a fail.

How it is fixed

Fix method: Guidance or infrastructure patch

Use -p without a value (prompt), an option file with mode 0600 instead of passwords on the command line, and clear exposed history entries.

Properties

Operating systems
Any
Tags
mariadbdatabasecredentialsmanual
Reference
CIS MariaDB 10.11 Benchmark v1.0.0 - 2.3 Do Not Specify Passwords in the Command Line