Page MenuHomePhabricator

maintain-dbusers should not pass sensitive data in command line parameters
Closed, ResolvedPublic

Description

When maintain-dbusers and its service running on the NFS server write a replica.my.cnf file, the full content of the file is passed as a parameter to write_replica_cnf.sh. On Unix systems the full command line is not at all secure: the password is logged into sudo logs, exposed via ps (see e.g. T396232), etc.

This is not particularly exploitable as the NFS servers are restricted to Toolforge admins only, but should be fixed regardless. (I think the easiest way would be to pass the file contents as standard input to the helper script.)

Event Timeline

aputhin triaged this task as Medium priority.Apr 29 2026, 2:21 PM
aputhin moved this task from Backlog to Todos on the tools-platform-team board.

Change #1288521 had a related patch set uploaded (by Raymond Ndibe; author: Raymond Ndibe):

[operations/puppet@production] write_replica_cnf: pass data via standard input

https://gerrit.wikimedia.org/r/1288521

Change #1288521 merged by FNegri:

[operations/puppet@production] write_replica_cnf: pass data via standard input

https://gerrit.wikimedia.org/r/1288521

Raymond_Ndibe moved this task from In review to Done on the tools-platform-team board.