mirror of
https://github.com/aquasecurity/trivy-action.git
synced 2026-05-13 18:52:41 +00:00
Merge commit from fork
This commit is contained in:
+3
-2
@@ -183,9 +183,10 @@ runs:
|
||||
local input_value="$2"
|
||||
local default_value="$3"
|
||||
|
||||
if [ ! -z "$input_value" ] && [ "$input_value" != "$default_value" ]; then
|
||||
if [ -n "$input_value" ] && [ "$input_value" != "$default_value" ]; then
|
||||
# If action was provided with explicit input by the caller set that
|
||||
echo "export $var_name=$input_value" >> trivy_envs.txt
|
||||
# Use printf %q to safely escape special characters and prevent command injection
|
||||
printf 'export %s=%q\n' "$var_name" "$input_value" >> trivy_envs.txt
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user