-
Notifications
You must be signed in to change notification settings - Fork 68
updating all refs to massive and updating benzinga to be real time #40
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
Conversation
| return | ||
|
|
||
| print("Testing list_benzinga_news v2 API integration") | ||
| print(f"API Key: {api_key[:10]}...{api_key[-4:] if len(api_key) > 14 else '****'}") |
Check failure
Code scanning / CodeQL
Clear-text logging of sensitive information High test
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 2 months ago
To fix the problem, remove the print statement that exposes any portion of the sensitive API key. Instead of outputting the actual value or any substring thereof, print a message indicating that the API key is set without revealing any part of it. This maintains the logic flow (still confirming that the API key is loaded), but avoids logging even a partial secret.
Details:
- Only replace line 145 and its string output.
- You may print something generic (e.g., "API Key found in environment.") or similar.
- No changes to logic, imports, or additional functions are necessary, as only the output format is altered.
- Ensure that the replacement line gives no hint of the API key’s contents or length.
-
Copy modified line R145
| @@ -142,7 +142,7 @@ | ||
| return | ||
|
|
||
| print("Testing list_benzinga_news v2 API integration") | ||
| print(f"API Key: {api_key[:10]}...{api_key[-4:] if len(api_key) > 14 else '****'}") | ||
| print("API Key: [REDACTED] (loaded from environment)") | ||
| print() | ||
|
|
||
| tests = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to do
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clear-text logging of sensitive information
This expression logs sensitive data (password) as clear text.
pyproject.toml
Outdated
| "mcp[cli]>=1.15.0", | ||
| "polygon-api-client>=1.15.4", | ||
| "massive>=2.0.1", | ||
| "python-dotenv>=1.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the latest version of python-dotenv is 1.2.1. Can we set this to "python-dotenv>=1.2.0" to stay close to current?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to find solution
joedursun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one minor comment but overall LGTM. Thanks, @Smartoneinok!
|
@nsknithish13-cmd |
|
@nsknithish13-cmd |
|
I updated the polygon client to be the massive client and updated it to the most recent version.
I also changed the list_benzinga_news to use the new v2 method in the client. I tested this with the inspector. Added in a test class for this as well as .env testing capability.