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

HttpClient setTrustAllCertificates(true) not working as expected #106

Closed
dawidg-doyen opened this issue Oct 31, 2023 · 3 comments
Closed
Labels
bug Something isn't working

Comments

@dawidg-doyen
Copy link
Contributor

Hi

When developing Tsunami scanner plugins/detectors I came across an issue with insecure SSL certificates. Despite configuring an http client to trust all certificates with:

this.httpClient = checkNotNull(httpClient).modify().setTrustAllCertificates(true).build();

The detector still fails with javax.net.ssl.SSLHandshakeException exception when
it comes across a web server with an insecure certificate. So this option does not seem to be working as expected.

To get around this issue I had to run Tsunami scanner with the:
--http-client-trust-all-certificate
option.

This can result in some false negative findings / missed targets if a user doesn't run the scanner with this option specifically.

Thanks
Dawid

@maoning
Copy link
Collaborator

maoning commented Nov 9, 2023

I got the full context after reviewing the k8s open access pull request. Yes, this is indeed a bug. To keep it simple, I will remove the option to modify setTrustAllCertificates from the client (client was never set up to support the on-the-fly modification of this option), and set setTrustAllCertificates to true by default. The option will still available at the top level, so that users can turn it off via --http-client-trust-all-certificate flag.

@tooryx tooryx added the bug Something isn't working label Jan 9, 2024
@JamesFoxxx
Copy link

This was annoying for me too, could you please prioritize this issue?

ikkisoft added a commit to doyensec/tsunami-security-scanner that referenced this issue Aug 17, 2024
@tooryx
Copy link
Member

tooryx commented Aug 26, 2024

This should now be fixed

@tooryx tooryx closed this as completed Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants