system

python · os
sink✓ Reviewed · 2026-09-04
RoleSink
WeaknessCWE-78
WatchesArgument[0]
Kindcommand-injection
Confidencehigh
Corroboration3

Hands a command string to the operating system shell, preserving shell expansion and metacharacter behavior.

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[0]Argument[0]The access path Atropos marks for this model.▲ sink
The weakness
CWE-78
OS Command Injection

External input alters the syntax or behavior of an operating-system command.

What goes wrong
Attacker's-eye view · command-injection

An attacker adds separators, substitutions, or flags that turn a value into a second command or alter the first.

// modeled boundary: Argument[0] system(attacker_influenced_value);
To decide if this call is a bug, check
1Use a fixed executable and argument array.
2Keep shell parsing disabled where possible.
3Validate executable and argument domains.
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[0] as a command-injection 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
Reviewed guidance

Safer direction: Use subprocess with an argument list and shell disabled; validate each argument for its intended domain.

Unsafe shape
os.system('tar -xf ' + archive);
Safer shape
subprocess.run(['tar', '-xf', archive], check=True);
The family · command-injection
Model facts · verbatim from the pack
RoleKindAccess pathModel IDConfidence
sinkcommand-injectionArgument[0]python.os.system.a0high · corrob. 3
Referencesdocs.python.org