Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix code scanning alert no. 11: Disabling certificate validation #10

Merged
merged 1 commit into from
Nov 27, 2024

Conversation

guruh46
Copy link
Owner

@guruh46 guruh46 commented Nov 27, 2024

Fixes https://github.com/guruh46/vscode-gitlens/security/code-scanning/11

To fix the problem, we need to ensure that certificate validation is not disabled by setting rejectUnauthorized to false. Instead, we should allow the default behavior, which is to validate certificates. If there is a need to handle SSL errors, it should be done in a secure manner, possibly by logging the errors or providing a way to handle them without disabling validation.

The best way to fix this issue is to remove the line that sets rejectUnauthorized: false and ensure that the default behavior of validating certificates is maintained. This change should be made in the wrapForForcedInsecureSSL function.

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>
@guruh46 guruh46 marked this pull request as ready for review November 27, 2024 11:44
@guruh46 guruh46 merged commit bc73a36 into main Nov 27, 2024
6 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant