Skip to content

chore: minor formatting fixes#277

Merged
ashishb merged 1 commit intomasterfrom
ashishb/fix17
May 9, 2025
Merged

chore: minor formatting fixes#277
ashishb merged 1 commit intomasterfrom
ashishb/fix17

Conversation

@ashishb
Copy link
Owner

@ashishb ashishb commented May 9, 2025

No description provided.

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label May 9, 2025
@ashishb ashishb force-pushed the ashishb/fix17 branch 2 times, most recently from 2d91fe2 to 268655b Compare May 9, 2025 00:51
message = '%s%s%s' % (BashColors.WARNING, message, BashColors.ENDC)
def print_verbose(message: str) -> None:
if __VERBOSE_MODE and _is_interactive_terminal():
print(f"{BashColors.WARNING}{message}{BashColors.ENDC}")

Check failure

Code scanning / CodeQL

Clear-text logging of sensitive information High

This expression logs
sensitive data (password)
as clear text.

Copilot Autofix

AI 9 months ago

To fix the issue, we need to ensure that sensitive data, such as passwords, is not logged. The best approach is to sanitize the log messages by either omitting the sensitive data or replacing it with a placeholder like [REDACTED]. In this case, we will modify the print_verbose call in perform_app_backup to exclude the password from the log message. Additionally, we will add a comment to clarify that sensitive data should not be logged.


Suggested changeset 2
adbe/output_helper.py

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/adbe/output_helper.py b/adbe/output_helper.py
--- a/adbe/output_helper.py
+++ b/adbe/output_helper.py
@@ -27,2 +27,3 @@
 def print_verbose(message: str) -> None:
+    # Ensure that sensitive data (e.g., passwords) is not included in the message.
     if __VERBOSE_MODE and _is_interactive_terminal():
EOF
@@ -27,2 +27,3 @@
def print_verbose(message: str) -> None:
# Ensure that sensitive data (e.g., passwords) is not included in the message.
if __VERBOSE_MODE and _is_interactive_terminal():
adbe/adb_enhanced.py
Outside changed files

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/adbe/adb_enhanced.py b/adbe/adb_enhanced.py
--- a/adbe/adb_enhanced.py
+++ b/adbe/adb_enhanced.py
@@ -1633,3 +1633,3 @@
     print_message(
-        'you might have to confirm the backup manually on your device\'s screen, enter \"%s\" as password...' % password)
+        'You might have to confirm the backup manually on your device\'s screen. A password is required, but it will not be displayed for security reasons.')
 
EOF
@@ -1633,3 +1633,3 @@
print_message(
'you might have to confirm the backup manually on your device\'s screen, enter \"%s\" as password...' % password)
'You might have to confirm the backup manually on your device\'s screen. A password is required, but it will not be displayed for security reasons.')

Copilot is powered by AI and may make mistakes. Always verify output.
@ashishb ashishb merged commit 1b7e225 into master May 9, 2025
10 of 11 checks passed
@ashishb ashishb deleted the ashishb/fix17 branch May 9, 2025 04:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant