From 95fdcd74a3bca58e7110d4751b8c68c759f1a8ea Mon Sep 17 00:00:00 2001 From: Matt Dean Date: Tue, 3 Mar 2026 18:28:25 +0000 Subject: [PATCH] [NRL-1922] Fix sonarqube issue with use of wget --- terraform/bastion/scripts/user-data.sh | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/terraform/bastion/scripts/user-data.sh b/terraform/bastion/scripts/user-data.sh index 624793c97..7070d3159 100644 --- a/terraform/bastion/scripts/user-data.sh +++ b/terraform/bastion/scripts/user-data.sh @@ -4,12 +4,14 @@ set -o errexit -o nounset -o pipefail ASDF_VERSION="v0.18.0" +export DEBIAN_FRONTEND=noninteractive + sudo apt update && \ - sudo apt upgrade -y && \ - sudo apt install -y \ + sudo -E apt upgrade -y && \ + sudo -E apt install -y \ git \ jq \ - wget \ + curl \ build-essential \ unzip \ gnupg \ @@ -42,11 +44,12 @@ output = json " >> /home/nrlf_ops/.aws/config' # Install ASDF -wget https://github.com/asdf-vm/asdf/releases/download/${ASDF_VERSION}/asdf-${ASDF_VERSION}-linux-amd64.tar.gz -O asdf.tar.gz && \ - tar -xzf asdf.tar.gz && \ - mv asdf /usr/bin/asdf && \ - chmod 755 /usr/bin/asdf && \ - rm asdf.tar.gz +curl --location --silent --show-error --fail --output asdf.tar.gz \ + https://github.com/asdf-vm/asdf/releases/download/${ASDF_VERSION}/asdf-${ASDF_VERSION}-linux-amd64.tar.gz && \ + tar -xzf asdf.tar.gz && \ + mv asdf /usr/bin/asdf && \ + chmod 755 /usr/bin/asdf && \ + rm asdf.tar.gz # Clone NRLF into nrlf_ops home directory sudo -u nrlf_ops git clone https://github.com/NHSDigital/NRLF.git /home/nrlf_ops/NRLF