mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-28 16:24:13 +02:00
Added: lynis show tests skipped (skipped tests)
This commit is contained in:
parent
021fd8a98c
commit
e5790dc8c6
@ -31,7 +31,7 @@
|
|||||||
COMMANDS="audit show update"
|
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"
|
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)
|
SHOW_HELP="lynis show ${BROWN}commands${NORMAL} (all available commands)
|
||||||
lynis show ${BROWN}help${NORMAL} (detailed information about arguments)
|
lynis show ${BROWN}help${NORMAL} (detailed information about arguments)
|
||||||
lynis show ${BROWN}license${NORMAL} (license details)
|
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}profiles${NORMAL} (discovered profiles)
|
||||||
lynis show ${BROWN}release${NORMAL} (version)
|
lynis show ${BROWN}release${NORMAL} (version)
|
||||||
lynis show ${BROWN}releasedate${NORMAL} (date of release)
|
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)"
|
lynis show ${BROWN}version${NORMAL} (${PROGRAM_NAME} version)"
|
||||||
|
|
||||||
AUDIT_ARGS="( dockerfile | system )"
|
AUDIT_ARGS="( dockerfile | system )"
|
||||||
@ -60,6 +61,8 @@ AUDIT_HELP="
|
|||||||
|
|
||||||
UPDATE_ARGS="info release"
|
UPDATE_ARGS="info release"
|
||||||
|
|
||||||
|
SHOW_TESTS_ARGS="skipped"
|
||||||
|
|
||||||
COMMANDS_AUDIT_SYSTEM_USAGE="Usage: lynis audit system"
|
COMMANDS_AUDIT_SYSTEM_USAGE="Usage: lynis audit system"
|
||||||
COMMANDS_AUDIT_SYSTEM_FUNCTION="Function: performs a security audit of the 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}" ;;
|
"show") echo "${SHOW_ARGS}" ;;
|
||||||
"update") echo "${UPDATE_ARGS}" ;;
|
"update") echo "${UPDATE_ARGS}" ;;
|
||||||
"?") echo "${SHOW_ARGS}" ;;
|
"?") echo "${SHOW_ARGS}" ;;
|
||||||
*) echo "Invalid argument provided" ;;
|
*) echo "Invalid argument provided for lynis show help" ;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
@ -124,6 +127,22 @@ if [ $# -gt 0 ]; then
|
|||||||
"plugindir") echo "${PLUGINDIR}" ;;
|
"plugindir") echo "${PLUGINDIR}" ;;
|
||||||
"release" | "version") echo "${PROGRAM_VERSION}" ;;
|
"release" | "version") echo "${PROGRAM_VERSION}" ;;
|
||||||
"releasedate") echo "${PROGRAM_RELEASE_DATE}" ;;
|
"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 "${SHOW_ARGS}" ;;
|
||||||
*) echo "Unknown option" ;;
|
*) echo "Unknown option" ;;
|
||||||
esac
|
esac
|
||||||
|
Loading…
x
Reference in New Issue
Block a user