Skip to content

feat(java): detect trust-all Apache HttpClient TLS configuration (CWE-295) - #116

Open
ai-anant wants to merge 1 commit into
CodeVigilant:mainfrom
ai-anant:rule/java-apache-trust-all-tls
Open

feat(java): detect trust-all Apache HttpClient TLS configuration (CWE-295)#116
ai-anant wants to merge 1 commit into
CodeVigilant:mainfrom
ai-anant:rule/java-apache-trust-all-tls

Conversation

@ai-anant

Copy link
Copy Markdown

Adds a rule detecting Apache HttpClient TLS setups that disable certificate validation and hostname verification: a TrustStrategy whose isTrusted() always returns true, or a NoopHostnameVerifier passed to setSSLHostnameVerifier(). Such configurations enable man-in-the-middle attacks; credentials/API keys sent over the connection can be intercepted.

Rule: codevigilant.java.jenkins.ssl.trust-all-apache-client
Validated with semgrep --validate; fires on trust-all strategies and NoopHostnameVerifier, silent on default verifier/trust-store-backed code.

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