Added initial support for DevOps mode to improve continuous integration

This commit is contained in:
Michael Boelen 2019-08-21 13:59:28 +02:00
parent d395e1a2da
commit 65f1a5e811
No known key found for this signature in database
GPG Key ID: 26141F77A09D7F04
4 changed files with 15 additions and 7 deletions

View File

@ -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"

View File

@ -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)

View File

@ -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

View File

@ -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 ""