Skip to content
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

Fix code scanning alert no. 83: Request without certificate validation #611

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

vktrrdk
Copy link
Member

@vktrrdk vktrrdk commented Oct 10, 2024

Fixes https://github.com/deNBI/simplevm-client/security/code-scanning/83

To fix the problem, we need to ensure that SSL certificate verification is enabled for all HTTP requests. This can be done by removing the verify=False parameter or setting it to True. If a custom certificate is required, the path to the certificate should be provided.

  1. Remove the verify=False parameter from the requests.get, requests.post, and requests.delete calls.
  2. If necessary, add a parameter to the class to accept a custom certificate path and use it in the verify parameter.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@vktrrdk vktrrdk changed the base branch from master to dev October 10, 2024 06:28
@vktrrdk vktrrdk marked this pull request as ready for review October 10, 2024 06:28
Copy link
Contributor

Coverage

Coverage Report
FileStmtsMissCoverMissing
simple_vm_client
   VirtualMachineHandler.py1891212 94%
   __init__.py10100% 
   test_virtualmachinehandler.py30022 99%
simple_vm_client/benchmark
   __init__.py00100% 
   test_service.py523636 31%
simple_vm_client/bibigrid_connector
   __init__.py00100% 
   bibigrid_connector.py11855 96%
   test_bibigrid_connector.py1730100% 
simple_vm_client/forc_connector
   __init__.py00100% 
   forc_connector.py25544 98%
simple_vm_client/forc_connector/playbook
   __init__.py00100% 
   playbook.py1900100% 
   test_playbook.py3800100% 
simple_vm_client/forc_connector/template
   __init__.py00100% 
   template.py19511 99%
simple_vm_client/metadata_connector
   metadata_connector.py887171 19%
simple_vm_client/openstack_connector
   __init__.py00100% 
   openstack_connector.py900118118 87%
simple_vm_client/util
   __init__.py00100% 
   state_enums.py690100% 
   test_thrift_converter.py1700100% 
   thrift_converter.py771313 83%
TOTAL315726292% 

Tests Skipped Failures Errors Time
300 0 💤 10 ❌ 0 🔥 5.886s ⏱️

@vktrrdk vktrrdk merged commit 8ae49b7 into dev Oct 10, 2024
3 of 4 checks passed
@dweinholz dweinholz deleted the alert-autofix-83 branch January 13, 2025 08:11
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.

1 participant