Skip to content

Conversation

brunopacheco1
Copy link
Collaborator

@brunopacheco1 brunopacheco1 commented Aug 23, 2024

Summary by Sourcery

Add a 'verify_ssl' flag to functions handling HTTP requests to allow optional SSL certificate verification, and update tests to accommodate this new parameter.

Enhancements:

  • Introduce a 'verify_ssl' flag to control SSL certificate verification in HTTP requests across multiple functions.

Tests:

  • Update tests to include the 'verify_ssl' parameter, ensuring SSL verification logic is tested for various scenarios.

Copy link

sourcery-ai bot commented Aug 23, 2024

Reviewer's Guide by Sourcery

This pull request adds a 'verify_ssl' flag to various functions that make HTTP requests, allowing for SSL certificate verification to be optionally disabled. The changes are implemented across multiple files, updating function signatures, call sites, and tests to accommodate this new parameter.

File-Level Changes

Change Details Files
Added 'verify_ssl' parameter to HTTP request functions
  • Updated function signatures to include 'verify_ssl' parameter
  • Modified requests.get() and requests.post() calls to use 'verify' parameter
  • Added 'verify_ssl' parameter to function calls throughout the codebase
  • Updated test cases to include 'verify_ssl' parameter in function calls and assertions
src/rems.py
src/main.py
src/ckan.py
tests/test_create_or_return_form_in_rems.py
tests/test_create_or_return_organization_in_rems.py
tests/test_ckan_functions.py
tests/test_create_or_return_resource_in_rems.py
tests/test_create_or_return_workflow_in_rems.py
tests/test_create_or_return_catalogue_item_in_rems.py
Added environment variable to control SSL verification
  • Introduced 'VERIFY_SSL' environment variable
  • Added logic to parse 'VERIFY_SSL' environment variable
src/main.py

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

inderps
inderps previously approved these changes Aug 23, 2024
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @brunopacheco1 - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider adding a warning log when SSL verification is disabled to prevent accidental use in production environments.
  • Ensure thorough testing, particularly for code paths where SSL verification is disabled, due to the widespread nature of these changes.
Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟡 Testing: 3 issues found
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

@brunopacheco1 brunopacheco1 merged commit 3d1d186 into main Aug 23, 2024
2 checks passed
@brunopacheco1 brunopacheco1 deleted the add_verify_ssl_flag branch August 23, 2024 13:38
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.

2 participants