diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 424603eb3a4dfb765e2b8b74168036a6e07bc1b3..68134fbeeae7f42bfb24575330b4de2af79c7322 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -265,7 +265,7 @@ create-release:
     - export AVAILABLE_OPENTOFU_VERSIONS
     - 'AVAILABLE_IMAGES=$(cat image*.md | sort -r | tee images.md | sed -E "s/(\(digest: .*\))/\n  - \1/")'
     - export AVAILABLE_IMAGES
-    - cat .gitlab/release-notes.md.template | envsubst > release-notes.md
+    - envsubst < .gitlab/release-notes.md.template > release-notes.md
   artifacts:
     paths:
       - images.md
diff --git a/.gitlab/scripts/check-semantic-version.sh b/.gitlab/scripts/check-semantic-version.sh
index 7a7a5b7c2b1a3304eab5a1f8203721c5d4a9aba7..376af8f1364e301e801398ed9e249f855102bab8 100755
--- a/.gitlab/scripts/check-semantic-version.sh
+++ b/.gitlab/scripts/check-semantic-version.sh
@@ -3,7 +3,7 @@
 # Regex from https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string
 SEMANTIC_VERSION_REGEX='^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$'
 
-match=$(cat - | perl -ne "print if /$SEMANTIC_VERSION_REGEX/")
+match=$(perl -ne "print if /$SEMANTIC_VERSION_REGEX/")
 
 if [ -z "$match" ]; then
   echo "The given version doesn't match the semantic versioning format."
diff --git a/tests/unit.gitlab-ci.yml b/tests/unit.gitlab-ci.yml
index 64103f70381c4be0247dcc6b1c1ea7158ece83c2..e307e3d6437660628aff3db83bce1f04f67e993b 100644
--- a/tests/unit.gitlab-ci.yml
+++ b/tests/unit.gitlab-ci.yml
@@ -132,7 +132,7 @@ gitlab-tofu-init-without-reconfigure:
     - gitlab-tofu init -no-color >/tmp/output.txt 2>&1 || FAILED=true
     - cat /tmp/output.txt
     - test $FAILED = true
-    - 'cat /tmp/output.txt | grep "Error: Backend configuration changed"'
+    - 'grep "Error: Backend configuration changed" /tmp/output.txt'
 
 gitlab-tofu-init-with-reconfigure:
   extends:
@@ -306,7 +306,7 @@ gitlab-tofu-without-implicit-init:
     - gitlab-tofu $CMD -no-color >/tmp/output.txt 2>&1 || FAILED=true
     - cat /tmp/output.txt
     - test $FAILED = true
-    - 'cat /tmp/output.txt | grep "$ERROR"'
+    - 'grep "$ERROR" /tmp/output.txt'
   parallel:
     matrix:
       - CMD: apply
@@ -333,4 +333,4 @@ gitlab-tofu-no-wrapper:
     - gitlab-tofu -- apply -no-color >/tmp/output.txt 2>&1 || FAILED=true
     - cat /tmp/output.txt
     - test $FAILED = true
-    - 'cat /tmp/output.txt | grep "Error: Backend initialization required, please run \"tofu init\""'
+    - 'grep "Error: Backend initialization required, please run \"tofu init\"" /tmp/output.txt'