mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-31 01:34:23 +02:00
Adding upload options and audit scan mode
This commit is contained in:
parent
42e3f46a28
commit
f5550fa5d2
@ -5,8 +5,8 @@
|
|||||||
# Lynis
|
# Lynis
|
||||||
# ------------------
|
# ------------------
|
||||||
#
|
#
|
||||||
# Copyright 2007-2015, Michael Boelen (michael@rootkit.nl), The Netherlands
|
# Copyright 2007-2015, Michael Boelen (michael.boelen@cisofy.com)
|
||||||
# Web site: http://www.rootkit.nl
|
# Web site: https://cisofy.com
|
||||||
#
|
#
|
||||||
# Lynis comes with ABSOLUTELY NO WARRANTY. This is free software, and you are
|
# Lynis comes with ABSOLUTELY NO WARRANTY. This is free software, and you are
|
||||||
# welcome to redistribute it under the terms of the GNU General Public License.
|
# welcome to redistribute it under the terms of the GNU General Public License.
|
||||||
@ -22,8 +22,43 @@
|
|||||||
# Check number of parameters submitted (at least one is needed)
|
# Check number of parameters submitted (at least one is needed)
|
||||||
PARAMCOUNT=$#
|
PARAMCOUNT=$#
|
||||||
while [ $# -ge 1 ]; do
|
while [ $# -ge 1 ]; do
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
|
audit)
|
||||||
|
CHECK_BINARIES=0
|
||||||
|
RUN_HELPERS=1
|
||||||
|
HELPER="audit"
|
||||||
|
RUN_PLUGINS=0
|
||||||
|
RUN_TESTS=0
|
||||||
|
if [ ! $2 = "" ]; then
|
||||||
|
case $2 in
|
||||||
|
"dockerfile")
|
||||||
|
if [ "$3" = "" ]; then
|
||||||
|
Display --text "${RED}Error: ${WHITE}Missing file name or URL${NORMAL}"
|
||||||
|
Display --text "Example: lynis audit dockerfile /root/Dockerfile"
|
||||||
|
ExitFatal
|
||||||
|
else
|
||||||
|
shift; shift
|
||||||
|
HELPER_PARAMS="$1 $2 $3"
|
||||||
|
HELPER="audit_dockerfile"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
"system")
|
||||||
|
CHECK_BINARIES=1
|
||||||
|
HELPER=""
|
||||||
|
RUN_PLUGINS=1
|
||||||
|
RUN_TESTS=1
|
||||||
|
shift
|
||||||
|
#break
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
Display --text "${RED}Error: ${WHITE}Need a target to audit${NORMAL}"
|
||||||
|
Display --text "Example: lynis audit system"
|
||||||
|
ExitFatal
|
||||||
|
fi
|
||||||
|
#break
|
||||||
|
;;
|
||||||
|
|
||||||
# Assign auditor to report
|
# Assign auditor to report
|
||||||
--auditor)
|
--auditor)
|
||||||
@ -63,7 +98,7 @@
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
# View program/database information
|
# View program/database information
|
||||||
--check-update | --info)
|
--check-update | --check-updates | --info)
|
||||||
VIEWUPDATEINFO=1
|
VIEWUPDATEINFO=1
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@ -164,6 +199,13 @@
|
|||||||
UPLOAD_DATA=1
|
UPLOAD_DATA=1
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
# Lynis Enterprise: upload options (e.g. --upload-options "--insecure" to allow self-signed certificate)
|
||||||
|
--upload-options)
|
||||||
|
shift
|
||||||
|
UPLOAD_OPTIONS=$1
|
||||||
|
;;
|
||||||
|
|
||||||
|
|
||||||
# Which server to upload to
|
# Which server to upload to
|
||||||
--upload-url)
|
--upload-url)
|
||||||
shift
|
shift
|
||||||
|
Loading…
x
Reference in New Issue
Block a user