diff options
author | mboelen <michael@cisofy.com> | 2016-04-25 17:00:10 +0300 |
---|---|---|
committer | mboelen <michael@cisofy.com> | 2016-04-25 17:00:10 +0300 |
commit | 4dcb9eccff5a77c1320083afb4da638fbb3caa27 (patch) | |
tree | 63aca07b79bdfc0a4e40ad3be134b7b762fbc44b /include | |
parent | e5790dc8c6c2349a846c4d50b019ab31735ff93b (diff) |
Allow skipping of plugins with --skip-plugins or skip-plugins
Diffstat (limited to 'include')
-rw-r--r-- | include/consts | 1 | ||||
-rw-r--r-- | include/parameters | 4 | ||||
-rw-r--r-- | include/profiles | 6 | ||||
-rw-r--r-- | include/report | 2 |
4 files changed, 12 insertions, 1 deletions
diff --git a/include/consts b/include/consts index f7fa3735..0a74814e 100644 --- a/include/consts +++ b/include/consts @@ -100,6 +100,7 @@ unset LANG MALWARE_SCANNER_INSTALLED=0 MYSQL_RUNNING=0 MIN_PASSWORD_LENGTH=-1 + N_PLUGIN_ENABLED=0 NAME_CACHE_USED=0 NETWORK_INTERFACES="" NGINX_ACCESS_LOG_DISABLED=0 diff --git a/include/parameters b/include/parameters index 6dbb8e41..ae95755d 100644 --- a/include/parameters +++ b/include/parameters @@ -259,6 +259,10 @@ #RED="" ;; + --skip-plugins) + RUN_PLUGINS=0 + ;; + # Only scan these tests --tests) shift diff --git a/include/profiles b/include/profiles index f811d96b..bd6440b2 100644 --- a/include/profiles +++ b/include/profiles @@ -182,6 +182,12 @@ Debug "Show warnings only set to ${SHOW_WARNINGS_ONLY}" ;; + # Skip plugins + skip-plugins) + FIND=`echo "${VALUE}" | egrep "^(1|yes)"` && RUN_PLUGINS=0 + Debug "Run plugins is set to ${RUN_PLUGINS}" + ;; + # Which tests to skip (skip-test=ABCD-1234 or skip-test=ABCD-1234:subtest) skip-test) STRING=`echo ${VALUE} | tr '[:upper:]' '[:lower:]'` diff --git a/include/report b/include/report index f007e389..8124b8ad 100644 --- a/include/report +++ b/include/report @@ -167,7 +167,7 @@ echo "" echo " ${CYAN}Hardening index${NORMAL} : ${WHITE}${HPINDEX}${NORMAL} ${HPGRAPH}" echo " ${CYAN}Tests performed${NORMAL} : ${WHITE}${CTESTS_PERFORMED}${NORMAL}" - echo " ${CYAN}Plugins enabled${NORMAL} : ${WHITE}${N_PLUGIN_ENABLED}${NORMAL}" + if [ ${RUN_PLUGINS} -eq 1 ]; then echo " ${CYAN}Plugins enabled${NORMAL} : ${WHITE}${N_PLUGIN_ENABLED}${NORMAL}"; fi echo "" echo " ${WHITE}Components${NORMAL}:" if [ ${FIREWALL_ACTIVE} -eq 1 ]; then FIREWALL="${GREEN}V"; else FIREWALL="${RED}X"; fi |