From 72af351b836294573438341b5a082562ec0511dd Mon Sep 17 00:00:00 2001 From: Burnett01 Date: Sun, 15 Nov 2026 09:41:49 +0100 Subject: [PATCH] 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. --- entrypoint.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index d7dceec..d1c6318 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -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"