spec_from_file_location

python · importlib.util
sinkDerived from model facts
RoleSink
WeaknessCWE-470
WatchesArgument[1]
Kindunsafe-reflection
Confidencehigh
Corroboration2

Sink boundary: Input influences reflective selection of a class, method, or executable capability.

Argument map · what each slot does

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

ArgAccess pathPurposeWatched
Argument[1]Argument[1]The access path Atropos marks for this model.▲ sink
The weakness
CWE-470
Externally-Controlled Class or Code Selection

External input selects classes or executable code through reflection.

What goes wrong
Attacker's-eye view · unsafe-reflection

A crafted name selects a type or operation outside the intended allow-list.

// modeled boundary: Argument[1] spec_from_file_location(attacker_influenced_value);
To decide if this call is a bug, check
1Use explicit mappings instead of reflection.
2Allow-list selectable types and operations.
3Keep selected capabilities least-privileged.
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 Argument[1] as a unsafe-reflection 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 · unsafe-reflection

Across languages

No cross-language match.

What neutralizes it

No sanitizer of this kind is modeled.

Model facts · verbatim from the pack
RoleKindAccess pathModel IDConfidence
sinkunsafe-reflectionArgument[1]python.importlibutil.specfromfilelocation.a1high · corrob. 2