aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rwxr-xr-xtest/security/check_for_http_endpoints.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/security/check_for_http_endpoints.sh b/test/security/check_for_http_endpoints.sh
index c0da42858..5c2ba20c3 100755
--- a/test/security/check_for_http_endpoints.sh
+++ b/test/security/check_for_http_endpoints.sh
@@ -29,6 +29,17 @@
# Output: List of pods exposing http endpoints
#
+#Prerequisities commands list
+REQ_APPS=(kubectl nmap awk column sort paste grep wc)
+
+# Check for prerequisites apps
+for cmd in "${REQ_APPS[@]}"; do
+ if ! [ -x "$(command -v "$cmd")" ]; then
+ echo "Error: command $cmd is not installed"
+ exit 1
+ fi
+done
+
if [ "$#" -lt 1 ]; then
echo "Usage: $0 <k8s-namespace>"
exit 1