opencve/opencve-docker

celery_worker problem with updating feeds

mikess opened this issue · 2 comments

Expected Behavior

celery_worker should retrieve information from external sources and update it in the database.

Actual Behavior

celery_worker reports errors while processing NVD NIST CVE list

Steps to Reproduce the Problem

Installation performed on February 1, 2022 according to official documentation - version 1.3.0

Logs of celery_worker container:
[2022-02-02 09:42:16,648: INFO/ForkPoolWorker-2] HANDLE_EVENTS[4474cf5e-3be2-4a54-90aa-991f7893fb99]: Checking for new events...
[2022-02-02 09:42:16,649: INFO/ForkPoolWorker-2] HANDLE_EVENTS[4474cf5e-3be2-4a54-90aa-991f7893fb99]: Downloading https://nvd.nist.gov/feeds/json/cve/1.1/nvdcve-1.1-modified.meta...
[2022-02-02 09:42:17,184: ERROR/ForkPoolWorker-2] Task HANDLE_EVENTS[4474cf5e-3be2-4a54-90aa-991f7893fb99] raised unexpected: AttributeError("'NoneType' object has no attribute 'value'")
Traceback (most recent call last):
File "/app/venv/lib/python3.7/site-packages/celery/app/trace.py", line 385, in trace_task
R = retval = fun(*args, **kwargs)
File "/app/venv/lib/python3.7/site-packages/celery/app/trace.py", line 648, in protected_call
return self.run(*args, **kwargs)
File "/app/venv/lib/python3.7/site-packages/opencve/tasks/events.py", line 94, in handle_events
current_sum, new_sum = has_changed()
File "/app/venv/lib/python3.7/site-packages/opencve/tasks/events.py", line 33, in has_changed
if nvd_sha256 != last_nvd256.value:
AttributeError: 'NoneType' object has no attribute 'value'

Specifications

  • OpenCVE version: 1.3.0

  • Platform: CentOS 7 64bit

  • Docker version:
    Version: 20.10.12
    API version: 1.41 (minimum version 1.12)
    Go version: go1.16.12
    Git commit: 459d0df
    Built: Mon Dec 13 11:44:05 2021
    OS/Arch: linux/amd64
    Experimental: false

  • Docker-compose version:
    docker-compose version 1.18.0, build 8dd22a9
    docker-py version: 2.6.1
    CPython version: 3.6.8
    OpenSSL version: OpenSSL 1.0.2k-fips 26 Jan 2017

Screenshots (optional)

Please check first the history before creating an issue:

Somehow related: opencve/opencve#242

@ncrocfer @ldurnez sorry to bother you, but any idea for a solution e.g. escaping input for
File "/app/venv/lib/python3.7/site-packages/opencve/checks/references.py", line 48, in
{"old": old_refs[url], "new": new_refs[url]} for url in modified_urls

Currently no reports are generated for subscribed components and thus no notifications are distributed... thanks!