You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Latest version of grype with V6 schema lists incorrect URL for v6 databases
grype db list
Status: active
Schema: v6.0.2
Built: 2025-03-07T04:06:47Z
Listing: https://grype.anchore.io/databases
DB URL: https://grype.anchore.io/vulnerability-db_v6.0.2_2025-03-07T01:30:57Z_1741320407.tar.zst
Checksum: sha256:b49ecadd781dbb5376cce851c044d9987fba100ebaa0f7bd2316d07fe8718404
$ grype db list
Status: active
Schema: v6.0.2
Built: 2025-03-07T04:06:47Z
Listing: https://grype.anchore.io/databases
DB URL: https://grype.anchore.io/vulnerability-db_v6.0.2_2025-03-07T01:30:57Z_1741320407.tar.zst
Checksum: sha256:b49ecadd781dbb5376cce851c044d9987fba100ebaa0f7bd2316d07fe8718404
There is a function that takes the "base" URL (e.g. https://grype.anchore.io/databases) and based on the schema version / direct JSON link / etc. returns the correct link. I think we just need to use that function to get the listing file in the command here, and adjust the relative database links accordingly: https://github.com/anchore/grype/blob/main/cmd/grype/cli/commands/db_list.go#L65
What happened:
Latest version of grype with V6 schema lists incorrect URL for v6 databases
Bbut the actual URL is https://grype.anchore.io/databases/v6/vulnerability-db_v6.0.2_2025-03-07T01:30:57Z_1741320407.tar.zst and the listing URL is https://grype.anchore.io/databases/v6
What you expected to happen:
I expect to see a URL I can click on to download the DB
How to reproduce it (as minimally and precisely as possible):
Use
grype db list
and observe the URLOne liner
curl --silent --head --output /dev/null --write-out "%{http_code}\n" $(grype db list | grep "DB URL" | awk -F" " '{print $2}')
should return 200. Not 404Environment:
Output of
grype version
:0.89.0 - commit 1bf47c3
OS (e.g:
cat /etc/os-release
or similar):The text was updated successfully, but these errors were encountered: