mirror of https://github.com/CISOfy/lynis.git
Allow skipping of plugins with --skip-plugins or skip-plugins
This commit is contained in:
parent
e5790dc8c6
commit
4dcb9eccff
|
@ -391,6 +391,9 @@ config:compliance_standards:cis,hipaa,iso27001,pci-dss:
|
||||||
# Enable quick mode (no waiting for keypresses, same as --quick option)
|
# Enable quick mode (no waiting for keypresses, same as --quick option)
|
||||||
#quick=yes
|
#quick=yes
|
||||||
|
|
||||||
|
# Skip plugins (default: no)
|
||||||
|
#skip-plugins=yes
|
||||||
|
|
||||||
# Skip a test (one per line)
|
# Skip a test (one per line)
|
||||||
#skip-test=SSH-7408
|
#skip-test=SSH-7408
|
||||||
|
|
||||||
|
|
|
@ -100,6 +100,7 @@ unset LANG
|
||||||
MALWARE_SCANNER_INSTALLED=0
|
MALWARE_SCANNER_INSTALLED=0
|
||||||
MYSQL_RUNNING=0
|
MYSQL_RUNNING=0
|
||||||
MIN_PASSWORD_LENGTH=-1
|
MIN_PASSWORD_LENGTH=-1
|
||||||
|
N_PLUGIN_ENABLED=0
|
||||||
NAME_CACHE_USED=0
|
NAME_CACHE_USED=0
|
||||||
NETWORK_INTERFACES=""
|
NETWORK_INTERFACES=""
|
||||||
NGINX_ACCESS_LOG_DISABLED=0
|
NGINX_ACCESS_LOG_DISABLED=0
|
||||||
|
|
|
@ -259,6 +259,10 @@
|
||||||
#RED=""
|
#RED=""
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
--skip-plugins)
|
||||||
|
RUN_PLUGINS=0
|
||||||
|
;;
|
||||||
|
|
||||||
# Only scan these tests
|
# Only scan these tests
|
||||||
--tests)
|
--tests)
|
||||||
shift
|
shift
|
||||||
|
|
|
@ -182,6 +182,12 @@
|
||||||
Debug "Show warnings only set to ${SHOW_WARNINGS_ONLY}"
|
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)
|
# Which tests to skip (skip-test=ABCD-1234 or skip-test=ABCD-1234:subtest)
|
||||||
skip-test)
|
skip-test)
|
||||||
STRING=`echo ${VALUE} | tr '[:upper:]' '[:lower:]'`
|
STRING=`echo ${VALUE} | tr '[:upper:]' '[:lower:]'`
|
||||||
|
|
|
@ -167,7 +167,7 @@
|
||||||
echo ""
|
echo ""
|
||||||
echo " ${CYAN}Hardening index${NORMAL} : ${WHITE}${HPINDEX}${NORMAL} ${HPGRAPH}"
|
echo " ${CYAN}Hardening index${NORMAL} : ${WHITE}${HPINDEX}${NORMAL} ${HPGRAPH}"
|
||||||
echo " ${CYAN}Tests performed${NORMAL} : ${WHITE}${CTESTS_PERFORMED}${NORMAL}"
|
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 ""
|
||||||
echo " ${WHITE}Components${NORMAL}:"
|
echo " ${WHITE}Components${NORMAL}:"
|
||||||
if [ ${FIREWALL_ACTIVE} -eq 1 ]; then FIREWALL="${GREEN}V"; else FIREWALL="${RED}X"; fi
|
if [ ${FIREWALL_ACTIVE} -eq 1 ]; then FIREWALL="${GREEN}V"; else FIREWALL="${RED}X"; fi
|
||||||
|
|
3
lynis.8
3
lynis.8
|
@ -103,6 +103,9 @@ Provide an alternative name for report file.
|
||||||
.B \-\-reverse\-colors
|
.B \-\-reverse\-colors
|
||||||
Optimize screen output for light backgrounds.
|
Optimize screen output for light backgrounds.
|
||||||
.TP
|
.TP
|
||||||
|
.B \-\-skip\-plugins
|
||||||
|
Do not run plugins.
|
||||||
|
.TP
|
||||||
.B \-\-tests TEST-IDs
|
.B \-\-tests TEST-IDs
|
||||||
Only run the specific test(s). When using multiple tests, add quotes around the
|
Only run the specific test(s). When using multiple tests, add quotes around the
|
||||||
line.
|
line.
|
||||||
|
|
Loading…
Reference in New Issue