mirror of https://github.com/CISOfy/lynis.git
Added support for blog posts and articles to support suggestions
This commit is contained in:
parent
86aa1b3bcc
commit
e5462afb15
|
@ -0,0 +1,4 @@
|
|||
# Links for controls pointing to informational pages. Note: only links managed by the project are allowed (cisofy.com / linux-audit.com)
|
||||
# Format: Control;Text;Link;
|
||||
BOOT-5264;blog;Systemd features to secure service files;https://linux-audit.com/systemd/systemd-features-to-secure-units-and-services/;
|
||||
# EOF
|
|
@ -161,7 +161,8 @@
|
|||
for SUGGESTION in ${SUGGESTIONS}; do
|
||||
SOLUTION=""
|
||||
SHOWSUGGESTION=$(echo ${SUGGESTION} | sed 's/!space!/ /g' | sed 's/^.* Suggestion: //' | sed 's/\[details:\(.*\)\] \[solution:\(.*\)\]//' | sed 's/test://')
|
||||
ADDLINK=$(echo ${SUGGESTION} | sed 's/!space!/ /g' | sed 's/^.* Suggestion: \(.*\)\[test://' | sed 's/\]\(.*\)]//' | ${AWKBINARY} -F: '{print $1}')
|
||||
RELATED_CONTROL=$(echo ${SUGGESTION} | sed 's/!space!/ /g' | sed 's/^.* Suggestion: \(.*\)\[test://' | sed 's/\]\(.*\)]//' | ${AWKBINARY} -F: '{print $1}')
|
||||
ADDLINK="${RELATED_CONTROL}"
|
||||
DETAILS=$(echo ${SUGGESTION} | sed 's/!space!/ /g' | sed 's/^.* Suggestion: \(.*\)\[details://' | sed 's/\]\(.*\)]//')
|
||||
SUGGESTION_PIECES=$(echo ${SUGGESTION} | sed 's/\[/ [/g')
|
||||
for PIECE in ${SUGGESTION_PIECES}; do
|
||||
|
@ -174,10 +175,15 @@
|
|||
echo " ${YELLOW}*${NORMAL} ${SHOWSUGGESTION}"
|
||||
if [ ! "${DETAILS}" = "-" -a -n "${DETAILS}" ]; then echo " - Details : ${CYAN}${DETAILS}${NORMAL}"; fi
|
||||
if [ ${SHOW_REPORT_SOLUTION} -eq 1 -a ! "${SOLUTION}" = "-" ]; then echo " - Solution : ${SOLUTION}"; fi
|
||||
# Show relevant articles if the database is available
|
||||
if [ -f ${DBDIR}/control-links.db ]; then
|
||||
echo " - Related resources:"
|
||||
$AWKBINARY -F \; -v control=${RELATED_CONTROL} '{if($1==control && $2=="blog"){print " * Article - "$3": "$4}}' "${DBDIR}/control-links.db"
|
||||
fi
|
||||
if [ -z "${IS_CUSTOM}" ]; then
|
||||
echo " ${GRAY}${CONTROL_URL_PROTOCOL}://${CONTROL_URL_PREPEND}${ADDLINK}${CONTROL_URL_APPEND}${NORMAL}"
|
||||
echo " * Website - ${GRAY}${CONTROL_URL_PROTOCOL}://${CONTROL_URL_PREPEND}${ADDLINK}${CONTROL_URL_APPEND}${NORMAL}"
|
||||
else
|
||||
echo " ${GRAY}${CUSTOM_URL_PROTOCOL}://${CUSTOM_URL_PREPEND}${ADDLINK}${CUSTOM_URL_APPEND}${NORMAL}"
|
||||
echo " * Details - ${GRAY}${CUSTOM_URL_PROTOCOL}://${CUSTOM_URL_PREPEND}${ADDLINK}${CUSTOM_URL_APPEND}${NORMAL}"
|
||||
fi
|
||||
echo ""
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue