Skip to content

Conversation

@jlkravitz
Copy link
Collaborator

No description provided.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 27, 2025

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch sandbox-script-fixes

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

"SANDBOX_AUTHORIZE_NET_TRANSACTION_KEY": "your_sandbox_transaction_key",
}

print(json.dumps(config, indent=2))

Check failure

Code scanning / CodeQL

Clear-text logging of sensitive information High

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

Copilot Autofix

AI 3 months ago

To fix this issue, avoid logging or outputting any sensitive information in cleartext, especially those fields that could contain or reference sensitive user data (like SSNs, credentials, secrets, etc). In this case, the field "CC_TEST_GET_PROVIDER_SSN_LAMBDA_NAME" is the direct source of taint.

The best fix is to redact (replace with a placeholder string like "REDACTED") or omit sensitive fields from the configuration dictionary before printing it. Specifically, prior to the print(json.dumps(config, indent=2)) line, overwrite the value of "CC_TEST_GET_PROVIDER_SSN_LAMBDA_NAME" in the config dict with "REDACTED" (or something similar). Similarly, consider redacting other likely sensitive fields (SANDBOX_AUTHORIZE_NET_API_LOGIN_ID, SANDBOX_AUTHORIZE_NET_TRANSACTION_KEY, passwords) to avoid future leaks.

To implement these changes, edit the file backend/compact-connect/bin/sandbox_fetch_aws_resources.py at the function print_smoke_test_config. Just after building the config dictionary and before printing, overwrite the sensitive values. No additional imports are needed.


Suggested changeset 1
backend/compact-connect/bin/sandbox_fetch_aws_resources.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/backend/compact-connect/bin/sandbox_fetch_aws_resources.py b/backend/compact-connect/bin/sandbox_fetch_aws_resources.py
--- a/backend/compact-connect/bin/sandbox_fetch_aws_resources.py
+++ b/backend/compact-connect/bin/sandbox_fetch_aws_resources.py
@@ -263,6 +263,12 @@
         "SANDBOX_AUTHORIZE_NET_TRANSACTION_KEY": "your_sandbox_transaction_key",
     }
 
+    # Redact sensitive fields before printing
+    config["CC_TEST_GET_PROVIDER_SSN_LAMBDA_NAME"] = "REDACTED"
+    config["CC_TEST_PROVIDER_USER_PASSWORD"] = "REDACTED"
+    config["SANDBOX_AUTHORIZE_NET_API_LOGIN_ID"] = "REDACTED"
+    config["SANDBOX_AUTHORIZE_NET_TRANSACTION_KEY"] = "REDACTED"
+
     print(json.dumps(config, indent=2))
 
 
EOF
@@ -263,6 +263,12 @@
"SANDBOX_AUTHORIZE_NET_TRANSACTION_KEY": "your_sandbox_transaction_key",
}

# Redact sensitive fields before printing
config["CC_TEST_GET_PROVIDER_SSN_LAMBDA_NAME"] = "REDACTED"
config["CC_TEST_PROVIDER_USER_PASSWORD"] = "REDACTED"
config["SANDBOX_AUTHORIZE_NET_API_LOGIN_ID"] = "REDACTED"
config["SANDBOX_AUTHORIZE_NET_TRANSACTION_KEY"] = "REDACTED"

print(json.dumps(config, indent=2))


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.

3 participants