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: CPE validation correctly returns error #2762

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

willmurphyscode
Copy link
Contributor

@willmurphyscode willmurphyscode commented Apr 9, 2024

Previously, this method incorrectly return an empty Attributes object and a nil error, leading to callers attempting to use the empty attributes object.

We need to be careful with this, because turning on validation that previously had no effect is always a little scary. Creating for discussion for now.

This is one aspect of the cause of anchore/grype#1792

TODO:

  • look for callers of NewAttributes and make sure they have the right behavior when it returns an error; someone might be unintentionally counting on the error being nil.

Previously, this method incorrectly return an empty Attributes object
and a nil error, leading to callers attempting to use the empty
attributes object.

Signed-off-by: Will Murphy <will.murphy@anchore.com>
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 this pull request may close these issues.

None yet

1 participant