-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add fuzzy search for packages #153
Conversation
3b931ac
to
10e3e8c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Friendly reminder to rebase :) |
tests/test_routes.py
Outdated
) | ||
|
||
assert filtered_cves_response.status_code == 200 | ||
assert filtered_cves_response.json["total_results"] == 1 | ||
assert filtered_cves_response.json["total_results"] > 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@carkod can I ask what the usefulness is of making this test less specific? We want to know that the correct number of cves are returned with this query, total results being > 1 seems like it could very easily lead to false positives here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well for the purposes of this feature, we have to get more than one result, but sure I can make it more specific.
3f5db8c
to
a107ae5
Compare
a107ae5
to
3bd6143
Compare
Done
Add fuzzy search for packages:
"mysql-8.0" returns an expected result for Ubuntu 22.04 LTS.
https://ubuntu.com/security/cves?q=&package=mysql-8.0
However, "mysql" doesn't contains expected result for Ubuntu 22.04 LTS.
https://ubuntu.com/security/cves?q=&package=mysql
The same condition applies to PostgreSQL.
"postgresql-14" works.
https://ubuntu.com/security/cves?q=&package=postgresql-14
However, "postgresql" doesn't contains expected result:
https://ubuntu.com/security/cves?q=&package=postgresql
QA
Issue / Card
Fixes https://warthogs.atlassian.net/browse/WD-4755