-
Notifications
You must be signed in to change notification settings - Fork 7
Sandbox script fixes #1180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: development
Are you sure you want to change the base?
Sandbox script fixes #1180
Conversation
…reporting-windows Hotfix/align transcation reporting windows
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
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. Comment |
| "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
sensitive data (private)
This expression logs
sensitive data (private)
Show autofix suggestion
Hide autofix suggestion
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.
-
Copy modified lines R266-R271
| @@ -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)) | ||
|
|
||
|
|
No description provided.