CodeQL library for Java
codeql/java-all 0.3.2 (changelog, source)
Search

Predicate isSafeCommandArgument

Holds if ex is used safely as an argument to a command; i.e. it’s not in the first position and it’s not a shell command.

Import path

import semmle.code.java.security.CommandArguments
predicate isSafeCommandArgument(Expr ex)