Detect cross-site scripting (XSS) before merge.
See how cross-site scripting (XSS) fits local review, which evidence Code Radar produces, where coverage ends, and how trusted findings move into CI.
radar scan . --quickWhat cross-site scripting (XSS) means here.
The cross-site scripting (XSS) rule identifies review patterns that can create exploitable behavior or hide material maintenance risk, then returns the affected location, severity, confidence, and remediation context.
Evidence to inspect
Use “Detect cross-site scripting (XSS) before merge.” as the scope for this decision: verify the input, finding detail, workflow handoff, and product boundary before you install or buy.
Check this risk locally
Coverage and concrete signals
Detect untrusted data reaching HTML sinks and the safer text-rendering alternative.
- Audience: Developers and reviewers deciding how to handle cross-site scripting (XSS) findings before merge.
- Evidence to inspect before you trust the result.: Trace the value into an HTML sink, confirm the rendering context, and compare the escaping or text-rendering fix with the unsafe example.
- Boundary: False positives are possible when a trusted sanitizer or framework encoder is proven at the sink; verify that boundary, then test the browser behavior after replacing the sink.
- Rule ID: RADAR-SEC-XSS
Risky pattern / Safer pattern
cross-site scripting (XSS): A useful result must be explainable to a developer and portable to the next review surface. Inspect the concrete evidence below before changing team policy.
From local signal to shared gate.
cross-site scripting (XSS): Use the smallest workflow that proves value. Each later step should reuse evidence the team already understands. Trace the value into an HTML sink, confirm the rendering context, and compare the escaping or text-rendering fix with the unsafe example.
radar scan . --quick
radar scan . --format sarif --fail-on highPrimary sources
Validate the workflow on your own code.
Apply this page’s evidence to one real repository. For “Detect cross-site scripting (XSS) before merge.”, confirm which finding is produced, whether the proposed next step is reproducible, and where local scanning, reports, agents, or CI should stop or expand.