write_text

python · standard library · Path
sinkDerived from model facts
RoleSink
WeaknessCWE-22
WatchesReceiver
Kindpath-traversal
Confidencehigh
Corroboration2

Sink boundary: Input participates in a filesystem path that should remain inside a trusted directory.

Argument map · what each slot does

The pack does not provide a callable signature for this record; the watched access path is shown directly.

No positional argument is specified; inspect the return value or named access path in the model facts below.
The weakness
CWE-22
Path Traversal

External input constructs a pathname that can escape its intended directory.

What goes wrong
Attacker's-eye view · path-traversal

Traversal segments, absolute paths, or links escape the intended root and reach another resource.

// modeled boundary: Receiver write_text(attacker_influenced_value);
To decide if this call is a bug, check
1Resolve against a fixed root.
2Reject traversal and unexpected schemes.
3Check the resolved path before access.
These checks require the surrounding codebase. The model names the boundary; it does not decide reachability or prove that a guard dominates every path.
Is this a bug in your code?Atropos stops here — by design

Atropos identifies Receiver as a path-traversal sink. It cannot see whether untrusted data reaches this call in your repository.

Lachesis is the codebase-level step: it traces reachability and guards for this symbol.

Check this symbol in Lachesis
The family · path-traversal
Model facts · verbatim from the pack
RoleKindAccess pathModel IDConfidence
sinkpath-traversalReceiverpython.pathlib.path.writetext.recvhigh · corrob. 2