Skip to main content

Module packing

Module packing 

Source
Expand description

Empacotamento seguro de comandos sudo/su (one-shot multi-host para LLMs).

Usa sh -c com escape de aspas para comandos compostos seguros.

Structs§

PackedCommand
Packing result: remote command without secret in argv + optional bytes to send on the SSH channel stdin (GAP-SSH-SEC-001).

Functions§

append_description
Appends description as a shell comment safely.
escape_shell_single_quotes
Escapes a string for safe use inside shell single quotes.
pack_abort_pkill
Monta command de abort best-effort remoto (TERM depois KILL).
pack_su
Packs a command for su - -c one-shot; password goes on the channel stdin.
pack_sudo
Packs a command for sudo with sh -c.
remote_abort_pattern
Sanitiza trecho de command para uso best-effort em pkill -f.