> For clean Markdown of this page, append .md to its URL. For the complete documentation index, see https://www.superagent.sh/llms.txt.


Review whether code restricts reads and writes to the intended files or directories.

# Path traversal and file access boundaries


[← Back to attack scenarios](https://www.superagent.sh/docs/products/red-teaming/attack-scenarios)

A service that accepts a file location needs to enforce which part of the filesystem it can use. This scenario examines how the code applies that boundary to file reads and writes.

It applies to repositories with file storage, archive processing, or workspace features. A finding identifies the operation and the filesystem boundary it crossed.

The app lists this scenario as **Read or write outside an allowed file boundary** (`REPO-09`) in [Repository Red Teaming](https://www.superagent.sh/docs/products/red-teaming/repositories).

## Standards and guidance

[CWE-22 Path Traversal](https://cwe.mitre.org/data/definitions/22.html)

---
Source: https://www.superagent.sh/docs/products/red-teaming/attack-scenarios/repository-filesystem-boundaries
Index: https://www.superagent.sh/llms.txt
