greenbone / notus-scanner

Notus is a vulnerability scanner for creating results from local security checks

Home Page:https://greenbone.github.io/docs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stable container image does not start after logging changes

dhedberg opened this issue · comments

We just upgraded the notus-scanner image to the latest stable tag (22.4.3), and hit this

Traceback (most recent call last):
  File "/usr/local/bin/notus-scanner", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.9/dist-packages/notus/scanner/daemon.py", line 137, in main
    init_logging(
  File "/usr/local/lib/python3.9/dist-packages/notus/scanner/utils.py", line 139, in init_logging
    logfile = WatchedFileHandler(log_file)
  File "/usr/lib/python3.9/logging/handlers.py", line 445, in __init__
    logging.FileHandler.__init__(self, filename, mode=mode,
  File "/usr/lib/python3.9/logging/__init__.py", line 1128, in __init__
    filename = os.fspath(filename)
TypeError: expected str, bytes or os.PathLike object, not NoneType

The issue seems to be that the --log-file argument is now required since #411 / #412 when running in the foreground, but the scanner is started without:

CMD ["notus-scanner", "-f", "-b", "broker"]

Adding --log-file /dev/null seems to work as a temporary fix.