[^=]+?)(?P\s*)=(?P\s*).*$")
+out_lines = []
+
+for line in text.splitlines():
+ stripped = line.strip()
+ if not stripped or stripped.startswith((';', '#')) or '=' not in line:
+ out_lines.append(line)
+ continue
+ m = pattern.match(line)
+ if not m:
+ out_lines.append(line)
+ continue
+ key = m.group("key").strip()
+ lead = m.group("lead")
+ pre = m.group("pre")
+ post = m.group("post")
+ if key in secret_map:
+ value = secret_map[key]
+ out_lines.append(f"{lead}{key}{pre}={post}{value}")
+ continue
+ if re.search(r"(?i)(password|token|secret)", key):
+ out_lines.append(f"{lead}{key}{pre}={post}${{OPENBAO:REDACTED}}")
+ continue
+ out_lines.append(line)
+
+target.write_text("\n".join(out_lines) + "\n")
+print(f"OK: Wrote sanitized gold config: {target}")
+PY
+
+echo ""
+echo "=============================================="
+echo " OK: Silent Install Test Completed"
+echo "=============================================="
+echo ""