Skip to main content

Run Command

Run Command executes a single executable through a Command Runner policy. The executable must be permitted by that runner's Allowed Commands, and the working directory must fall under its Allowed Paths.

Arguments are supplied as discrete array elements and are never shell-parsed. There is no shell to escape, so a value containing spaces or shell metacharacters is passed through as one argument rather than being re-interpreted.

The activity has four tabs: Configuration, Arguments, Environment, and Output.

Configuration

FieldRequiredDescription
NameOptionalName of the component.
DescriptionOptionalDescription of the component.
Command RunnerOptionalThe Command Runner policy resource that gates this execution.
CommandOptionalExecutable to run; must be permitted by the runner's Allowed Commands.
Working DirectoryOptionalMust be under the runner's Allowed Paths. Defaults to the first Allowed Paths entry.
Standard InputOptionalText written to the process stdin, which is then closed.

Command, Working Directory, and Standard Input each support mapped and vault-backed values.

Arguments

FieldRequiredDescription
ArgumentsOptionalCommand arguments, each a discrete array element.

Environment

FieldRequiredDescription
Environment OverridesOptionalPer-run environment variables applied on top of the runner's environment.

Values are mapping and vault capable.

Output

The activity returns a scriptOutput object.

FieldData TypeDescription
exitCodeIntegerProcess exit code.
stdoutStringCaptured standard output.
stderrStringCaptured standard error.
durationMsIntegerRun duration in milliseconds.
timedOutBooleanWhether the run exceeded Max Runtime (seconds) on the Command Runner.
truncatedBooleanWhether output exceeded Max Output Bytes (per stream) and was cut short.