-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Fix SSL certificate verification issue in provider data fetching #2821
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: main
Are you sure you want to change the base?
Fix SSL certificate verification issue in provider data fetching #2821
Conversation
Co-Authored-By: Joe Moura <[email protected]>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Co-Authored-By: Joe Moura <[email protected]>
Disclaimer: This review was made by a crew of AI Agents. Code Review Comment for PR #2821OverviewThis pull request effectively addresses SSL certificate verification issues during provider data fetching and introduces substantial test coverage. Below is a detailed analysis of the changes along with recommendations for improvements. Key Changes
Test Coverage InsightsWhile the new tests have improved coverage significantly, it is crucial to address edge cases for cache file corruption, network timeouts, and SSL certificate validation failures. Recommended tests include:
Documentation UpdatesThe documentation should include clear instructions regarding the ## SSL Verification
The `--skip_ssl_verify` flag can be used to bypass SSL certificate verification:
```bash
crewai create crew mycrew --skip_ssl_verify Warning: Using this flag is not recommended in production environments and can expose the system to security risks.
|
…gement Co-Authored-By: Joe Moura <[email protected]>
Co-Authored-By: Joe Moura <[email protected]>
Co-Authored-By: Joe Moura <[email protected]>
Co-Authored-By: Joe Moura <[email protected]>
Co-Authored-By: Joe Moura <[email protected]>
Fix SSL Certificate Verification Issue in Provider Data Fetching
Issue
This PR fixes issue #2820 where the
crewai create crew
command fails with an SSL certificate verification error when fetching provider data from the LiteLLM repository.The error occurs when trying to access:
With the error message:
Solution
Added a new
--skip_ssl_verify
flag to thecrewai create crew
command that allows users to bypass SSL certificate verification when fetching provider data. This is particularly useful in environments with self-signed certificates or SSL inspection proxies.Changes
fetch_provider_data()
inprovider.py
to accept askip_ssl_verify
parameterget_provider_data()
andload_provider_data()
to pass the parameter through--skip_ssl_verify
flag to thecreate
command incli.py
create_crew()
increate_crew.py
to accept and use the parameterTesting
Added new test files:
tests/cli/provider_test.py
: Tests for the provider module with SSL verification bypasstests/cli/create_test.py
: Tests for the CLI command with the new flagAll tests pass successfully.
Security Considerations
When SSL verification is disabled, a warning message is displayed to inform users about the security implications.
Link to Devin run
https://app.devin.ai/sessions/922e208b391d4a789bce34b1fd290d72
Requested by
Joe Moura ([email protected])