command_execution_options

command execution.

⚙️ Compatible targets: Linux

Parameters

NameDocumentation
commandCommand to be executed.

This parameter is required.
argsArguments to the command.

This parameter is optional.
run_in_audit_modeSpecify if command must be run in audit mode.

Choices:
  • true
  • false

This parameter is optional.
in_shellSpecify whether the command should be executed within a shell.

Choices:
  • true
  • false

This parameter is optional.
shell_pathDefine the path to the shell to be used (applicable only in shell mode).

This parameter is optional.
chdirSet the working directory from which the command will be executed.

This parameter is optional.
timeoutDefine a timeout duration for the command execution.

This parameter is optional.
stdinProvide input to the standard input (stdin) of the executed command.

This parameter is optional.
stdin_add_newlineControl whether a newline character is appended to the stdin input.

Choices:
  • true
  • false

This parameter is optional.
compliant_codesSpecify the compliant codes.

This parameter is optional.
repaired_codesSpecify the repaired codes.

This parameter is optional.
output_to_fileDefine a file path to store the output generated by the command.

This parameter is optional.
strip_outputControls if the EOL is strip from the output.

Choices:
  • true
  • false

This parameter is optional.
uidSpecify the user ID (UID) under which the command will be executed.

This parameter is optional.
gidSpecify the group ID (GID) under which the command will be executed.

This parameter is optional.
umaskSet the umask value for the executed command.

This parameter is optional.
env_varsThe variables to pass to the environment of the executed command.

This parameter is optional.
show_contentControls output of the report.

Choices:
  • true
  • false

This parameter is optional.

Outcome conditions

You need to replace ${command} with its actual canonified value.

  • ✅ Ok: command_execution_options_${command}_ok
    • ☑️ Already compliant: command_execution_options_${command}_kept
    • 🟨 Repaired: command_execution_options_${command}_repaired
  • ❌ Error: command_execution_options_${command}_error

Example

method: command_execution_options
params:
  run_in_audit_mode: 'true'
  command: VALUE
  output_to_file: OPTIONAL_VALUE
  gid: OPTIONAL_VALUE
  uid: OPTIONAL_VALUE
  umask: OPTIONAL_VALUE
  repaired_codes: OPTIONAL_VALUE
  in_shell: 'true'
  strip_output: 'true'
  timeout: OPTIONAL_VALUE
  stdin: OPTIONAL_VALUE
  args: OPTIONAL_VALUE
  env_vars: OPTIONAL_VALUE
  shell_path: OPTIONAL_VALUE
  stdin_add_newline: 'true'
  compliant_codes: OPTIONAL_VALUE
  chdir: OPTIONAL_VALUE
  show_content: 'true'

Documentation

Coming soon.