runcon
Execute a command under a specified SELinux security context to test or enforce context transitions. Use --dry_run to preview changes.
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'.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"context": "<context>"
},
"name": "runcon"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| context | Yes | Security context for the command. | |
| dry_run | No | Report without running the command. | |
| timeout | No | Safety timeout for the command. | |
| command_args | No | Command and arguments to run. | |
| allow_context | No | Allow invoking the platform runcon command. | |
| max_output_bytes | No | Maximum captured stdout/stderr bytes each. |