mirror of https://github.com/CISOfy/lynis.git
Update helper_audit_dockerfile (#568)
To support LABEL maintainer="toto" and LABEL maintainer "toto" correct syntax from docker is LABEL maintainer="xxxxxxxxxxxxxxx"
This commit is contained in:
parent
e2545dc1e9
commit
839977c3f6
|
@ -94,11 +94,13 @@ fi
|
||||||
|
|
||||||
InsertSection "Basics"
|
InsertSection "Basics"
|
||||||
|
|
||||||
FIND=$(egrep "^MAINTAINER" ${AUDIT_FILE} | sed 's/ /:space:/g')
|
#FIND=$(egrep "^MAINTAINER" ${AUDIT_FILE} | sed 's/ /:space:/g')
|
||||||
|
FIND=$(egrep -i "*MAINTAINER" ${AUDIT_FILE} | sed 's/=/ /g' | cut -d'"' -f 2)
|
||||||
if [ "${FIND}" = "" ]; then
|
if [ "${FIND}" = "" ]; then
|
||||||
ReportWarning "dockerfile" "No maintainer found. Unclear who created this file."
|
ReportWarning "dockerfile" "No maintainer found. Unclear who created this file."
|
||||||
else
|
else
|
||||||
MAINTAINER=$(echo ${FIND} | sed 's/:space:/ /g' | awk '{ if($1=="MAINTAINER") { print }}')
|
#MAINTAINER=$(echo ${FIND} | sed 's/:space:/ /g' | awk '{ if($1=="MAINTAINER") { print }}')
|
||||||
|
MAINTAINER=$(echo ${FIND})
|
||||||
Display --indent 2 --text "Maintainer" --result "${MAINTAINER}"
|
Display --indent 2 --text "Maintainer" --result "${MAINTAINER}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue