lynis/include
Simon Biewald 529bcb2a60
Test for LINUX_VERSION before setting it again
Before parsing /etc/debian-release and /etc/lsb-release,
it is now checked if the variable LINUX_VERSION is already set.

This fixes cisofy/lynis#1003, but has some side effects.

This will affects Ubuntu and Debian based distributions, like:
 - Pop!_OS (Ubuntu based)
 - Kali (Debian Based)
 - Raspbian
 - ...

Unfortunately this will likely skip/brake a few tests for those
distributions, as they are not considered to be Ubuntu or Debian
anymore. Linux Mint was already detected properly, but at least some
tests already had support for them (will other tests for Ubuntu are
skipped).

Those are tests I identified that will be skipped incorrectly now:
 - BOOT-5180: Check for Linux boot services (Debian style)
     It was already skipped on Linux Mint.
 - KRNL-5622: Check default run level on Linux machines
     This will only be skipped if systemd is not installed. It is
     already skipped on Linux Mint in this case.
 - KRNL-5788: Checking availability new kernel (sic!)
     This was already skipped on Linux Mint.
 - PKGS-7388: Check security repository (...)
     It will now be skipped for all distributions that do use the
     Debian / Ubuntu security repositories but are not detected as such
     anymore (like Pop!_OS). It will now be correctly skipped on
     Raspbian. This test was already aware of Linux Mint.
 - PKGS-7390: Check Ubuntu database consitency
     I am not sure why this test is Ubuntu only, thus it already
     skipped on Debian and Mint.
 - PKGS-7394: Check Ubuntu upgradeable packages
     I am not sure why this is for Ubuntu only, too.
     I think this should be feature tested instead, as
     apt-show-versions can be installed on any Debian based
     distribution as well..
 - PKGS-7366: Checking if debsecan is installed (...)
     While it may be correct to skip, debsecan remains usefull if
     package versions, patches and vulnerability fixes are very close
     on Debian itself.
     It is the correct behaviour to not do this test on Ubuntu and
     Ubuntu based distributions, as Canonical does not provide the
     required databases.
 - PKGS-7420: (Autoupdates)
     Linux Mint was already skipped on this test.

I think this could be solved by introducing a variable like
LINUX_VERSION_PARENT. On Linux Mint it would be set to Ubuntu, on e.g.
Kali Linux the veriable has the value Debian. Tests can use this variable
to check if it is broadly applicable, and then check if the specific
distribution is excluded.
2020-08-08 01:39:13 +02:00
..
binaries add Microsoft Defender ATP, malware scanner 2020-07-21 23:56:47 +02:00
consts Command line option for slow test threshold 2020-07-02 23:42:28 +02:00
data_upload CVE-2019-13033 - Discovered by Sander Bos 2020-06-18 12:36:04 +02:00
functions Command line option for slow test threshold 2020-07-02 23:42:28 +02:00
helper_audit_dockerfile Updated date/year 2020-03-20 14:50:25 +01:00
helper_configure Updated date/year 2020-03-20 14:50:25 +01:00
helper_generate Fix for too short IDs due to hexdump output missing leading or trailing zeroes 2020-07-06 09:26:27 +02:00
helper_show Fixed 'lynis show details' output 2020-03-23 15:55:40 +01:00
helper_system_remote_scan Updated date/year 2020-03-20 14:50:25 +01:00
helper_update Updated date/year 2020-03-20 14:50:25 +01:00
osdetection Test for LINUX_VERSION before setting it again 2020-08-08 01:39:13 +02:00
parameters Command line option for slow test threshold 2020-07-02 23:42:28 +02:00
profiles Remove unneeded line in log to prevent double entry 2020-06-21 12:57:05 +02:00
report Updated date/year 2020-03-20 14:50:25 +01:00
tests_accounting Updated date/year 2020-03-20 14:50:25 +01:00
tests_authentication Activate test for all operating systems, remove function keyword 2020-06-27 10:21:24 +02:00
tests_banners Updated date/year 2020-03-20 14:50:25 +01:00
tests_boot_services [BOOT-5122] presence check for grub.d added 2020-06-22 10:18:01 +02:00
tests_containers Updated date/year 2020-03-20 14:50:25 +01:00
tests_crypto Merge pull request #913 from topimiettinen/check-der-certs 2020-08-07 11:54:39 +02:00
tests_custom.template Code style improvement: quote argument 2019-12-18 12:17:46 +01:00
tests_databases Updated date/year 2020-03-20 14:50:25 +01:00
tests_dns Updated date/year 2020-03-20 14:50:25 +01:00
tests_file_integrity [FINT-4339] define what file to check for 2020-03-25 19:40:05 +01:00
tests_file_permissions Updated date/year 2020-03-20 14:50:25 +01:00
tests_filesystems [FILE-6430] Don't grep nonexistant modprobe.d files 2020-07-02 18:22:03 +02:00
tests_firewalls [FIRE-4534] set initial state 2020-06-26 09:44:39 +02:00
tests_hardening Updated date/year 2020-03-20 14:50:25 +01:00
tests_homedirs Updated date/year 2020-03-20 14:50:25 +01:00
tests_insecure_services [INSE-8312] corrected text 2020-06-23 13:56:13 +02:00
tests_kernel Merge pull request #920 from jsrc27/Fix-KRNL-5730 2020-06-24 09:21:32 +02:00
tests_kernel_hardening Updated date/year 2020-03-20 14:50:25 +01:00
tests_ldap Updated date/year 2020-03-20 14:50:25 +01:00
tests_logging [LOGG-2190] skip mysqld related entries 2020-04-01 16:32:52 +02:00
tests_mac_frameworks Enhance TOMOYO Linux check 2020-03-23 18:44:21 +02:00
tests_mail_messaging Updated date/year 2020-03-20 14:50:25 +01:00
tests_malware [MALW-3280] added additional BitDefender process 2020-06-24 08:09:12 +02:00
tests_memory_processes [PROC-3802] added package manager routine as dependency 2020-04-07 10:53:39 +02:00
tests_nameservices Updated date/year 2020-03-20 14:50:25 +01:00
tests_networking Adds uppercase option to the hostname validation regex 2020-06-02 15:33:32 +01:00
tests_php Add missing PHP 7.4 check for BSD 2020-07-27 13:59:46 -04:00
tests_ports_packages Fix PKGS-7301 message nit 2020-03-30 14:23:58 -05:00
tests_printers_spoolers [PRNT-2308] check for Port statement and minor adjustments to test 2020-04-02 14:45:44 +02:00
tests_scheduling Updated date/year 2020-03-20 14:50:25 +01:00
tests_shells Updated date/year 2020-03-20 14:50:25 +01:00
tests_snmp Updated date/year 2020-03-20 14:50:25 +01:00
tests_squid Updated date/year 2020-03-20 14:50:25 +01:00
tests_ssh Updated date/year 2020-03-20 14:50:25 +01:00
tests_storage Updated date/year 2020-03-20 14:50:25 +01:00
tests_storage_nfs Updated date/year 2020-03-20 14:50:25 +01:00
tests_system_integrity Updated date/year 2020-03-20 14:50:25 +01:00
tests_time Merge pull request #981 from Varbin/openntpd-equals 2020-08-07 11:50:22 +02:00
tests_tooling Updated date/year 2020-03-20 14:50:25 +01:00
tests_usb [USB-2000] improved testing for USB devices and filtering out possible incorrect state 2020-02-15 14:09:23 +01:00
tests_virtualization Updated date/year 2020-03-20 14:50:25 +01:00
tests_webservers Updated date/year 2020-03-20 14:50:25 +01:00
tool_tips Updated date/year 2020-03-20 14:50:25 +01:00