You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
KeyError when FixedVersion is absent in Trivy JSON
To Reproduce
Steps to reproduce the behaviour:
Metric Type: Security Warnings with Trivy JSON as Source
Configure Trivy JSON file with absent FixedVersion
Expected behaviour
Vulnerabilities / Security Warnings (if present) are shown
Screenshots Parse error Traceback (most recent call last): File "/home/collector/base_collectors/source_collector.py", line 148, in __safely_parse_source_responses return await self._parse_source_responses(responses) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/collector/base_collectors/source_collector.py", line 161, in _parse_source_responses included_entities = [entity for entity in await self._parse_entities(responses) if self._include_entity(entity)] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/collector/base_collectors/file_source_collector.py", line 113, in _parse_entities entities.extend(self._parse_json(json, filename)) ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^ File "/home/collector/source_collectors/trivy/security_warnings.py", line 83, in _parse_json fixed_version=vulnerability["FixedVersion"], ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^ KeyError: 'FixedVersion'
Your environment (please complete the following information):
Browser: Chrome
Quality-time version: v5.21.0
The text was updated successfully, but these errors were encountered:
Describe the bug
KeyError when FixedVersion is absent in Trivy JSON
To Reproduce
Steps to reproduce the behaviour:
Expected behaviour
Vulnerabilities / Security Warnings (if present) are shown
Screenshots
Parse error Traceback (most recent call last): File "/home/collector/base_collectors/source_collector.py", line 148, in __safely_parse_source_responses return await self._parse_source_responses(responses) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/collector/base_collectors/source_collector.py", line 161, in _parse_source_responses included_entities = [entity for entity in await self._parse_entities(responses) if self._include_entity(entity)] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/collector/base_collectors/file_source_collector.py", line 113, in _parse_entities entities.extend(self._parse_json(json, filename)) ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^ File "/home/collector/source_collectors/trivy/security_warnings.py", line 83, in _parse_json fixed_version=vulnerability["FixedVersion"], ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^ KeyError: 'FixedVersion'
Your environment (please complete the following information):
The text was updated successfully, but these errors were encountered: