Skip to content

Commit e54e5a3

Browse files
committed
automated: linux: torizon: integration: add quotation marks, brackets to variables
To prevent any malicious actions, all remaining variables were surrounded with quotes or brackets. Signed-off-by: Pawel Szymaszek <[email protected]>
1 parent 95572e2 commit e54e5a3

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

automated/linux/torizon/integration-tests.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
set -x
55
. ../../lib/sh-test-lib
66

7-
UTILS_PATH=$(cd ../../utils && pwd)
7+
UTILS_PATH="$(cd ../../utils && pwd)"
88

99
# source the secrets file to get the gitlab_token env var
1010
lava_test_dir="$(
@@ -46,28 +46,28 @@ GECKODRIVER="geckodriver-${GECKO_VERSION}-${GECKODRIVER_ARCH}.tar.gz"
4646
SPIRE="staging-spire_${SPIRE_VERSION}_${SPIRE_ARCH}.deb"
4747

4848
# Download and install spire package
49-
curl -sSLO "https://github.com/Linaro/SPIRE-CLI-S-/releases/download/$SPIRE_VERSION/$SPIRE"
50-
dpkg -i "$SPIRE"
49+
curl -sSLO "https://github.com/Linaro/SPIRE-CLI-S-/releases/download/${SPIRE_VERSION}/${SPIRE}"
50+
dpkg -i "${SPIRE}"
5151

5252
# Download and install gecko driver
53-
curl -LO "https://github.com/mozilla/geckodriver/releases/download/${GECKO_VERSION}/$GECKODRIVER"
54-
tar -xf "$GECKODRIVER"
53+
curl -LO "https://github.com/mozilla/geckodriver/releases/download/${GECKO_VERSION}/${GECKODRIVER}"
54+
tar -xf "${GECKODRIVER}"
5555
mv geckodriver /usr/local/bin
5656
chown root:root /usr/local/bin/geckodriver
5757

5858
# Download and install uv
5959
curl -LsSf "https://astral.sh/uv/${UV_VERSION}/install.sh" | sh
60-
. "$HOME"/.local/bin/env
60+
. "${HOME}"/.local/bin/env
6161

6262
# clone baklava-integration repo and install required pip pkgs
63-
get_test_program "https://gitlab-ci-token:${GITLAB_TOKEN}@gitlab.com/LinaroLtd/lava/appliance/baklava-integration/docker-tests.git" "docker-tests" "$BRANCH_NAME"
63+
get_test_program "https://gitlab-ci-token:${GITLAB_TOKEN}@gitlab.com/LinaroLtd/lava/appliance/baklava-integration/docker-tests.git" "docker-tests" "${BRANCH_NAME}"
6464

6565
export SPIRE_PAT_TOKEN LAVA_TOKEN LAVA_PASSWORD SQUAD_UPLOAD_URL SQUAD_ARCHIVE_SUBMIT_TOKEN
6666

6767
# run tests with uv
68-
uv run robot --pythonpath . --exclude gitlab_pipeline --variable remote:"$IS_REMOTE" --outputdir=.. --listener test/keyword_listener.py test/
68+
uv run robot --pythonpath . --exclude gitlab_pipeline --variable remote:"${IS_REMOTE}" --outputdir=.. --listener test/keyword_listener.py test/
6969

70-
"${UTILS_PATH}"/upload-to-squad.sh -a ../output.xml -u "$SQUAD_UPLOAD_URL"
70+
"${UTILS_PATH}"/upload-to-squad.sh -a ../output.xml -u "${SQUAD_UPLOAD_URL}"
7171
uv run --project "${UTILS_PATH}"/ uv run "${UTILS_PATH}"/parse-robot-framework.py -r ../output.xml
7272

7373
exit 0

0 commit comments

Comments
 (0)