mirror of https://github.com/CISOfy/lynis.git
Added initial support for DevOps mode to improve continuous integration
This commit is contained in:
parent
d395e1a2da
commit
65f1a5e811
|
@ -97,6 +97,7 @@ unset LANG
|
|||
DEBSECANBINARY=""
|
||||
DEBSUMSBINARY=""
|
||||
DEVELOPER_MODE=0
|
||||
DEVOPS_MODE=0
|
||||
DISABLED_PLUGINS=""
|
||||
DISCOVERED_BINARIES=""
|
||||
DMIDECODEBINARY=""
|
||||
|
@ -114,7 +115,7 @@ unset LANG
|
|||
FIND=""
|
||||
FIREWALL_ACTIVE=0
|
||||
FOUNDPATH=0
|
||||
FORENSICS=0
|
||||
FORENSICS_MODE=0
|
||||
GETENT_BINARY=""
|
||||
GRADMBINARY=""
|
||||
GREPBINARY="grep"
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
COMMANDS="audit configure generate show update upload-only"
|
||||
HELPERS="audit configure show update"
|
||||
OPTIONS="--auditor\n--cronjob (--cron)\n--debug\n--developer\n--forensics\n--help (-h)\n--log-file\n--manpage (--man)\n--no-colors\n--no-log\n--pentest\n--profile\n--plugin-dir\n--quick (-Q)\n--quiet (-q)\n--report-file\n--reverse-colors\n--skip-plugins\n--tests\n--tests-from-category\n--tests-from-group\n--usecwd\n--upload\n--verbose\n--version (-V)\n--wait\n--warnings-only"
|
||||
OPTIONS="--auditor\n--cronjob (--cron)\n--debug\n--developer\n--devops\n--forensics\n--help (-h)\n--log-file\n--manpage (--man)\n--no-colors\n--no-log\n--pentest\n--profile\n--plugin-dir\n--quick (-Q)\n--quiet (-q)\n--report-file\n--reverse-colors\n--skip-plugins\n--tests\n--tests-from-category\n--tests-from-group\n--usecwd\n--upload\n--verbose\n--version (-V)\n--wait\n--warnings-only"
|
||||
|
||||
SHOW_ARGS="categories changelog commands dbdir details environment eol groups help hostids includedir language license logfile man options os pidfile plugindir profiles release releasedate report settings tests version workdir"
|
||||
SHOW_HELP="lynis show ${BROWN}categories${NORMAL} (display test categories)
|
||||
|
|
|
@ -241,6 +241,11 @@
|
|||
DEVELOPER_MODE=1
|
||||
;;
|
||||
|
||||
# DevOps mode (continuous integration)
|
||||
--devops)
|
||||
DEVOPS_MODE=1
|
||||
;;
|
||||
|
||||
# Enable forensics mode (gather information from a mounted directory)
|
||||
--forensics)
|
||||
FORENSICS=1
|
||||
|
|
|
@ -216,16 +216,18 @@
|
|||
|
||||
echo ""
|
||||
echo " ${SECTION}Scan mode${NORMAL}:"
|
||||
if [ ${FORENSICS} -eq 1 ]; then
|
||||
echo " Normal [ ] Forensics [V] Pentest [ ]"
|
||||
if [ ${DEVOPS_MODE} -eq 1 ]; then
|
||||
echo " Normal [ ] Forensics [ ] Integration [V] Pentest [ ]"
|
||||
elif [ ${FORENSICS_MODE} -eq 1 ]; then
|
||||
echo " Normal [ ] Forensics [V] Integration [ ] Pentest [ ]"
|
||||
elif [ ${PENTESTINGMODE} -eq 1 ]; then
|
||||
if [ ${PRIVILEGED} -eq 0 ]; then
|
||||
echo " Normal [ ] Forensics [ ] Pentest [V] (running non-privileged)"
|
||||
echo " Normal [ ] Forensics [ ] Integration [ ] Pentest [V] (running non-privileged)"
|
||||
else
|
||||
echo " Normal [ ] Forensics [ ] Pentest [V] (running privileged)"
|
||||
echo " Normal [ ] Forensics [ ] Integration [ ] Pentest [V] (running privileged)"
|
||||
fi
|
||||
else
|
||||
echo " Normal [V] Forensics [ ] Pentest [ ]"
|
||||
echo " Normal [V] Forensics [ ] Integration [ ] Pentest [ ]"
|
||||
fi
|
||||
echo ""
|
||||
|
||||
|
|
Loading…
Reference in New Issue