Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ubuntu): improve parsing severity from priority #419

Merged
merged 1 commit into from
Dec 11, 2023

Conversation

westonsteimel
Copy link
Contributor

@westonsteimel westonsteimel commented Dec 11, 2023

Improve the error handling when setting the vulnerability severity from the Ubuntu patch priority. Gracefully handles the case where priority is an expected value of untriaged and only logs as a warning if it is some other unknown value rather than having exception traces like previously

2023-12-11T05:06:21.6224848Z �[0m[INFO ] begin loading processed CVE content and transforming into vulnerabilities�[0m
2023-12-11T05:06:22.0590445Z �[31m[ERROR] setting unknown severity due to exception getting severity�[0m
2023-12-11T05:06:22.0591325Z Traceback (most recent call last):
2023-12-11T05:06:22.0599974Z   File "/home/runner/work/vunnel/vunnel/src/vunnel/providers/ubuntu/parser.py", line 497, in map_parsed
2023-12-11T05:06:22.0601318Z     r.Severity = getattr(Severity, parsed_cve.priority.capitalize())
2023-12-11T05:06:22.0602189Z                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-12-11T05:06:22.0603136Z   File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/enum.py", line 784, in __getattr__
2023-12-11T05:06:22.0604144Z     raise AttributeError(name) from None
2023-12-11T05:06:22.0604562Z AttributeError: Untriaged
2023-12-11T05:06:22.0605264Z �[31m[ERROR] setting unknown severity due to exception getting severity�[0m
2023-12-11T05:06:22.0606338Z Traceback (most recent call last):
2023-12-11T05:06:22.0607133Z   File "/home/runner/work/vunnel/vunnel/src/vunnel/providers/ubuntu/parser.py", line 497, in map_parsed
2023-12-11T05:06:22.0608677Z     r.Severity = getattr(Severity, parsed_cve.priority.capitalize())
2023-12-11T05:06:22.0609454Z                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-12-11T05:06:22.0610201Z   File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/enum.py", line 784, in __getattr__
2023-12-11T05:06:22.0610913Z     raise AttributeError(name) from None
2023-12-11T05:06:22.0611325Z AttributeError: Untriaged
2023-12-11T05:06:22.0612024Z �[31m[ERROR] setting unknown severity due to exception getting severity�[0m
2023-12-11T05:06:22.0612580Z Traceback (most recent call last):
2023-12-11T05:06:22.0613363Z   File "/home/runner/work/vunnel/vunnel/src/vunnel/providers/ubuntu/parser.py", line 497, in map_parsed
2023-12-11T05:06:22.0614249Z     r.Severity = getattr(Severity, parsed_cve.priority.capitalize())
2023-12-11T05:06:22.0614954Z                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-12-11T05:06:22.0615674Z   File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/enum.py", line 784, in __getattr__
2023-12-11T05:06:22.0616366Z     raise AttributeError(name) from None
2023-12-11T05:06:22.0616777Z AttributeError: Untriaged
2023-12-11T05:06:22.0617325Z �[31m[ERROR] setting unknown severity due to exception getting severity�[0m
2023-12-11T05:06:22.0617867Z Traceback (most recent call last):
2023-12-11T05:06:22.0618620Z   File "/home/runner/work/vunnel/vunnel/src/vunnel/providers/ubuntu/parser.py", line 497, in map_parsed
2023-12-11T05:06:22.0619504Z     r.Severity = getattr(Severity, parsed_cve.priority.capitalize())
2023-12-11T05:06:22.0620204Z                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-12-11T05:06:22.0620915Z   File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/enum.py", line 784, in __getattr__
2023-12-11T05:06:22.0621612Z     raise AttributeError(name) from None
2023-12-11T05:06:22.0622014Z AttributeError: Untriaged
2023-12-11T05:06:22.0622557Z �[31m[ERROR] setting unknown severity due to exception getting severity�[0m
2023-12-11T05:06:22.0623098Z Traceback (most recent call last):
2023-12-11T05:06:22.0623968Z   File "/home/runner/work/vunnel/vunnel/src/vunnel/providers/ubuntu/parser.py", line 497, in map_parsed
2023-12-11T05:06:22.0624837Z     r.Severity = getattr(Severity, parsed_cve.priority.capitalize())
2023-12-11T05:06:22.0625537Z                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-12-11T05:06:22.0626253Z   File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/enum.py", line 784, in __getattr__
2023-12-11T05:06:22.0626943Z     raise AttributeError(name) from None
2023-12-11T05:06:22.0627342Z AttributeError: Untriaged
2023-12-11T05:06:22.0627884Z �[31m[ERROR] setting unknown severity due to exception getting severity�[0m
2023-12-11T05:06:22.0628430Z Traceback (most recent call last):
2023-12-11T05:06:22.0629267Z   File "/home/runner/work/vunnel/vunnel/src/vunnel/providers/ubuntu/parser.py", line 497, in map_parsed
2023-12-11T05:06:22.0630145Z     r.Severity = getattr(Severity, parsed_cve.priority.capitalize())
2023-12-11T05:06:22.0630841Z                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-12-11T05:06:22.0631545Z   File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/enum.py", line 784, in __getattr__
2023-12-11T05:06:22.0632239Z     raise AttributeError(name) from None
2023-12-11T05:06:22.0632643Z AttributeError: Untriaged
2023-12-11T05:06:22.0633199Z �[31m[ERROR] setting unknown severity due to exception getting severity�[0m
2023-12-11T05:06:22.0633741Z Traceback (most recent call last):
2023-12-11T05:06:22.0634537Z   File "/home/runner/work/vunnel/vunnel/src/vunnel/providers/ubuntu/parser.py", line 497, in map_parsed
2023-12-11T05:06:22.0635407Z     r.Severity = getattr(Severity, parsed_cve.priority.capitalize())
2023-12-11T05:06:22.0636178Z                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-12-11T05:06:22.0636884Z   File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/enum.py", line 784, in __getattr__
2023-12-11T05:06:22.0637574Z     raise AttributeError(name) from None
2023-12-11T05:06:22.0637973Z AttributeError: Untriaged
2023-12-11T05:06:22.0638521Z �[31m[ERROR] setting unknown severity due to exception getting severity�[0m
2023-12-11T05:06:22.0639071Z Traceback (most recent call last):
2023-12-11T05:06:22.0639816Z   File "/home/runner/work/vunnel/vunnel/src/vunnel/providers/ubuntu/parser.py", line 497, in map_parsed
2023-12-11T05:06:22.0640688Z     r.Severity = getattr(Severity, parsed_cve.priority.capitalize())
2023-12-11T05:06:22.0641449Z                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-12-11T05:06:22.0642149Z   File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/enum.py", line 784, in __getattr__
2023-12-11T05:06:22.0642833Z     raise AttributeError(name) from None
2023-12-11T05:06:22.0643238Z AttributeError: Untriaged
2023-12-11T05:06:22.7302598Z �[31m[ERROR] setting unknown severity due to exception getting severity�[0m
2023-12-11T05:06:22.7303875Z Traceback (most recent call last):
2023-12-11T05:06:22.7305495Z   File "/home/runner/work/vunnel/vunnel/src/vunnel/providers/ubuntu/parser.py", line 497, in map_parsed
2023-12-11T05:06:22.7307507Z     r.Severity = getattr(Severity, parsed_cve.priority.capitalize())
2023-12-11T05:06:22.7309077Z                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-12-11T05:06:22.7310255Z   File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/enum.py", line 784, in __getattr__
2023-12-11T05:06:22.7311212Z     raise AttributeError(name) from None
2023-12-11T05:06:22.7311633Z AttributeError: Untriaged
2023-12-11T05:06:22.7312239Z �[31m[ERROR] setting unknown severity due to exception getting severity�[0m
2023-12-11T05:06:22.7312830Z Traceback (most recent call last):
2023-12-11T05:06:22.7313686Z   File "/home/runner/work/vunnel/vunnel/src/vunnel/providers/ubuntu/parser.py", line 497, in map_parsed
2023-12-11T05:06:22.7314695Z     r.Severity = getattr(Severity, parsed_cve.priority.capitalize())
2023-12-11T05:06:22.7315490Z                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-12-11T05:06:22.7316286Z   File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/enum.py", line 784, in __getattr__
2023-12-11T05:06:22.7317331Z     raise AttributeError(name) from None
2023-12-11T05:06:22.7317698Z AttributeError: Untriaged
2023-12-11T05:06:22.7318229Z �[31m[ERROR] setting unknown severity due to exception getting severity�[0m
2023-12-11T05:06:22.7318744Z Traceback (most recent call last):
2023-12-11T05:06:22.7319612Z   File "/home/runner/work/vunnel/vunnel/src/vunnel/providers/ubuntu/parser.py", line 497, in map_parsed
2023-12-11T05:06:22.7320485Z     r.Severity = getattr(Severity, parsed_cve.priority.capitalize())
2023-12-11T05:06:22.7321172Z                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-12-11T05:06:22.7322012Z   File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/enum.py", line 784, in __getattr__
2023-12-11T05:06:22.7322687Z     raise AttributeError(name) from None
2023-12-11T05:06:22.7323057Z AttributeError: Untriaged
2023-12-11T05:06:22.7323582Z �[31m[ERROR] setting unknown severity due to exception getting severity�[0m
2023-12-11T05:06:22.7324104Z Traceback (most recent call last):
2023-12-11T05:06:22.7324860Z   File "/home/runner/work/vunnel/vunnel/src/vunnel/providers/ubuntu/parser.py", line 497, in map_parsed
2023-12-11T05:06:22.7325726Z     r.Severity = getattr(Severity, parsed_cve.priority.capitalize())
2023-12-11T05:06:22.7326404Z                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-12-11T05:06:22.7327118Z   File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/enum.py", line 784, in __getattr__
2023-12-11T05:06:22.7328001Z     raise AttributeError(name) from None
2023-12-11T05:06:22.7328370Z AttributeError: Untriaged
2023-12-11T05:06:22.7759703Z �[31m[ERROR] setting unknown severity due to exception getting severity�[0m
2023-12-11T05:06:22.7760700Z Traceback (most recent call last):
2023-12-11T05:06:22.7762157Z   File "/home/runner/work/vunnel/vunnel/src/vunnel/providers/ubuntu/parser.py", line 497, in map_parsed
2023-12-11T05:06:22.7763481Z     r.Severity = getattr(Severity, parsed_cve.priority.capitalize())
2023-12-11T05:06:22.7764574Z                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-12-11T05:06:22.7765884Z   File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/enum.py", line 784, in __getattr__
2023-12-11T05:06:22.7766624Z     raise AttributeError(name) from None
2023-12-11T05:06:22.7767011Z AttributeError: Untriaged
2023-12-11T05:06:22.7768267Z �[31m[ERROR] setting unknown severity due to exception getting severity�[0m
2023-12-11T05:06:22.7768909Z Traceback (most recent call last):
2023-12-11T05:06:22.7769738Z   File "/home/runner/work/vunnel/vunnel/src/vunnel/providers/ubuntu/parser.py", line 497, in map_parsed
2023-12-11T05:06:22.7770945Z     r.Severity = getattr(Severity, parsed_cve.priority.capitalize())
2023-12-11T05:06:22.7771905Z                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-12-11T05:06:22.7772669Z   File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/enum.py", line 784, in __getattr__
2023-12-11T05:06:22.7773405Z     raise AttributeError(name) from None
2023-12-11T05:06:22.7773798Z AttributeError: Untriaged
2023-12-11T05:06:22.7774377Z �[31m[ERROR] setting unknown severity due to exception getting severity�[0m
2023-12-11T05:06:22.7774935Z Traceback (most recent call last):
2023-12-11T05:06:22.7775729Z   File "/home/runner/work/vunnel/vunnel/src/vunnel/providers/ubuntu/parser.py", line 497, in map_parsed
2023-12-11T05:06:22.7776639Z     r.Severity = getattr(Severity, parsed_cve.priority.capitalize())
2023-12-11T05:06:22.7777314Z                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-12-11T05:06:22.7778003Z   File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/enum.py", line 784, in __getattr__
2023-12-11T05:06:22.7778671Z     raise AttributeError(name) from None
2023-12-11T05:06:22.7779031Z AttributeError: Untriaged
2023-12-11T05:06:22.7779547Z �[31m[ERROR] setting unknown severity due to exception getting severity�[0m
2023-12-11T05:06:22.7780052Z Traceback (most recent call last):
2023-12-11T05:06:22.7780905Z   File "/home/runner/work/vunnel/vunnel/src/vunnel/providers/ubuntu/parser.py", line 497, in map_parsed
2023-12-11T05:06:22.7781770Z     r.Severity = getattr(Severity, parsed_cve.priority.capitalize())
2023-12-11T05:06:22.7782452Z                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-12-11T05:06:22.7783151Z   File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/enum.py", line 784, in __getattr__
2023-12-11T05:06:22.7783812Z     raise AttributeError(name) from None
2023-12-11T05:06:22.7784173Z AttributeError: Untriaged
2023-12-11T05:06:22.7784702Z �[31m[ERROR] setting unknown severity due to exception getting severity�[0m
2023-12-11T05:06:22.7785216Z Traceback (most recent call last):
2023-12-11T05:06:22.7786048Z   File "/home/runner/work/vunnel/vunnel/src/vunnel/providers/ubuntu/parser.py", line 497, in map_parsed
2023-12-11T05:06:22.7786909Z     r.Severity = getattr(Severity, parsed_cve.priority.capitalize())
2023-12-11T05:06:22.7787590Z                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-12-11T05:06:22.7788275Z   File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/enum.py", line 784, in __getattr__
2023-12-11T05:06:22.7788929Z     raise AttributeError(name) from None
2023-12-11T05:06:22.7789288Z AttributeError: Untriaged
2023-12-11T05:06:22.7878251Z �[31m[ERROR] setting unknown severity due to exception getting severity�[0m
2023-12-11T05:06:22.7879202Z Traceback (most recent call last):
2023-12-11T05:06:22.7880683Z   File "/home/runner/work/vunnel/vunnel/src/vunnel/providers/ubuntu/parser.py", line 497, in map_parsed
2023-12-11T05:06:22.7881945Z     r.Severity = getattr(Severity, parsed_cve.priority.capitalize())
2023-12-11T05:06:22.7883370Z                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-12-11T05:06:22.7884589Z   File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/enum.py", line 784, in __getattr__
2023-12-11T05:06:22.7885447Z     raise AttributeError(name) from None
2023-12-11T05:06:22.7886165Z AttributeError: Untriaged
2023-12-11T05:06:22.7886953Z �[31m[ERROR] setting unknown severity due to exception getting severity�[0m
2023-12-11T05:06:22.7887745Z Traceback (most recent call last):
2023-12-11T05:06:22.7888529Z   File "/home/runner/work/vunnel/vunnel/src/vunnel/providers/ubuntu/parser.py", line 497, in map_parsed
2023-12-11T05:06:22.7889894Z     r.Severity = getattr(Severity, parsed_cve.priority.capitalize())
2023-12-11T05:06:22.7890708Z                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-12-11T05:06:22.7891429Z   File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/enum.py", line 784, in __getattr__
2023-12-11T05:06:22.7892112Z     raise AttributeError(name) from None
2023-12-11T05:06:22.7892478Z AttributeError: Untriaged
2023-12-11T05:06:22.7893038Z �[31m[ERROR] setting unknown severity due to exception getting severity�[0m
2023-12-11T05:06:22.7893548Z Traceback (most recent call last):
2023-12-11T05:06:22.7894302Z   File "/home/runner/work/vunnel/vunnel/src/vunnel/providers/ubuntu/parser.py", line 497, in map_parsed
2023-12-11T05:06:22.7895161Z     r.Severity = getattr(Severity, parsed_cve.priority.capitalize())
2023-12-11T05:06:22.7895834Z                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-12-11T05:06:22.7896519Z   File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/enum.py", line 784, in __getattr__
2023-12-11T05:06:22.7897196Z     raise AttributeError(name) from None
2023-12-11T05:06:22.7897559Z AttributeError: Untriaged
2023-12-11T05:06:22.7898073Z �[31m[ERROR] setting unknown severity due to exception getting severity�[0m
2023-12-11T05:06:22.7898583Z Traceback (most recent call last):
2023-12-11T05:06:22.7899325Z   File "/home/runner/work/vunnel/vunnel/src/vunnel/providers/ubuntu/parser.py", line 497, in map_parsed
2023-12-11T05:06:22.7900183Z     r.Severity = getattr(Severity, parsed_cve.priority.capitalize())
2023-12-11T05:06:22.7900855Z                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-12-11T05:06:22.7901645Z   File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/enum.py", line 784, in __getattr__
2023-12-11T05:06:22.7902298Z     raise AttributeError(name) from None
2023-12-11T05:06:22.7902656Z AttributeError: Untriaged
2023-12-11T05:06:22.7903164Z �[31m[ERROR] setting unknown severity due to exception getting severity�[0m
2023-12-11T05:06:22.7903658Z Traceback (most recent call last):
2023-12-11T05:06:22.7904393Z   File "/home/runner/work/vunnel/vunnel/src/vunnel/providers/ubuntu/parser.py", line 497, in map_parsed
2023-12-11T05:06:22.7905249Z     r.Severity = getattr(Severity, parsed_cve.priority.capitalize())
2023-12-11T05:06:22.7905931Z                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-12-11T05:06:22.7906699Z   File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/enum.py", line 784, in __getattr__
2023-12-11T05:06:22.7907359Z     raise AttributeError(name) from None
2023-12-11T05:06:22.7907720Z AttributeError: Untriaged
2023-12-11T05:06:22.8607797Z �[31m[ERROR] setting unknown severity due to exception getting severity�[0m
2023-12-11T05:06:22.8608758Z Traceback (most recent call last):
2023-12-11T05:06:22.8609875Z   File "/home/runner/work/vunnel/vunnel/src/vunnel/providers/ubuntu/parser.py", line 497, in map_parsed
2023-12-11T05:06:22.8611290Z     r.Severity = getattr(Severity, parsed_cve.priority.capitalize())
2023-12-11T05:06:22.8612297Z                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-12-11T05:06:22.8613444Z   File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/enum.py", line 784, in __getattr__
2023-12-11T05:06:22.8614563Z     raise AttributeError(name) from None
2023-12-11T05:06:22.8615373Z AttributeError: Untriaged
2023-12-11T05:06:22.8616111Z �[31m[ERROR] setting unknown severity due to exception getting severity�[0m
2023-12-11T05:06:22.8616810Z Traceback (most recent call last):
2023-12-11T05:06:22.8617746Z   File "/home/runner/work/vunnel/vunnel/src/vunnel/providers/ubuntu/parser.py", line 497, in map_parsed
2023-12-11T05:06:22.8618638Z     r.Severity = getattr(Severity, parsed_cve.priority.capitalize())
2023-12-11T05:06:22.8619325Z                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-12-11T05:06:22.8620041Z   File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/enum.py", line 784, in __getattr__
2023-12-11T05:06:22.8620717Z     raise AttributeError(name) from None
2023-12-11T05:06:22.8621083Z AttributeError: Untriaged
2023-12-11T05:06:22.8621721Z �[31m[ERROR] setting unknown severity due to exception getting severity�[0m
2023-12-11T05:06:22.8622235Z Traceback (most recent call last):
2023-12-11T05:06:22.8622975Z   File "/home/runner/work/vunnel/vunnel/src/vunnel/providers/ubuntu/parser.py", line 497, in map_parsed
2023-12-11T05:06:22.8623838Z     r.Severity = getattr(Severity, parsed_cve.priority.capitalize())
2023-12-11T05:06:22.8624509Z                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-12-11T05:06:22.8625203Z   File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/enum.py", line 784, in __getattr__
2023-12-11T05:06:22.8625862Z     raise AttributeError(name) from None
2023-12-11T05:06:22.8626227Z AttributeError: Untriaged
2023-12-11T05:06:22.8626737Z �[31m[ERROR] setting unknown severity due to exception getting severity�[0m
2023-12-11T05:06:22.8627248Z Traceback (most recent call last):
2023-12-11T05:06:22.8627982Z   File "/home/runner/work/vunnel/vunnel/src/vunnel/providers/ubuntu/parser.py", line 497, in map_parsed
2023-12-11T05:06:22.8628833Z     r.Severity = getattr(Severity, parsed_cve.priority.capitalize())
2023-12-11T05:06:22.8629511Z                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-12-11T05:06:22.8630205Z   File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/enum.py", line 784, in __getattr__
2023-12-11T05:06:22.8630868Z     raise AttributeError(name) from None
2023-12-11T05:06:22.8631233Z AttributeError: Untriaged
2023-12-11T05:06:22.9565948Z �[31m[ERROR] setting unknown severity due to exception getting severity�[0m
2023-12-11T05:06:22.9567032Z Traceback (most recent call last):
2023-12-11T05:06:22.9568353Z   File "/home/runner/work/vunnel/vunnel/src/vunnel/providers/ubuntu/parser.py", line 497, in map_parsed
2023-12-11T05:06:22.9569349Z     r.Severity = getattr(Severity, parsed_cve.priority.capitalize())
2023-12-11T05:06:22.9570435Z                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-12-11T05:06:22.9571251Z   File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/enum.py", line 784, in __getattr__
2023-12-11T05:06:22.9572005Z     raise AttributeError(name) from None
2023-12-11T05:06:22.9572624Z AttributeError: Untriaged
2023-12-11T05:06:22.9573314Z �[31m[ERROR] setting unknown severity due to exception getting severity�[0m
2023-12-11T05:06:22.9573969Z Traceback (most recent call last):
2023-12-11T05:06:22.9574743Z   File "/home/runner/work/vunnel/vunnel/src/vunnel/providers/ubuntu/parser.py", line 497, in map_parsed
2023-12-11T05:06:22.9575611Z     r.Severity = getattr(Severity, parsed_cve.priority.capitalize())
2023-12-11T05:06:22.9576300Z                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-12-11T05:06:22.9577003Z   File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/enum.py", line 784, in __getattr__
2023-12-11T05:06:22.9577667Z     raise AttributeError(name) from None
2023-12-11T05:06:22.9578029Z AttributeError: Untriaged
2023-12-11T05:06:22.9578551Z �[31m[ERROR] setting unknown severity due to exception getting severity�[0m
2023-12-11T05:06:22.9579063Z Traceback (most recent call last):
2023-12-11T05:06:22.9579804Z   File "/home/runner/work/vunnel/vunnel/src/vunnel/providers/ubuntu/parser.py", line 497, in map_parsed
2023-12-11T05:06:22.9580759Z     r.Severity = getattr(Severity, parsed_cve.priority.capitalize())
2023-12-11T05:06:22.9581448Z                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-12-11T05:06:22.9582135Z   File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/enum.py", line 784, in __getattr__
2023-12-11T05:06:22.9582798Z     raise AttributeError(name) from None
2023-12-11T05:06:22.9583161Z AttributeError: Untriaged
2023-12-11T05:06:22.9583677Z �[31m[ERROR] setting unknown severity due to exception getting severity�[0m
2023-12-11T05:06:22.9584189Z Traceback (most recent call last):
2023-12-11T05:06:22.9584929Z   File "/home/runner/work/vunnel/vunnel/src/vunnel/providers/ubuntu/parser.py", line 497, in map_parsed
2023-12-11T05:06:22.9585873Z     r.Severity = getattr(Severity, parsed_cve.priority.capitalize())
2023-12-11T05:06:22.9586553Z                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-12-11T05:06:22.9587251Z   File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/enum.py", line 784, in __getattr__
2023-12-11T05:06:22.9587918Z     raise AttributeError(name) from None
2023-12-11T05:06:22.9588280Z AttributeError: Untriaged

Improve the error handling when setting the vulnerability severity from
the patch priority.

Signed-off-by: Weston Steimel <[email protected]>
@westonsteimel westonsteimel added the bug Something isn't working label Dec 11, 2023
@westonsteimel westonsteimel requested a review from a team December 11, 2023 18:27
@westonsteimel westonsteimel added the run-pr-quality-gate Triggers running of quality gate on PRs label Dec 11, 2023
@westonsteimel westonsteimel enabled auto-merge (squash) December 11, 2023 18:35
@westonsteimel westonsteimel merged commit e2b6a6c into main Dec 11, 2023
14 of 16 checks passed
@westonsteimel westonsteimel deleted the improve-ubuntu-severity-parsing-error-logic branch December 11, 2023 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working run-pr-quality-gate Triggers running of quality gate on PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants