[high] semgrep: TLS certificate validation is switched off (the callback accepts every certificate), so anyone on the network path can… #602

Closed
opened 2026-11-03 19:26:24 +00:00 by pruefwerk · 5 comments
Member

high Finding

Scanner: semgrep
Severity: high
Rule: cra-ai-15-csharp-cert-validation-disabled
CWE: CWE-295
CRA: cra-ai-15 — Transport-Schutz (Data in Transit) (Annex I)

Description

TLS certificate validation is switched off (the callback accepts every certificate), so anyone on the network path can read and change the traffic (CWE-295). Remove the callback, or pin the expected certificate.

Location

File: compliance-agent/rules/cra_semgrep_csharp.cs (line 215)

Code

            ServicePointManager.ServerCertificateValidationCallback += (sender, cert, chain, errors) => true;

Fingerprint: 7f618c4cd58d7ac580d8d4aa6e686a7d134ade52e4bd703b8e925b1317cab949
Generated by compliance-scanner
Open in Prüfwerk / In Prüfwerk öffnen

## high Finding **Scanner:** semgrep **Severity:** high **Rule:** cra-ai-15-csharp-cert-validation-disabled **CWE:** CWE-295 **CRA:** cra-ai-15 — Transport-Schutz (Data in Transit) (Annex I) ### Description TLS certificate validation is switched off (the callback accepts every certificate), so anyone on the network path can read and change the traffic (CWE-295). Remove the callback, or pin the expected certificate. ### Location **File:** `compliance-agent/rules/cra_semgrep_csharp.cs` (line 215) ### Code ``` ServicePointManager.ServerCertificateValidationCallback += (sender, cert, chain, errors) => true; ``` --- *Fingerprint:* `7f618c4cd58d7ac580d8d4aa6e686a7d134ade52e4bd703b8e925b1317cab949` *Generated by compliance-scanner* [Open in Prüfwerk / In Prüfwerk öffnen](https://pruefwerk.breakpilot.com/findings?target=6ae9aa2160f5d8045fc570a7)
pruefwerk added the severity:highpruefwerkcra:annex-i labels 2026-11-03 19:26:24 +00:00
Author
Member

Prüfwerk: Die Datei liegt in Testdaten (z. B. fixtures/ oder testdata/), die von der Prüfung ausgenommen sind.

The file lies in test data (such as fixtures/ or testdata/), which is left out of the scan.

**Prüfwerk:** Die Datei liegt in Testdaten (z. B. fixtures/ oder testdata/), die von der Prüfung ausgenommen sind. The file lies in test data (such as fixtures/ or testdata/), which is left out of the scan.
Author
Member

Prüfwerk: Die Datei liegt in Testdaten (z. B. fixtures/ oder testdata/), die von der Prüfung ausgenommen sind.

The file lies in test data (such as fixtures/ or testdata/), which is left out of the scan.

**Prüfwerk:** Die Datei liegt in Testdaten (z. B. fixtures/ oder testdata/), die von der Prüfung ausgenommen sind. The file lies in test data (such as fixtures/ or testdata/), which is left out of the scan.
Author
Member

Prüfwerk: Die Datei liegt in Testdaten (z. B. fixtures/ oder testdata/), die von der Prüfung ausgenommen sind.

The file lies in test data (such as fixtures/ or testdata/), which is left out of the scan.

**Prüfwerk:** Die Datei liegt in Testdaten (z. B. fixtures/ oder testdata/), die von der Prüfung ausgenommen sind. The file lies in test data (such as fixtures/ or testdata/), which is left out of the scan.
Author
Member

Prüfwerk: Die Datei liegt in Testdaten (z. B. fixtures/ oder testdata/), die von der Prüfung ausgenommen sind.

The file lies in test data (such as fixtures/ or testdata/), which is left out of the scan.

**Prüfwerk:** Die Datei liegt in Testdaten (z. B. fixtures/ oder testdata/), die von der Prüfung ausgenommen sind. The file lies in test data (such as fixtures/ or testdata/), which is left out of the scan.
Author
Member

Prüfwerk: Die Datei liegt in Testdaten (z. B. fixtures/ oder testdata/), die von der Prüfung ausgenommen sind.

The file lies in test data (such as fixtures/ or testdata/), which is left out of the scan.

**Prüfwerk:** Die Datei liegt in Testdaten (z. B. fixtures/ oder testdata/), die von der Prüfung ausgenommen sind. The file lies in test data (such as fixtures/ or testdata/), which is left out of the scan.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: platform/pruefwerk#602