[high] semgrep: A credential (plcPassword) is written into the source — every installation shares it, and it can be read out of the… #606

Closed
opened 2026-11-03 19:26:26 +00:00 by pruefwerk · 1 comment
Member

high Finding

Scanner: semgrep
Severity: high
Rule: cra-ai-8-csharp-hardcoded-credential
CWE: CWE-798

Description

A credential (plcPassword) is written into the source — every installation shares it, and it can be read out of the assembly (CWE-798). Load it from protected configuration or a secret store.

Location

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

Code

            var plcPassword = "Siemens#S7-1500";

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

## high Finding **Scanner:** semgrep **Severity:** high **Rule:** cra-ai-8-csharp-hardcoded-credential **CWE:** CWE-798 ### Description A credential (plcPassword) is written into the source — every installation shares it, and it can be read out of the assembly (CWE-798). Load it from protected configuration or a secret store. ### Location **File:** `compliance-agent/rules/cra_semgrep_csharp.cs` (line 249) ### Code ``` var plcPassword = "Siemens#S7-1500"; ``` --- *Fingerprint:* `865806ce65b7966aae28a6970d5815d8eb5d7343c3fdd8b52ffd67ded12d5899` *Generated by compliance-scanner* [Open in Prüfwerk / In Prüfwerk öffnen](https://pruefwerk.breakpilot.com/findings?target=6ae9aa2160f5d8045fc570a7)
pruefwerk added the cra:annex-iseverity:highpruefwerk labels 2026-11-03 19:26:26 +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.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: platform/pruefwerk#606