Ir al contenido

OS Command Injection (ARCH9102)

Esta página aún no está disponible en tu idioma.

Key swift.security.os-command-injection · Severity error · Category security · CWE CWE-78

Flags Process launched through a shell (/bin/sh -c) with an interpolated command line.

process.arguments = ["-c", "ls \(dir)"]
process.executableURL = URL(fileURLWithPath: "/bin/ls")
process.arguments = [dir]

Invoke the executable directly with an argument array; no shell.