diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 5b5ab3486176092a0ceaaa70f7c9cd40b05f315c..27746a01cbcb14b1b1af196b6392de5b19cd12cb 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -210,7 +210,7 @@ test-persist-environment-url:
 
 test-deploy:
   <<: *test-job
-  variables:
+  variables: &deploy-variables
     GIT_STRATEGY: none
     CI_APPLICATION_REPOSITORY: "registry.gitlab.com/gitlab-org/cluster-integration/auto-build-image/master/test-dockerfile"
     CI_APPLICATION_TAG: "b359d01bc8c611a2f7b14283cc878dea4a5f85d7"
@@ -226,13 +226,23 @@ test-deploy:
     POSTGRES_ENABLED: "true"
     POSTGRES_DB: $CI_ENVIRONMENT_SLUG
     POSTGRES_VERSION: 9.6.2
-
   script:
     - auto-deploy initialize_tiller
     - auto-deploy download_chart
     - auto-deploy deploy
     - helm ls --host "localhost:44134"
 
+test-deploy-modsecurity:
+  extends: test-deploy
+  variables:
+    <<: *deploy-variables
+    AUTO_DEVOPS_MODSECURITY_SEC_RULE_ENGINE: "On"
+  script:
+    - auto-deploy initialize_tiller
+    - auto-deploy download_chart
+    - auto-deploy deploy
+    - $([[ $(kubectl get ingress production-auto-deploy -n $KUBE_NAMESPACE --no-headers=true -o custom-columns=:"metadata.annotations.nginx\.ingress\.kubernetes\.io/modsecurity-snippet") != "<none>" ]])
+
 test-create-application-secret:
   <<: *test-job
   variables:
diff --git a/src/bin/auto-deploy b/src/bin/auto-deploy
index 38a43672dbf219fc5459f157caf3ce4268dc8f5c..6b4fe238cf015c67b3c89b961d4e8c0e7145749d 100755
--- a/src/bin/auto-deploy
+++ b/src/bin/auto-deploy
@@ -132,8 +132,9 @@ function deploy() {
     secret_name=''
   fi
 
+  local modsecurity_set_args=()
   if [[ -n "$AUTO_DEVOPS_MODSECURITY_SEC_RULE_ENGINE" ]]; then
-    modsecurity_enabled="true"
+    modsecurity_set_args=("--set" "ingress.modSecurity.enabled=true,ingress.modSecurity.secRuleEngine=$AUTO_DEVOPS_MODSECURITY_SEC_RULE_ENGINE")
   fi
 
   create_application_secret "$track"
@@ -190,8 +191,7 @@ function deploy() {
       --set postgresql.postgresDatabase="$POSTGRES_DB" \
       --set postgresql.imageTag="$POSTGRES_VERSION" \
       --set application.initializeCommand="$DB_INITIALIZE" \
-      --set ingress.modSecurity.enabled="$modsecurity_enabled" \
-      --set ingress.modSecurity.secRuleEngine="$AUTO_DEVOPS_MODSECURITY_SEC_RULE_ENGINE" \
+      "${modsecurity_set_args[@]}" \
       "${helm_values_args[@]}" \
       $HELM_UPGRADE_EXTRA_ARGS \
       --namespace="$KUBE_NAMESPACE" \
@@ -231,8 +231,7 @@ function deploy() {
     --set postgresql.imageTag="$POSTGRES_VERSION" \
     --set application.initializeCommand="" \
     --set application.migrateCommand="$DB_MIGRATE" \
-    --set ingress.modSecurity.enabled="$modsecurity_enabled" \
-    --set ingress.modSecurity.secRuleEngine="$AUTO_DEVOPS_MODSECURITY_SEC_RULE_ENGINE" \
+    "${modsecurity_set_args[@]}" \
     "${helm_values_args[@]}" \
     $HELM_UPGRADE_EXTRA_ARGS \
     --namespace="$KUBE_NAMESPACE" \