google / osv.dev

Open source vulnerability DB and triage service.
https://osv.dev
Apache License 2.0
1.49k stars 186 forks source link

Put a Package/ID search box on the osv.dev main page #1802

Open maxfisher-g opened 10 months ago

maxfisher-g commented 10 months ago

Is your feature request related to a problem? Please describe. There is no search box present on the front page of osv.dev. In order to search osv.dev, you have to click on "Search Vulnerability Database", then click on the search box, then type your query. This requires two extra mouse clicks plus a page / screen change, which is excessive for such a core function of the website.

Describe the solution you'd like There should be a package / ID search box on the main page of osv.dev, which functions identically to the one on osv.dev/list. (i.e. when a search query is submitted, the page redirects to osv.dev/list).

The search box should be brought into focus immediately when the page is loaded. This means the user can type or paste a query into the search box without having to manually click (or tab) to bring it into focus. (An example is when you visit google.com).

As an extra bonus, the search box on osv.dev/list should also be autofocused when the page is loaded.

Describe alternatives you've considered Implement URL redirection so that navigating to osv.dev/<query> redirects to osv.dev/list and performs a search for <query>. This would be even more efficient, bypassing the main page completely, however this way of searching is less discoverable for a new user.

Additional context Having search functionality immediately available on the main page would greatly improve the usability and discoverability of the OSV search function, which I think is one of the primary functions of the osv.dev website.

andrewpollock commented 10 months ago

Describe alternatives you've considered Implement URL redirection so that navigating to osv.dev/<query> redirects to osv.dev/list and performs a search for <query>. This would be even more efficient, bypassing the main page completely, however this way of searching is less discoverable for a new user.

FYI, this is already the case, e.g. https://osv.dev/CVE-2023-4863

maxfisher-g commented 10 months ago

FYI, this is already the case, e.g. https://osv.dev/CVE-2023-4863

Oh cool! I didn't know that. But actually, I think these two search methods are complementary rather than true, mutually exclusive alternatives. One is UI-discoverable and friendly for new users, the other is more of a power-user feature. (The fact that I thought of this redirection but assumed it wasn't implemented so did not actually "discover it" kind of proves this).

maxfisher-g commented 10 months ago

FYI, this is already the case, e.g. https://osv.dev/CVE-2023-4863

Also, the URL redirection-based search is not fully complete, since navigating to e.g. osv.dev/CVE-2023-4 shows a 404 page, whereas it should probably redirect to https://osv.dev/list?ecosystem=&q=CVE-2023-4, to show a 'no results' page. (But this is a separate issue.)

maxfisher-g commented 10 months ago

Some inspiration: https://deps.dev/

github-actions[bot] commented 2 months ago

This issue has not had any activity for 60 days and will be automatically closed in two weeks

github-actions[bot] commented 2 days ago

This issue has not had any activity for 60 days and will be automatically closed in two weeks

See https://github.com/google/osv.dev/blob/master/CONTRIBUTING.md for how to contribute a PR if you're interested in helping out.