Skip to content

Commit

Permalink
Fix security exposure (#1698)
Browse files Browse the repository at this point in the history
Signed-off-by: Prajyot-Parab <prajyot.parab2@ibm.com>
  • Loading branch information
Prajyot-Parab authored Apr 2, 2024
1 parent 21d633f commit b98198e
Showing 2 changed files with 11 additions and 9 deletions.
18 changes: 11 additions & 7 deletions hack/boskos.sh
Original file line number Diff line number Diff line change
@@ -33,20 +33,24 @@ release_account(){
}

checkout_account(){
if [[ $- =~ x ]]; then
set +x
fi
resource_type=$1
url="http://${BOSKOS_HOST}/acquire?type=${resource_type}&state=free&dest=busy&owner=${USER}"
output=$(curl -X POST ${url})
curl -X POST ${url} -o output.json
[ $? = 0 ] && status_code=200

if [[ ${status_code} == 200 ]]; then
echo "export BOSKOS_RESOURCE_NAME=$(echo ${output} | jq -r '.name')"
echo "export IBMCLOUD_API_KEY=$(echo ${output} | jq -r '.userdata["api-key"]')"
echo "export BOSKOS_RESOURCE_GROUP=$(echo ${output} | jq -r '.userdata["resource-group"]')"
echo "export BOSKOS_REGION=$(echo ${output} | jq -r '.userdata["region"]')"
export BOSKOS_RESOURCE_NAME=$(jq -r '.name' < output.json)
export IBMCLOUD_API_KEY=$(jq -r '.userdata["api-key"]' < output.json)
export BOSKOS_RESOURCE_GROUP=$(jq -r '.userdata["resource-group"]' < output.json)
export BOSKOS_REGION=$(jq -r '.userdata["region"]' < output.json)
if [[ ${resource_type} == "powervs-service" ]]; then
echo "export BOSKOS_RESOURCE_ID=$(echo ${output} | jq -r '.userdata["service-instance-id"]')"
echo "export BOSKOS_ZONE=$(echo ${output} | jq -r '.userdata["zone"]')"
export BOSKOS_RESOURCE_ID=$(jq -r '.userdata["service-instance-id"]' < output.json)
export BOSKOS_ZONE=$(jq -r '.userdata["zone"]' < output.json)
fi
rm -rf output.json
else
echo "Got invalid response- ${status_code}"
exit 1
2 changes: 0 additions & 2 deletions hack/kind-network-fix.sh
Original file line number Diff line number Diff line change
@@ -18,8 +18,6 @@ set -o errexit
set -o nounset
set -o pipefail

set -x

docker network create \
--ipv6 \
--subnet=fc00:f853:ccd:e793::/64 \

0 comments on commit b98198e

Please sign in to comment.