oliver-zehentleitner / maity

runner: one Unix socket path limit (check's ssh ControlPath test assumes Linux's 108)

Sign in to report

tsk-yep9ahkfe4j0 Open

Audit round 3 (tsk-hgnbapyw7hnh), read at 588f911b. Kind: duplication.

What is wrong: cli/src/maity/runner/targets.py:26 UNIX_PATH_MAX = 108 (used at runner/commands.py:777-781 for ssh's ControlPath) vs the new runner/adapters.py:232-243 socket_path_max() (107 on Linux, 103 on macOS). On a macOS runner host with the ssh backend, a state_dir that leaves a 104-107-byte ControlPath passes check, and then ssh cannot bind its socket.

Proposal: one socket_path_max() (in targets or a small util) used at commands.py:777 too.

Effort / risk: S. Low risk.