Skip to content

Commit 782849c

Browse files
Fix: Remove sensitive logging from restore_secrets.py
This commit removes print statements from `scripts/gha/restore_secrets.py` that were logging potentially sensitive file paths. This addresses security alerts raised by the GitHub Advanced Security bot regarding clear-text logging of sensitive information.
1 parent efc5065 commit 782849c

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

scripts/gha/restore_secrets.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ def main(argv):
109109
else:
110110
# If not a google-services file or the artifact API directory doesn't exist,
111111
# skip this file for artifact processing.
112-
print(f"Skipping artifact path for {path} (API: {api}, Artifact: {FLAGS.artifact})")
113112
# This continue is vital: if no artifact path, don't fall through to default path logic for this file.
114113
continue
115114
else:
@@ -119,7 +118,6 @@ def main(argv):
119118

120119
# If dest_paths is still empty (e.g., was artifact flow but conditions not met), skip.
121120
if not dest_paths:
122-
print(f"No valid destination paths determined for {path} (API: {api}). Skipping.")
123121
continue
124122

125123
# Append internal integration test path if it exists, for non-GMA APIs.
@@ -133,16 +131,13 @@ def main(argv):
133131

134132
# If, after all checks, dest_paths is empty, skip.
135133
if not dest_paths:
136-
print(f"No destination paths after internal check for {path}. Skipping.")
137134
continue
138135

139136
decrypted_text = _decrypt(path, passphrase)
140137
for dest_path_item in dest_paths:
141138
# Final explicit check, although redundant if above logic is correct.
142139
if "/gma/" in dest_path_item or "\\gma\\" in dest_path_item:
143-
print(f"CRITICAL WARNING: Attempting to write to a GMA path, this should not happen: {dest_path_item}. Skipping.")
144140
continue
145-
print(f"Writing decrypted file to {dest_path_item}")
146141
with open(dest_path_item, "w") as f:
147142
f.write(decrypted_text)
148143
print("Copied decrypted google service file to %s" % dest_path_item)

0 commit comments

Comments
 (0)