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

get_artifact_vulnerability_reports() Raises a Validation Error when report has no vulnerabilites #91

Closed
pkalemba opened this issue Jun 24, 2024 · 0 comments · Fixed by #92

Comments

@pkalemba
Copy link
Contributor

Steps to reproduce

  1. Have an artifact that has no vulnerabilities but has a report.
  2. run a get_artifact_vulnerability_reports() method
  3. 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant