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

Search for existing commits case-insensitively #2182

Merged

Conversation

andrewpollock
Copy link
Contributor

Also stop looking once one's been found.

While eyeballing the cleanup in staging I noticed some records being deleted that were not expected, and it was because they had previous converted when they only had commit references, but then didn't once they had versions and the commit references, due to this case-sensitivity mishandling the situation.

Also stop looking once one's been found.

While eyeballing the cleanup in staging I noticed some records being
deleted that were not expected, and it was because they had previous
converted when they only had commit references, but then didn't once
they had versions and the commit references, due to this
case-sensitivity mishandling the situation.
@andrewpollock andrewpollock enabled auto-merge (squash) May 8, 2024 09:06
@andrewpollock andrewpollock merged commit afcc49c into google:master May 8, 2024
11 checks passed
andrewpollock added a commit to andrewpollock/osv.dev that referenced this pull request May 10, 2024
Problem: google#2182 made checks for existing commits case-insensitive by
repo, but left the underlying repo string alone. There are a lot of
mixed-case GitHub repos in existence, because cves.extractGitCommit()
takes the repo verbatim.

vulns.AddPkgInfo() aggregates events by repo, case insensitively, so was
producing incorrect GIT events.

GitHub repo names are known to be case insensitive, so this is safe for
them. It's definitively less safe for other URLs, so limit to just them
for now.
andrewpollock added a commit that referenced this pull request May 10, 2024
Problem: #2182 made checks for existing commits case-insensitive by
repo, but left the underlying repo string alone. There are a lot of
mixed-case GitHub repos in existence, because `cves.extractGitCommit()`
takes the repo verbatim.

`vulns.AddPkgInfo()` aggregates events by repo, case insensitively, so
was producing incorrect GIT events.

GitHub repo names are known to be case insensitive, so this is safe for
them. It's definitively less safe for other URLs, so limit to just them
for now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants