File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
solutions/fully-configurable/scripts Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -11,13 +11,13 @@ USERNAME="$(echo "$INPUT_JSON" | jq -r '.username')"
1111PASSWORD=" $( echo " $INPUT_JSON " | jq -r ' .password' ) " # pragma: allowlist secret
1212CA_CERT_B64=" $( echo " $INPUT_JSON " | jq -r ' .ca_cert_b64' ) "
1313
14-
15- BASIC_AUTH=" $( printf ' %s:%s' " $USERNAME " " $PASSWORD " | base64) " # pragma: allowlist secret
16-
14+ # Extract host for .netrc "machine" entry
15+ HOST=" $( echo " $URL " | sed -E ' s#^https?://([^/:]+).*#\1#' ) "
1716
1817RESP=" $(
1918 curl -sS --fail \
20- -H " Authorization: Basic $BASIC_AUTH " \
19+ --netrc-file <( printf ' machine %s login %s password %s\n' \
20+ " $HOST " " $USERNAME " " $PASSWORD " ) \
2121 --cacert <( echo " $CA_CERT_B64 " | base64 -d) \
2222 " $URL "
2323) "
You can’t perform that action at this time.
0 commit comments