Package: lynis
Version: 1.6.4-1
Severity: wishlist

Dear Maintainer,

I've run into a small issue with patches I've previously submitted and
any I might submit in the future.  After Lynis finishes a run, it
presents the user with a series of suggestions or warnings to help them
improve the security of their system.  Included with these suggestions
in an URL that is formatted like so:

     http://cisofy.com/controls/<section>-<number>

This is great for tests that were created upstream and have a registered
number so that the appropriate webpage can be produced & delivered.

However for tests that I have submitted, I have been using the format of
<section>-#### as a placeholder for numbers that can be later assigned.

A small problem occurs when this placeholder is used to create an URL.
It creates an URL that does not point at an existing page.  Therefore, I
propose the following patch to the report functions so that it does not
display an URL for any test registered with '####' instead of a number.

The issue will be more obvious when you consider the next patch I will
submit to tests_ssh.  It includes 6 new tests and would display bad URLs
for each.  The simple patch include here will suppress those URLs while
keeping with the overall flow of the Lynis output.

What do you think?  Is this worth including?

Thanks,

Dave


-- System Information:
Debian Release: 8.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

lynis depends on no packages.

Versions of packages lynis recommends:
ii  menu  2.1.47

Versions of packages lynis suggests:
ii  dnsutils  1:9.9.5.dfsg-9

-- no debconf information

-- 
Dave Vehrs            Email: dve...@gmail.com

--- report.orig	2015-01-11 16:18:36.934448110 -0700
+++ report	2015-01-11 17:07:47.192508015 -0700
@@ -122,7 +122,10 @@
                 SHOWWARNING=`echo ${WARNING} | sed 's/!space!/ /g' | sed 's/^\[\(.*\)\] Warning: //'`
                 ADDLINK=`echo ${WARNING} | sed 's/!space!/ /g' | sed 's/^\[\(.*\)\] Warning: \(.*\)\[//' | sed 's/\]//'`
                 echo "  ${WHITE}- ${SHOWWARNING}${NORMAL}"
-                echo "      http://cisofy.com/controls/${ADDLINK}/";
+                LINKNUM=`echo ${ADDLINK} | sed 's/.*-//'`
+                if [ ! "${LINKNUM}" = "####" ]; then
+                    echo "      http://cisofy.com/controls/${ADDLINK}/";
+                fi
                 echo ""
             done
         fi
@@ -139,7 +142,10 @@
                 SHOWSUGGESTION=`echo ${SUGGESTION} | sed 's/!space!/ /g' | sed 's/^\[\(.*\)\] Suggestion: //'`
                 ADDLINK=`echo ${SUGGESTION} | sed 's/!space!/ /g' | sed 's/^\[\(.*\)\] Suggestion: \(.*\)\[//' | sed 's/\]//'`
                 echo "  - ${SHOWSUGGESTION}"
-                echo "      http://cisofy.com/controls/${ADDLINK}/";
+                LINKNUM=`echo ${ADDLINK} | sed 's/.*-//'`
+                if [ ! "${LINKNUM}" = "####" ]; then
+                    echo "      http://cisofy.com/controls/${ADDLINK}/";
+                fi
             done
             echo ""
         fi

Reply via email to