2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-08-26 08:36:42 +00:00
Files
xcat-core/xCAT-server/sbin
Vinícius Ferrão eda5c35bba fix(xcatd): redact secrets in the commands.log response
xcatd redacts the request in commands.log but appends the command response
verbatim. A command whose output holds a secret writes it in clear text.
Examples are tabdump passwd, gettab of a passwd column, and getcredentials.

Collect the response into a per-command buffer. Set a sensitive flag when the
command is getcredentials, an argument names a password, or the request was
redacted. When the command finishes, replace the whole buffer if the flag is
set or the buffer still holds password content, then append the buffer. A
connection can carry more than one command, so the buffer is finalized at the
next command's start and at the end of the connection.

The buffer holds the full response, so a secret split across several callbacks
is also redacted. A per-callback check cannot do this.

The word-content check is a fallback. The request classification is the main
signal. A secret with no password marker, such as the output of an xdsh cat of
a shadow file, is a pre-existing leak of the root-only log. It is out of scope.

Recovered from the lenovobuild branch. Reimplemented against master.
2026-08-18 17:01:26 -03:00
..
2016-07-21 13:27:40 -04:00
2016-07-25 08:56:18 -04:00
2016-07-21 13:27:40 -04:00
2024-05-07 16:43:07 +02:00
2016-07-21 13:27:40 -04:00
2016-07-21 13:27:40 -04:00
2016-07-21 13:27:40 -04:00
2026-04-23 02:01:33 -03:00