vetkit.csharp.tls.certificate-validation-disabled
TLS server certificate validation is disabled with a callback that always returns true (or DangerousAcceptAnyServerCertificateValidator). Any machine-in-the-middle can impersonate the server.
Last updated:
Suite: Security
csharp
TLS server certificate validation is disabled with a callback that always returns true (or DangerousAcceptAnyServerCertificateValidator). Any machine-in-the-middle can impersonate the server.
Category: SECURITY · Engine rule severity: ERROR
How to fix it
Remove the callback. To trust a private CA or pin a certificate, validate the chain against that CA/thumbprint inside the callback and return false otherwise.
References
Source: packages/engine/rules/sast/csharp.yml.
Generated from shipped rule definitions at build time. Matching is a review signal, not proof of exploitability. “generic” denotes text matching, not complete language or framework coverage. Runtime configuration and available tools affect whether a rule runs.