- Enhanced SSL function documentation with detailed examples and environment variable precedence
- Added CA bundle file format validation (.pem, .crt, .cer) with warnings for unsupported formats
- Improved error handling with structured solutions and current CA bundle path display
- Added comprehensive tests for file format validation and warning scenarios
- Enhanced user guidance for SSL certificate configuration issues
Addresses feedback from joaomdmoura's AI code review for better documentation,
error handling, and path validation as requested.
Co-Authored-By: João <joao@crewai.com>
- Remove unused pytest imports from test files (fixes lint errors)
- Fix CodeQL security alert by using exact URL validation instead of substring check
- Enhance SSL function documentation with detailed environment variable precedence
- Improve error handling in fetch_provider_data with current CA bundle path display
- Add more helpful guidance for SSL certificate configuration issues
Addresses feedback from AI code review and resolves CI lint/security failures.
Co-Authored-By: João <joao@crewai.com>
- Add get_ssl_verify_config() function to respect SSL environment variables
- Support REQUESTS_CA_BUNDLE, SSL_CERT_FILE, CURL_CA_BUNDLE env vars
- Fallback to certifi.where() when no custom CA bundle is specified
- Improve error handling for SSL verification failures
- Add comprehensive tests for SSL configuration scenarios
Fixes#2978
Co-Authored-By: João <joao@crewai.com>