Skip to content

feat(java): detect anonymous X509TrustManager accepting any certificate (CWE-295) - #121

Open
ai-anant wants to merge 1 commit into
CodeVigilant:mainfrom
ai-anant:rule/java-insecure-trust-manager
Open

feat(java): detect anonymous X509TrustManager accepting any certificate (CWE-295)#121
ai-anant wants to merge 1 commit into
CodeVigilant:mainfrom
ai-anant:rule/java-insecure-trust-manager

Conversation

@ai-anant

Copy link
Copy Markdown

Detects an anonymous X509TrustManager instantiated inside a TrustManager[] array (the shape typically passed to SSLContext.init) whose checkServerTrusted/checkClientTrusted implementations do not delegate to a real TrustManagerFactory. This shape accepts any server certificate and disables certificate validation, enabling man-in-the-middle attacks. The rule is silent when the trust manager delegates to a TrustManagerFactory-derived manager.

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