Skip to content

Commit d208122

Browse files
Merge pull request #7873 from bfournie/agent-platform-pwd-redact
OCPBUGS-26434: Redact platform passwords in agent-gather output
2 parents 3473f59 + efeb3d0 commit d208122

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

data/data/agent/files/usr/local/bin/agent-gather

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@ function gather_agent_data() {
2828
( >&2 echo -n "Gathering agent installation data" )
2929
mkdir -p "${ARTIFACTS_DIR}/etc"
3030
cp -a /etc/assisted{,-service} "${ARTIFACTS_DIR}/etc/"
31-
# Redact pull secrets
31+
# Redact pull secrets and platform passwords
3232
for manifest in "${ARTIFACTS_DIR}"/etc/assisted/manifests/*; do
3333
sed -i -e '/"auth":/ s/: *"[A-Za-z0-9+/]*=*"/: "<redacted>"/g' "${manifest}"
34+
sed -i -e '/install-config-overrides/ s/"password":"[^"]*/"password":"<redacted>/g' "${manifest}"
3435
done
3536
( >&2 echo -n ".")
3637
mkdir "${ARTIFACTS_DIR}/etc/containers"

0 commit comments

Comments
 (0)