runcon
Execute commands under a specified SELinux security context. Use to test or enforce context transitions with dry-run preview and explicit confirmation.
Instructions
Plan or run a command under a specified SELinux security context. Potentially destructive: changes the security domain of the executed command. Use --dry_run to preview. Requires --allow_context confirmation. Use to test or enforce SELinux context transitions. Not for modifying file contexts — use 'chcon' for file labels. See also 'chcon'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| allow_context | No | Allow invoking the platform runcon command. | |
| command_args | No | Command and arguments to run. | |
| context | Yes | Security context for the command. | |
| dry_run | No | Report without running the command. | |
| max_output_bytes | No | Maximum captured stdout/stderr bytes each. | |
| timeout | No | Safety timeout for the command. |