Detect path traversal before merge.
See how path traversal fits local review, which evidence Code Radar produces, where coverage ends, and how trusted findings move into CI.
radar scan . --quickWhat path traversal means here.
The path traversal 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 path traversal 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 request paths escaping an intended directory boundary.
- Audience: Developers and reviewers deciding how to handle path traversal findings before merge.
- Evidence to inspect before you trust the result.: Check how request paths are resolved against the base directory and verify that the safer example rejects paths outside that boundary.
- Boundary: A trusted identifier or a resolver that canonicalizes and enforces containment can avoid a finding; verify symlink and encoded-path cases before suppressing.
- Rule ID: RADAR-SEC-PATH
Risky pattern / Safer pattern
path traversal: 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.
path traversal: Use the smallest workflow that proves value. Each later step should reuse evidence the team already understands. Check how request paths are resolved against the base directory and verify that the safer example rejects paths outside that boundary.
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 path traversal 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.