Scanner: semgrep Severity: medium Rule: cra-ai-20-node-reflected-input CWE: CWE-79
Description
Request input is written into the response without encoding, so a crafted link runs script in the user's browser (reflected XSS, CWE-79). Encode it, or use a template engine that escapes by default.
## medium Finding
**Scanner:** semgrep
**Severity:** medium
**Rule:** cra-ai-20-node-reflected-input
**CWE:** CWE-79
### Description
Request input is written into the response without encoding, so a crafted link runs script in the user's browser (reflected XSS, CWE-79). Encode it, or use a template engine that escapes by default.
### Location
**File:** `compliance-agent/rules/cra_semgrep.js` (line 9)
### Code
```
res.send("<p>Exported for " + req.query.customer + "</p>" + stdout);
```
### Remediation
None; if this file is ever executed as app code, escape req.query.customer before rendering.
---
*Fingerprint:* `e8876c0eea6cf7eeeaee98b1b7f2506413dd05c615072925af373b25b50d70d4`
*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-20-node-reflected-input
CWE: CWE-79
Description
Request input is written into the response without encoding, so a crafted link runs script in the user's browser (reflected XSS, CWE-79). Encode it, or use a template engine that escapes by default.
Location
File:
compliance-agent/rules/cra_semgrep.js(line 9)Code
Remediation
None; if this file is ever executed as app code, escape req.query.customer before rendering.
Fingerprint:
e8876c0eea6cf7eeeaee98b1b7f2506413dd05c615072925af373b25b50d70d4Generated 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.