Comments (10)
Perfect, thanks. In the upcoming release, it will be fixed then. Thanks again for reporting.
from lynis.
So the log file has a few empty lines?
Looks like the output of the command might be changed.
from lynis.
What is the output on your system for this command?
/usr/lib/update-notifier/apt-check 2>&1 | awk -F\; '{ print $2 }'
(if multiple lines are displayed, please include in the output)
from lynis.
Hello. Thanks for the reply. Yes the log has thos empty lines, that seem to come from the apt-check output:
# /usr/lib/update-notifier/apt-check 2>&1 | awk -F\; '{ print $2 }'
0
from lynis.
The raw output of this apt-check is as follow. Maybe the warnings interfere ?
# /usr/lib/update-notifier/apt-check
/usr/lib/update-notifier/apt-check:351: Warning: W:Unable to read /var/lib/ubuntu-advantage/apt-esm/etc/apt/apt.conf.d/ - DirectoryExists (2: No such file or directory)
apt_pkg.init()
/usr/lib/update-notifier/apt-check:359: Warning: W:Unable to read /var/lib/ubuntu-advantage/apt-esm/etc/apt/preferences.d/ - DirectoryExists (2: No such file or directory)
apt_pkg.init()
0;0
from lynis.
If I manually create both directories, the output becomes:
# /usr/lib/update-notifier/apt-check 2>&1 | awk -F\; '{ print $2 }'
0
And the warning goes away.
from lynis.
Thanks, looks like warnings are not properly filtered by stderr.
I have added commit f8e2da3
Can you test this change:
- Remove one of the directories, then run apt-check to confirm it shows the error again
- Run Lynis from git and see if detection works correctly
from lynis.
I removed both directories to go back to the original state.
Warnings in the output are back, as expected:
# /usr/lib/update-notifier/apt-check
/usr/lib/update-notifier/apt-check:351: Warning: W:Unable to read /var/lib/ubuntu-advantage/apt-esm/etc/apt/apt.conf.d/ - DirectoryExists (2: No such file or directory)
apt_pkg.init()
/usr/lib/update-notifier/apt-check:359: Warning: W:Unable to read /var/lib/ubuntu-advantage/apt-esm/etc/apt/preferences.d/ - DirectoryExists (2: No such file or directory)
apt_pkg.init()
0;0
To make sure, I re-launched the release version of lynis and warning is back, as expected:
-[ Lynis 3.1.1 Results ]-
Warnings (1):
----------------------------
! Found one or more vulnerable packages. [PKGS-7392]
https://cisofy.com/lynis/controls/PKGS-7392/
Then cloned the master from git and launched this command in the cloned directory:
./lynis audit system --quick
But I also got the warning:
-[ Lynis 3.1.2 Results ]-
Warnings (1):
----------------------------
! Found one or more vulnerable packages. [PKGS-7392]
https://cisofy.com/lynis/controls/PKGS-7392/
Tried the output from the command in the commit, but the output looks fine (no empty lines), so I'm not sure why I still get the warning.
# /usr/lib/update-notifier/apt-check 2>&1 | grep '^[0-9]' | awk -F\; '{ print $2 }'
0
from lynis.
I didn't remove the lynis version installed by apt before the second test. I'll just try that to make sure.
from lynis.
OK. It seems that was the issue. After removing the original 3.1.1 version from APT, running the command from the git clone repository works:
-[ Lynis 3.1.2 Results ]-
Great, no warnings
from lynis.
Related Issues (20)
- Cryptography tests get stuck on Debian 12 HOT 2
- Consider to add MFA checking on Lynis HOT 4
- Consider to add checks for some more kernel and memory hardenig HOT 1
- Firewalls [x] but nftables HOT 2
- fail2ban.configreader prints warning to stderr (allowipv6) HOT 8
- Error message on debian 12 HOT 4
- Exception found! [KRNL-5730] _ReportException_ should have _GREPTOOL_ passed in and not _GREPBINARY_ HOT 1
- Unraid /boot Function/test: [KRNL-5830:2] Can not find any vmlinuz or kernel files in
- SSH daemon is running - Exception Found HOT 3
- Unknown OS found - Neon KDE HOT 1
- Lynis on OpenBSD HOT 9
- Download area cannot be listed anymore HOT 7
- [INSE-8000] The inetd service is not detected HOT 1
- [PKGS-7410] Does not detect the package containing the kernel. HOT 1
- NETW-3200 and FILE-6430 do no longer detect blacklisted modules HOT 2
- Function/test: [SSH-7404:01], Exception found!
- Unknown OS found - gardenlinux
- JBD2 is mistakenly undetected as a missing module in kernel while being built-in to it
- [PKGS-7398] NixOS: Add package audit tool vulnnix
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lynis.