feat: new input for dynamic LOG_LEVEL

You can now control the ssh log-level that is passed via the rsh switch for better logging control.

The default log-level is ERROR (previously it was not set, hence it fallback to INFO). 

This further enhances masking when strict_hostkeys_checking is false (default=false), by hiding the warning message.
Github already always masked the host but the algo was still visible.

Before: "Warning: Permanently added '***' (ED25519) to the list of known hosts."

After: hidden (when log_level ERROR, which is the default)

As always, we encourage you to enable strict_hostkeys_checking = true, in order to make a hostkey known to the action beforehand.
This commit is contained in:
Burnett01
2026-11-15 09:41:49 +01:00
committed by GitHub
parent a45ed8d36c
commit 72af351b83
+4 -1
View File
@@ -2,8 +2,11 @@
set -eu
LOG_LEVEL="${INPUT_LOGLEVEL:-ERROR}"
if [ "${INPUT_DEBUG:-false}" = "true" ]; then
set -x
LOG_LEVEL=""
fi
if [ -z "$(echo "$INPUT_REMOTE_PATH" | awk '{$1=$1};1')" ]; then
@@ -41,7 +44,7 @@ if [ "${INPUT_STRICT_HOSTKEYS_CHECKING:-false}" = "true" ]; then
fi
fi
RSH="ssh $STRICT_HOSTKEYS_CHECKING $LEGACY_RSA_HOSTKEYS -p $INPUT_REMOTE_PORT $INPUT_RSH"
RSH="ssh $LOG_LEVEL $STRICT_HOSTKEYS_CHECKING $LEGACY_RSA_HOSTKEYS -p $INPUT_REMOTE_PORT $INPUT_RSH"
LOCAL_PATH="$GITHUB_WORKSPACE/$INPUT_PATH"
DSN="$INPUT_REMOTE_USER@$INPUT_REMOTE_HOST"