Skip to content

CP-7292 Add cache functionality#30

Open
jscrobinson wants to merge 2 commits intomainfrom
feature/CP-7292-add-caching
Open

CP-7292 Add cache functionality#30
jscrobinson wants to merge 2 commits intomainfrom
feature/CP-7292-add-caching

Conversation

@jscrobinson
Copy link
Copy Markdown
Contributor

Prevent's multiple calls to AWS API unless cache is disabled with --no-cache option.

return result # Return result if successful
except exception as e:
print(f"{message_prefix} Attempt {attempts+1} failed: {e}")
print(f"{message_prefix} Attempt {attempts + 1} failed: {e}")

Check failure

Code scanning / CodeQL

Clear-text logging of sensitive information

This expression logs [sensitive data (secret)](1) as clear text. This expression logs [sensitive data (secret)](2) as clear text. This expression logs [sensitive data (secret)](3) as clear text.

Copilot Autofix

AI about 1 year ago

To fix the problem, we should avoid logging sensitive information directly. Instead of logging the entire message_prefix, we can log a generic message that does not include sensitive data. This way, we still get useful information about the failure without exposing sensitive details.

  • Replace the log message on line 472 to exclude sensitive information.
  • Ensure that the new log message provides enough context to be useful for debugging without revealing sensitive data.
Suggested changeset 1
croudtech_bootstrap_app/bootstrap.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/croudtech_bootstrap_app/bootstrap.py b/croudtech_bootstrap_app/bootstrap.py
--- a/croudtech_bootstrap_app/bootstrap.py
+++ b/croudtech_bootstrap_app/bootstrap.py
@@ -471,3 +471,3 @@
             except exception as e:
-                print(f"{message_prefix} Attempt {attempts + 1} failed: {e}")
+                print(f"Attempt {attempts + 1} failed: {e}")
                 attempts += 1
EOF
@@ -471,3 +471,3 @@
except exception as e:
print(f"{message_prefix} Attempt {attempts + 1} failed: {e}")
print(f"Attempt {attempts + 1} failed: {e}")
attempts += 1
Copilot is powered by AI and may make mistakes. Always verify output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants