Skip to content

Commit

Permalink
[upload] Obfuscate the s3 secret key
Browse files Browse the repository at this point in the history
Signed-off-by: Trevor Benson <[email protected]>
  • Loading branch information
TrevorBenson committed Jan 16, 2024
1 parent 0459f37 commit 141427d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sos/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,8 @@ def _obfuscate_upload_passwords(self):
# get just the relative path that archive works with
f = os.path.relpath(f, _arc_path)
for re in [r"(--upload-pass[\s=]+)\S+",
r"(--upload-url[\s=]+\S+://.*:)([^@]*)"]:
r"(--upload-url[\s=]+\S+://.*:)([^@]*)",
r"(--upload-s3-secret-key[\s=]+)\S+"]:
self.archive.do_file_sub(f, re, r"\1********")

def add_ui_log_to_stdout(self):
Expand Down

0 comments on commit 141427d

Please sign in to comment.