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

Spaces in vulnerability id in the main search box doesn't work. #64

Closed
adulau opened this issue Jul 27, 2024 · 5 comments
Closed

Spaces in vulnerability id in the main search box doesn't work. #64

adulau opened this issue Jul 27, 2024 · 5 comments
Assignees
Labels
enhancement New feature or request usability

Comments

@adulau
Copy link
Member

adulau commented Jul 27, 2024

I rectify, it seems some users put "space" in the ID and then the lookup doesn't work.

@adulau adulau added enhancement New feature or request usability labels Jul 27, 2024
@adulau adulau changed the title Adding a lookup per vulnerability id in the main page Spaces in vulnerability id in the main search box doesn't work. Jul 27, 2024
@oh2fih
Copy link

oh2fih commented Jul 27, 2024

Users do silly things in formatting strings; this is a problem that has been solved, e.g., for phone numbers. If we want to keep flexibility, we could normalize the IDs before indexing and before searching from the index.

cedricbonhomme added a commit that referenced this issue Jul 27, 2024
@adulau
Copy link
Member Author

adulau commented Jul 27, 2024

Indeed. Yep, I'm looking at the production logs of cve-search and vulnerability-lookup. There are a lot of inputs from different places that make no sense at all. Normalising vulnerability ID strings would make sense but we would need to do it for all the IDs that have as a source. Maybe a small library would make sense in the long run.

@cedricbonhomme
Copy link
Collaborator

cedricbonhomme commented Jul 27, 2024

Users do silly things in formatting strings; this is a problem that has been solved, e.g., for phone numbers. If we want to keep flexibility, we could normalize the IDs before indexing and before searching from the index.

Yes, It is good to check that the format of the IDs, per sources, is correct. For the moment I think that the workers do not change anything. The data is stored as it is. And the IDs are lowercased.


Just as a note and for information... I started to add JSON schema validation for the various endpoints of the API. For the comments, the bundles and of course the vulnerabilities that we can create for a local instance of vulnerability-lookup. But then, we have noticed (you should have noticed too, since long time I guess...) that it is not rare to see vulnerability advisories (from CVE v5, GSD, etc.) that do not respect their own schema. So we can not be too strict with the validation of the data. For example now when an admin user of a vulnerability-lookup instance creates a vulnerability advisory via the Vulnogram editor, the backend JSON validation is skipped. There is only the frontend validation (not blocking for the user).

@cedricbonhomme
Copy link
Collaborator

(normally my commit closes this ticket. let's see ;-)

@adulau
Copy link
Member Author

adulau commented Jul 27, 2024

You are right, for the import it's a different story. For the user interface (UI and API), normalising makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request usability
Projects
None yet
Development

No branches or pull requests

3 participants