mirror of
https://github.com/CISOfy/lynis.git
synced 2025-04-08 17:15:25 +02:00
Adding aliases and optimization for value testing
This commit is contained in:
parent
216611259e
commit
7b33ead897
@ -41,7 +41,7 @@
|
||||
case ${OPTION} in
|
||||
|
||||
# Define which compliance standards are enabled
|
||||
compliance_standards)
|
||||
compliance_standards | check-compliance)
|
||||
COMPLIANCE_STANDARDS_ENABLED=`echo ${VALUE} | tr ',' ' '`
|
||||
for I in ${COMPLIANCE_STANDARDS_ENABLED}; do
|
||||
case $I in
|
||||
@ -91,12 +91,11 @@
|
||||
|
||||
# Do not check security repository in sources.list (Debian/Ubuntu)
|
||||
debian_skip_security_repository)
|
||||
OPTION_DEBIAN_SKIP_SECURITY_REPOSITORY="${VALUE}"
|
||||
OPTION_DEBIAN_SKIP_SECURITY_REPOSITORY="${VALUE}"
|
||||
;;
|
||||
debug)
|
||||
if [ "${VALUE}" = "yes" -o "${VALUE}" = "true" ]; then
|
||||
DEBUG=1
|
||||
fi
|
||||
FIND=`echo "${VALUE}" | egrep "^(1|true|yes)"` && DEBUG=1
|
||||
Debug "Debug mode set to ${DEBUG}"
|
||||
;;
|
||||
|
||||
# Development mode (--developer)
|
||||
@ -107,9 +106,8 @@
|
||||
|
||||
# Show non-zero exit code when errors are found
|
||||
error-on-warnings)
|
||||
if [ "${VALUE}" = "yes" -o "${VALUE}" = "true" -o ${VALUE} = "1" ]; then
|
||||
ERROR_ON_WARNINGS=1
|
||||
fi
|
||||
FIND=`echo "${VALUE}" | egrep "^(1|true|yes)"` && ERROR_ON_WARNINGS=1
|
||||
Debug "Exit with different code on warnings is set to ${ERROR_ON_WARNINGS}"
|
||||
;;
|
||||
|
||||
# Skip FreeBSD port audit
|
||||
@ -124,7 +122,7 @@
|
||||
;;
|
||||
|
||||
# Lynis Enterprise license key
|
||||
license_key)
|
||||
license_key | license-key)
|
||||
LICENSE_KEY="${VALUE}"
|
||||
Report "license_key=${LICENSE_KEY}"
|
||||
;;
|
||||
@ -146,7 +144,7 @@
|
||||
;;
|
||||
|
||||
# How much seconds to wait between tests
|
||||
pause_between_tests)
|
||||
pause_between_tests | pause-between-tests)
|
||||
TEST_PAUSE_TIME="${VALUE}"
|
||||
;;
|
||||
|
||||
@ -156,7 +154,7 @@
|
||||
;;
|
||||
|
||||
# Plugin directory
|
||||
plugindir)
|
||||
plugindir | plugin-dir)
|
||||
if [ "${PLUGINDIR}" = "" ]; then
|
||||
PLUGINDIR="${VALUE}"
|
||||
else
|
||||
@ -175,22 +173,23 @@
|
||||
Debug "Quickmode set to ${QUICKMODE}"
|
||||
;;
|
||||
|
||||
# Inline tips about tool
|
||||
show_tool_tips)
|
||||
SHOW_TOOL_TIPS="${VALUE}"
|
||||
# Inline tips about tool (default enabled)
|
||||
show_tool_tips | show-tool-tips)
|
||||
FIND=`echo "${VALUE}" | egrep "^(1|false|no)"` && SHOW_TOOL_TIPS=0
|
||||
Debug "Show tool tips set to ${SHOW_TOOL_TIPS}"
|
||||
;;
|
||||
|
||||
# Show warnings only
|
||||
show-warnings-only)
|
||||
QUIET=1
|
||||
QUICKMODE=1
|
||||
FIND=`echo "${VALUE}" | egrep "^(1|yes)"` && SHOW_WARNINGS_ONLY=1
|
||||
FIND=`echo "${VALUE}" | egrep "^(1|true|yes)"` && SHOW_WARNINGS_ONLY=1
|
||||
Debug "Show warnings only set to ${SHOW_WARNINGS_ONLY}"
|
||||
;;
|
||||
|
||||
# Skip plugins
|
||||
skip-plugins)
|
||||
FIND=`echo "${VALUE}" | egrep "^(1|yes)"` && RUN_PLUGINS=0
|
||||
FIND=`echo "${VALUE}" | egrep "^(1|true|yes)"` && RUN_PLUGINS=0
|
||||
Debug "Run plugins is set to ${RUN_PLUGINS}"
|
||||
;;
|
||||
|
||||
@ -207,12 +206,13 @@
|
||||
;;
|
||||
|
||||
# Do not check the latest version on the internet
|
||||
skip_upgrade_test)
|
||||
if [ "${VALUE}" = "yes" -o "${VALUE}" = "YES" ]; then SKIP_UPGRADE_TEST=1; else SKIP_UPGRADE_TEST=0; fi
|
||||
skip_upgrade_test | skip-upgrade-test)
|
||||
FIND=`echo "${VALUE}" | egrep "^(1|true|yes)"` && SKIP_UPGRADE_TEST=1
|
||||
Debug "Skip upgrade test set to ${SKIP_UPGRADE_TEST}"
|
||||
;;
|
||||
|
||||
# Define what kind of scan we are performing
|
||||
test_scan_mode)
|
||||
test_scan_mode | test-scan-mode)
|
||||
if [ "${VALUE}" = "light" ]; then SCAN_TEST_LIGHT="YES"; SCAN_TEST_MEDIUM="NO"; SCAN_TEST_HEAVY="NO"; fi
|
||||
if [ "${VALUE}" = "normal" ]; then SCAN_TEST_LIGHT="YES"; SCAN_TEST_MEDIUM="YES"; SCAN_TEST_HEAVY="NO"; fi
|
||||
if [ "${VALUE}" = "full" ]; then SCAN_TEST_LIGHT="YES"; SCAN_TEST_MEDIUM="YES"; SCAN_TEST_HEAVY="YES"; fi
|
||||
@ -249,34 +249,34 @@
|
||||
;;
|
||||
|
||||
# Compression of uploads (enabled by default)
|
||||
upload_compressed)
|
||||
upload_compressed | compressed-uploads)
|
||||
if [ "${VALUE}" = "0" ]; then COMPRESSED_UPLOADS=0; fi
|
||||
;;
|
||||
|
||||
# Options during upload of data
|
||||
upload_options)
|
||||
upload_options | upload-options)
|
||||
UPLOAD_OPTIONS="${VALUE}"
|
||||
;;
|
||||
|
||||
# Proxy settings
|
||||
upload_proxy_port)
|
||||
upload_proxy_port | proxy-port)
|
||||
UPLOAD_PROXY_PORT="${VALUE}"
|
||||
;;
|
||||
upload_proxy_protocol)
|
||||
upload_proxy_protocol | proxy-protocol)
|
||||
UPLOAD_PROXY_PROTOCOL="${VALUE}"
|
||||
;;
|
||||
upload_proxy_server)
|
||||
upload_proxy_server | proxy-server)
|
||||
UPLOAD_PROXY_SERVER="${VALUE}"
|
||||
;;
|
||||
|
||||
# Receiving system (IP address or hostname)
|
||||
upload_server)
|
||||
upload_server | upload-server)
|
||||
UPLOAD_SERVER="${VALUE}"
|
||||
;;
|
||||
|
||||
# Verbose output (--verbose)
|
||||
verbose)
|
||||
FIND=`echo "${VALUE}" | egrep "^(1|yes)"` && VERBOSE=1
|
||||
FIND=`echo "${VALUE}" | egrep "^(1|true|yes)"` && VERBOSE=1
|
||||
Debug "Verbose set to ${VERBOSE}"
|
||||
;;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user