This commit is contained in:
Eddy Filip
2021-08-03 19:18:04 +02:00
parent 6bfaeeb67d
commit adde26c41b

View File

@@ -55,9 +55,7 @@ for env_var in $(op list envars); do
exit 1 exit 1
fi fi
# If the field is marked as concealed or is a note, register a mask # Register a mask for the secret to prevent accidental log exposure.
# for the secret to prevent accidental log exposure.
if [ "$field_type" == "CONCEALED" ] || [ "$field_purpose" == "NOTES" ]; then
# To support multiline secrets, escape percent signs and add a mask per line. # To support multiline secrets, escape percent signs and add a mask per line.
escaped_mask_value=$(echo "$secret_value" | sed -e 's/%/%25/g') escaped_mask_value=$(echo "$secret_value" | sed -e 's/%/%25/g')
IFS=$'\n' IFS=$'\n'
@@ -69,7 +67,6 @@ for env_var in $(op list envars); do
echo "::add-mask::$line" echo "::add-mask::$line"
done done
unset IFS unset IFS
fi
# To support multiline secrets, we'll use the heredoc syntax to populate the environment variables. # To support multiline secrets, we'll use the heredoc syntax to populate the environment variables.
# As the heredoc identifier, we'll use a randomly generated 64-character string, # As the heredoc identifier, we'll use a randomly generated 64-character string,