harborapi
harborapi copied to clipboard
get_artifact_vulnerability_reports() Raises a Validation Error when report has no vulnerabilites
Steps to reproduce
- Have an artifact that has no vulnerabilities but has a report.
- run a get_artifact_vulnerability_reports() method
- You will get
*** pydantic_core._pydantic_core.ValidationError: 1 validation error for HarborVulnerabilityReport severity Input should be 'Unknown', 'Negligible', 'Low', 'Medium', 'High', 'Critical' or 'None' [type=enum, input_value='', input_type=str] For further information visit https://errors.pydantic.dev/2.7/v/enum
IMHO you should get a report object with a None
severity and empty vulnerabilities
list