PKGS-7388 Can't find security repository
Describe the bug
Lynis reports missing security repositories from /etc/apt/ on Debian 13. Seems like this bug was already appearing on previous versions of Lynis (see issues #1636 and #576 ), and that it comes from the parsing not taking into account debian-security.list repositories.
It was suggested in issue #1636 that the bug might originate from the following line : https://github.com/CISOfy/lynis/blob/2e99f92265760b73fd6b139868eb8d4116624030/include/tests_ports_packages#L1084 Which would make sense since the grep isn't actually looking for the correct suffix.
Version
- Distribution : Debian 13 (Trixie)
- Lynis version : 3.1.7
Expected behavior
Lynis should recognize the repositories configured using the new format (*.sources) and parse the URIs in a way that recognizes security repositories defined in DEB822 format.
Output
! Can't find any security repository in /etc/apt/sources.list or sources.list.d directory [PKGS-7388]
https://cisofy.com/lynis/controls/PKGS-7388/Additional context
Current sources.list.d file is :
cat /etc/apt/sources.list.d/debian.sources
Types: deb deb-src
URIs: mirror+file:///etc/apt/mirrors/debian.list
Suites: trixie trixie-updates trixie-backports
Components: main
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
Types: deb deb-src
URIs: mirror+file:///etc/apt/mirrors/debian-security.list
Suites: trixie-security
Components: main
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpgSource: CISOfy/lynis