Scanner: semgrep Severity: high Rule: cra-ai-20-c-unbounded-string-function CWE: CWE-120
Description
strcpy() writes without a bound on the destination — input longer than the buffer overflows it (CWE-120). Use a bounded call (snprintf, strncpy/strlcpy with the buffer size).
## high Finding
**Scanner:** semgrep
**Severity:** high
**Rule:** cra-ai-20-c-unbounded-string-function
**CWE:** CWE-120
### Description
strcpy() writes without a bound on the destination — input longer than the buffer overflows it (CWE-120). Use a bounded call (snprintf, strncpy/strlcpy with the buffer size).
### Location
**File:** `fixtures/nightly/firmware/c-sensor-node/Core/Src/comms.c` (line 20)
### Code
```
strcpy(command, rx_buffer);
```
### Remediation
Exclude fixtures/nightly from security scanning or mark it as test code.
---
*Fingerprint:* `93257fc743508042db9fb3cce9792a72bd67ddde7b73169d9a72a889f16cfd17`
*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.
high Finding
Scanner: semgrep
Severity: high
Rule: cra-ai-20-c-unbounded-string-function
CWE: CWE-120
Description
strcpy() writes without a bound on the destination — input longer than the buffer overflows it (CWE-120). Use a bounded call (snprintf, strncpy/strlcpy with the buffer size).
Location
File:
fixtures/nightly/firmware/c-sensor-node/Core/Src/comms.c(line 20)Code
Remediation
Exclude fixtures/nightly from security scanning or mark it as test code.
Fingerprint:
93257fc743508042db9fb3cce9792a72bd67ddde7b73169d9a72a889f16cfd17Generated 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.