masq is a command line tool to erase sensitive information in SQL/MySQL Process List
$ cat select_users_by_name.sql
SELECT
*
FROM
users
WHERE
user_name = 'Noriyuki Kazusawa';$ masq -t sql select_users_by_name.sql
SELECT * FROM users WHERE user_name = '<mask>'$ masq -t mysql/process-list processlist.txt > masked_resultUsage: masq [input_file] [options...]
[supported file types]
sql
mysql/process-list
[options]
-r, --replace Replacement string
-t, --input-type Specifies the file format of input_file
-h, --help Print this help text and exitGraalVM 21.x+ with JDK 16
$ ./gradlew nativeImage
$ ./build/bin/masq
$ ./gradlew shadowJar
$ java -jar ./build/libs/masq-all.jar
- The current version of masq erases newlines in SQL.