mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-27 15:54:09 +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
|
case ${OPTION} in
|
||||||
|
|
||||||
# Define which compliance standards are enabled
|
# Define which compliance standards are enabled
|
||||||
compliance_standards)
|
compliance_standards | check-compliance)
|
||||||
COMPLIANCE_STANDARDS_ENABLED=`echo ${VALUE} | tr ',' ' '`
|
COMPLIANCE_STANDARDS_ENABLED=`echo ${VALUE} | tr ',' ' '`
|
||||||
for I in ${COMPLIANCE_STANDARDS_ENABLED}; do
|
for I in ${COMPLIANCE_STANDARDS_ENABLED}; do
|
||||||
case $I in
|
case $I in
|
||||||
@ -94,9 +94,8 @@
|
|||||||
OPTION_DEBIAN_SKIP_SECURITY_REPOSITORY="${VALUE}"
|
OPTION_DEBIAN_SKIP_SECURITY_REPOSITORY="${VALUE}"
|
||||||
;;
|
;;
|
||||||
debug)
|
debug)
|
||||||
if [ "${VALUE}" = "yes" -o "${VALUE}" = "true" ]; then
|
FIND=`echo "${VALUE}" | egrep "^(1|true|yes)"` && DEBUG=1
|
||||||
DEBUG=1
|
Debug "Debug mode set to ${DEBUG}"
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
# Development mode (--developer)
|
# Development mode (--developer)
|
||||||
@ -107,9 +106,8 @@
|
|||||||
|
|
||||||
# Show non-zero exit code when errors are found
|
# Show non-zero exit code when errors are found
|
||||||
error-on-warnings)
|
error-on-warnings)
|
||||||
if [ "${VALUE}" = "yes" -o "${VALUE}" = "true" -o ${VALUE} = "1" ]; then
|
FIND=`echo "${VALUE}" | egrep "^(1|true|yes)"` && ERROR_ON_WARNINGS=1
|
||||||
ERROR_ON_WARNINGS=1
|
Debug "Exit with different code on warnings is set to ${ERROR_ON_WARNINGS}"
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
# Skip FreeBSD port audit
|
# Skip FreeBSD port audit
|
||||||
@ -124,7 +122,7 @@
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
# Lynis Enterprise license key
|
# Lynis Enterprise license key
|
||||||
license_key)
|
license_key | license-key)
|
||||||
LICENSE_KEY="${VALUE}"
|
LICENSE_KEY="${VALUE}"
|
||||||
Report "license_key=${LICENSE_KEY}"
|
Report "license_key=${LICENSE_KEY}"
|
||||||
;;
|
;;
|
||||||
@ -146,7 +144,7 @@
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
# How much seconds to wait between tests
|
# How much seconds to wait between tests
|
||||||
pause_between_tests)
|
pause_between_tests | pause-between-tests)
|
||||||
TEST_PAUSE_TIME="${VALUE}"
|
TEST_PAUSE_TIME="${VALUE}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@ -156,7 +154,7 @@
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
# Plugin directory
|
# Plugin directory
|
||||||
plugindir)
|
plugindir | plugin-dir)
|
||||||
if [ "${PLUGINDIR}" = "" ]; then
|
if [ "${PLUGINDIR}" = "" ]; then
|
||||||
PLUGINDIR="${VALUE}"
|
PLUGINDIR="${VALUE}"
|
||||||
else
|
else
|
||||||
@ -175,22 +173,23 @@
|
|||||||
Debug "Quickmode set to ${QUICKMODE}"
|
Debug "Quickmode set to ${QUICKMODE}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
# Inline tips about tool
|
# Inline tips about tool (default enabled)
|
||||||
show_tool_tips)
|
show_tool_tips | show-tool-tips)
|
||||||
SHOW_TOOL_TIPS="${VALUE}"
|
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
|
||||||
show-warnings-only)
|
show-warnings-only)
|
||||||
QUIET=1
|
QUIET=1
|
||||||
QUICKMODE=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}"
|
Debug "Show warnings only set to ${SHOW_WARNINGS_ONLY}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
# Skip plugins
|
# Skip plugins
|
||||||
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}"
|
Debug "Run plugins is set to ${RUN_PLUGINS}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@ -207,12 +206,13 @@
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
# Do not check the latest version on the internet
|
# Do not check the latest version on the internet
|
||||||
skip_upgrade_test)
|
skip_upgrade_test | skip-upgrade-test)
|
||||||
if [ "${VALUE}" = "yes" -o "${VALUE}" = "YES" ]; then SKIP_UPGRADE_TEST=1; else SKIP_UPGRADE_TEST=0; fi
|
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
|
# 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}" = "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}" = "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
|
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)
|
# Compression of uploads (enabled by default)
|
||||||
upload_compressed)
|
upload_compressed | compressed-uploads)
|
||||||
if [ "${VALUE}" = "0" ]; then COMPRESSED_UPLOADS=0; fi
|
if [ "${VALUE}" = "0" ]; then COMPRESSED_UPLOADS=0; fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
# Options during upload of data
|
# Options during upload of data
|
||||||
upload_options)
|
upload_options | upload-options)
|
||||||
UPLOAD_OPTIONS="${VALUE}"
|
UPLOAD_OPTIONS="${VALUE}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
# Proxy settings
|
# Proxy settings
|
||||||
upload_proxy_port)
|
upload_proxy_port | proxy-port)
|
||||||
UPLOAD_PROXY_PORT="${VALUE}"
|
UPLOAD_PROXY_PORT="${VALUE}"
|
||||||
;;
|
;;
|
||||||
upload_proxy_protocol)
|
upload_proxy_protocol | proxy-protocol)
|
||||||
UPLOAD_PROXY_PROTOCOL="${VALUE}"
|
UPLOAD_PROXY_PROTOCOL="${VALUE}"
|
||||||
;;
|
;;
|
||||||
upload_proxy_server)
|
upload_proxy_server | proxy-server)
|
||||||
UPLOAD_PROXY_SERVER="${VALUE}"
|
UPLOAD_PROXY_SERVER="${VALUE}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
# Receiving system (IP address or hostname)
|
# Receiving system (IP address or hostname)
|
||||||
upload_server)
|
upload_server | upload-server)
|
||||||
UPLOAD_SERVER="${VALUE}"
|
UPLOAD_SERVER="${VALUE}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
# Verbose output (--verbose)
|
# Verbose output (--verbose)
|
||||||
verbose)
|
verbose)
|
||||||
FIND=`echo "${VALUE}" | egrep "^(1|yes)"` && VERBOSE=1
|
FIND=`echo "${VALUE}" | egrep "^(1|true|yes)"` && VERBOSE=1
|
||||||
Debug "Verbose set to ${VERBOSE}"
|
Debug "Verbose set to ${VERBOSE}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user