Skip to content

Potential fix for code scanning alert no. 5: Cleartext transmission of sensitive information#8

Draft
DasIstMeow wants to merge 2 commits intomainfrom
alert-autofix-1
Draft

Potential fix for code scanning alert no. 5: Cleartext transmission of sensitive information#8
DasIstMeow wants to merge 2 commits intomainfrom
alert-autofix-1

Conversation

@DasIstMeow
Copy link
Owner

Potential fix for https://github.com/DasIstTobias/randombytes-mc-control/security/code-scanning/5

To fix the problem, we should ensure that certificate validation is not disabled when making HTTPS requests to external APIs. Specifically, remove or set .danger_accept_invalid_certs(false) in the reqwest::Client::builder() configuration for both Mojang and Crafatar API calls in backend-frontend/src/main.rs. This guarantees that HTTPS encryption and certificate validation are properly enforced, protecting any transmitted information from interception. Only lines where a reqwest::Client is configured should be changed; no changes to request URLs or data flow are needed. No new dependencies are required, and existing code functionality is preserved.

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

…itive information

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…itive information

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant