A WordPress key or salt is the sample text, empty or short, so login cookies can be forged
What it finds
A WordPress key or salt is the sample text, empty or short, so login cookies can be forged
<?phpdefine('AUTH_KEY', 'put your unique phrase here');tx0 reports: AUTH_KEY still has the text of the sample configurationdefine('NONCE_SALT', '');tx0 reports: NONCE_SALT is emptydefine('LOGGED_IN_KEY', 'changeme');tx0 reports: LOGGED_IN_KEY is too shortdefine('SECURE_AUTH_KEY', 'n#5W]x~4@?Kz0+L$wq|Yp7^aM2!dC9&bR6*eT3%gU8(hJ1)iO_vF<sE>yN/kG.lH');define('AUTH_SALT', getenv('AUTH_SALT'));define('MY_PLUGIN_KEY', 'x'); Turn it on, off or suppress it
The rule runs from the strict tier up. To turn it on in a lower tier, give it a level in tx0.toml:
[rules]
"tx0/php:wp-weak-secret-key" = "warning"To keep one finding, suppress it with a reason. tx0 suppress ID --reason "..." writes the comment on the line before the code:
// tx0: ignore[tx0/php:wp-weak-secret-key] reason="..."tx0 explain tx0/php:wp-weak-secret-key shows the same in the terminal. Found a false positive? Report it.