Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CISOfy/lynis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormboelen <michael@cisofy.com>2016-04-25 16:49:45 +0300
committermboelen <michael@cisofy.com>2016-04-25 16:49:45 +0300
commite5790dc8c6c2349a846c4d50b019ab31735ff93b (patch)
treeb4947b3df8de17ebb9541bdc07d09bc42e9c7425
parent021fd8a98c61babb5f81203fef682f2a0fa78a83 (diff)
Added: lynis show tests skipped (skipped tests)
-rw-r--r--include/helper_show23
1 files changed, 21 insertions, 2 deletions
diff --git a/include/helper_show b/include/helper_show
index 1a0383df..fb194fa8 100644
--- a/include/helper_show
+++ b/include/helper_show
@@ -31,7 +31,7 @@
COMMANDS="audit show update"
OPTIONS="--auditor\n--check-all (-c)\n--config\n--cronjob (--cron)\n--debug\n--help (-h)\n--info\n--license-key --log-file\n--manpage_(--man)\n--no-colors --no-log\n--pentest\n--profile\n--plugins-dir\n--quiet (-q)\n--quick (-Q)\n--report-file\n--reverse-colors\n--tests\n--tests-category\n--upload\n--verbose\n--version (-V)\n--view-categories"
-SHOW_ARGS="commands help license man options pidfile plugindir profiles release releasedate version"
+SHOW_ARGS="commands help license man options pidfile plugindir profiles release releasedate tests version"
SHOW_HELP="lynis show ${BROWN}commands${NORMAL} (all available commands)
lynis show ${BROWN}help${NORMAL} (detailed information about arguments)
lynis show ${BROWN}license${NORMAL} (license details)
@@ -42,6 +42,7 @@ lynis show ${BROWN}plugindir${NORMAL} (directory with plugins)
lynis show ${BROWN}profiles${NORMAL} (discovered profiles)
lynis show ${BROWN}release${NORMAL} (version)
lynis show ${BROWN}releasedate${NORMAL} (date of release)
+lynis show ${BROWN}tests skipped${NORMAL} (which tests to skip according profile)
lynis show ${BROWN}version${NORMAL} (${PROGRAM_NAME} version)"
AUDIT_ARGS="( dockerfile | system )"
@@ -60,6 +61,8 @@ AUDIT_HELP="
UPDATE_ARGS="info release"
+SHOW_TESTS_ARGS="skipped"
+
COMMANDS_AUDIT_SYSTEM_USAGE="Usage: lynis audit system"
COMMANDS_AUDIT_SYSTEM_FUNCTION="Function: performs a security audit of the system"
@@ -111,7 +114,7 @@ if [ $# -gt 0 ]; then
"show") echo "${SHOW_ARGS}" ;;
"update") echo "${UPDATE_ARGS}" ;;
"?") echo "${SHOW_ARGS}" ;;
- *) echo "Invalid argument provided" ;;
+ *) echo "Invalid argument provided for lynis show help" ;;
esac
fi
;;
@@ -124,6 +127,22 @@ if [ $# -gt 0 ]; then
"plugindir") echo "${PLUGINDIR}" ;;
"release" | "version") echo "${PROGRAM_VERSION}" ;;
"releasedate") echo "${PROGRAM_RELEASE_DATE}" ;;
+ "tests")
+ if [ $# -gt 0 ]; then
+ shift
+ case $1 in
+ "skipped") echo "${SKIP_TESTS}" ;;
+ *) printf "Invalid argument provided to lynis show tests\n\n"
+ printf "Suggestions:\n"
+ for I in ${SHOW_TESTS_ARGS}; do
+ echo "lynis show tests ${I}"
+ done
+ ;;
+ esac
+ else
+ echo "Need more arguments"
+ fi
+ ;;
"?") echo "${SHOW_ARGS}" ;;
*) echo "Unknown option" ;;
esac