google / google/osv.dev

OSV.dev API doesn't respect .nuspec package id case-insensitivity

Open
#5,292 1 comment 1 reaction 1 assignee Claimed by @michaelkedar View on GitHub
Dominant language
Go
Stars
2.9k
Forks
369
Avg merge
1d 17h
Merged PRs (30d)
149

Description

**Describe the bug**
The .nuspec specification indicate that [package id is case-insensitive](https://learn.microsoft.com/en-us/nuget/reference/nuspec#id). However, the OSV.dev API is case-sensitive for NuGet package id.

**To Reproduce**
Steps to reproduce the behaviour:
1. Calling the following don't return any vulnerabilities:
```
curl -d \
'{"package": {"name": "snowflake.Data", "ecosystem": "NuGet"}, "version": "2.1.2"}' \
"https://api.osv.dev/v1/query"
```
2. Calling the following return three vulnerabilities:
```
curl -d \
'{"package": {"name": "Snowflake.Data", "ecosystem": "NuGet"}, "version": "2.1.2"}' \
"https://api.osv.dev/v1/query"
```

**Expected behaviour**
The OSV.dev API respect the .nuspec specification case-insensitivity for package id. Invoking the API for NuGet package id ``snowflake.Data`` should return the same results as for ``Snowflake.Data`` for a given version.

**Screenshots**

Calling the API for ``snowflake.Data``:

Image

Calling the API for ``Snowflake.Data``:

Image

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.