Scanner: semgrep Severity: medium Rule: cra-ai-13-csharp-ecb-mode CWE: CWE-327
Description
ECB mode encrypts equal blocks to equal ciphertext, so the structure of the data shows through (CWE-327). Use AES-GCM, or CBC with a random IV and a MAC.
## medium Finding
**Scanner:** semgrep
**Severity:** medium
**Rule:** cra-ai-13-csharp-ecb-mode
**CWE:** CWE-327
### Description
ECB mode encrypts equal blocks to equal ciphertext, so the structure of the data shows through (CWE-327). Use AES-GCM, or CBC with a random IV and a MAC.
### Location
**File:** `compliance-agent/rules/cra_semgrep_csharp.cs` (line 203)
### Code
```
aes.Mode = CipherMode.ECB;
```
---
*Fingerprint:* `87a7f3a5891ce2deb184e3974838aabc023020c99ba3b0469d0cd1d57d0ce3bd`
*Generated by compliance-scanner*
[Open in Prüfwerk / In Prüfwerk öffnen](https://pruefwerk.breakpilot.com/findings?target=6ae9aa2160f5d8045fc570a7)
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.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
medium Finding
Scanner: semgrep
Severity: medium
Rule: cra-ai-13-csharp-ecb-mode
CWE: CWE-327
Description
ECB mode encrypts equal blocks to equal ciphertext, so the structure of the data shows through (CWE-327). Use AES-GCM, or CBC with a random IV and a MAC.
Location
File:
compliance-agent/rules/cra_semgrep_csharp.cs(line 203)Code
Fingerprint:
87a7f3a5891ce2deb184e3974838aabc023020c99ba3b0469d0cd1d57d0ce3bdGenerated by compliance-scanner
Open in Prüfwerk / In Prüfwerk öffnen
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.