Standard Library

GoSyscall

syscall package. Exec(), RawSyscall(), and socket operations are low-level command and network injection sinks.

1 source1 sink
Taint flow1 source 1 sink
Sources — untrusted input
.Getenv()
taint
Sinks — dangerous call
.Exec()

Sources

.Getenv()Source
#
Signature
Getenv(key string) (value string, found bool)

Gets environment variable. Source of external data.

tracks:return

Sinks

.Exec()Sink
#
Signature
Exec(argv0 string, argv []string, envv []string) error

Executes program directly. Command injection sink when argv is user-controlled.

tracks:0

Fully-Qualified Names

FQNField
syscallfqns[0]

Wrong FQN → 0 findings. Verify with: change fqns to garbage → must produce 0 results.

Import

go.mod
// standard library — no go.mod entry required
rule.py
from codepathfinder.go_rule import GoSyscall