Git Product home page Git Product logo

Comments (10)

mboelen avatar mboelen commented on June 12, 2024 1

Perfect, thanks. In the upcoming release, it will be fixed then. Thanks again for reporting.

from lynis.

mboelen avatar mboelen commented on June 12, 2024

So the log file has a few empty lines?

Looks like the output of the command might be changed.

from lynis.

mboelen avatar mboelen commented on June 12, 2024

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.

abenoit-reeliant avatar abenoit-reeliant commented on June 12, 2024

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.

abenoit-reeliant avatar abenoit-reeliant commented on June 12, 2024

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.

abenoit-reeliant avatar abenoit-reeliant commented on June 12, 2024

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.

mboelen avatar mboelen commented on June 12, 2024

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.

abenoit-reeliant avatar abenoit-reeliant commented on June 12, 2024

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.

abenoit-reeliant avatar abenoit-reeliant commented on June 12, 2024

I didn't remove the lynis version installed by apt before the second test. I'll just try that to make sure.

from lynis.

abenoit-reeliant avatar abenoit-reeliant commented on June 12, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.