Skip to content

Commit

Permalink
Fix security exposure
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 committed Apr 2, 2024
1 parent 21d633f commit f18e37d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
17 changes: 10 additions & 7 deletions hack/boskos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,22 @@ 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
else
echo "Got invalid response- ${status_code}"
Expand Down
2 changes: 0 additions & 2 deletions hack/kind-network-fix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit f18e37d

Please sign in to comment.