Drop OSVDB-derived OSV aliases from the rubygem data sources - #2423
Open
MGpromax wants to merge 1 commit into
Open
Drop OSVDB-derived OSV aliases from the rubygem data sources#2423MGpromax wants to merge 1 commit into
MGpromax wants to merge 1 commit into
Conversation
The rubysec advisory data carries references to the defunct OSVDB database in its osvdb field, and both the ruby importer and the v2 ruby importer pipeline turned these into OSV-<number> aliases. These are not public aliases and the prefix collides with the modern OSV.dev namespace. Remove the code that imports them and add a data migration deleting the previously imported ones from both the Alias and AdvisoryAlias tables. Genuine OSV.dev identifiers (OSV-<year>-<number>, with two hyphens) are preserved by the migration regex. Closes aboutcode-org#2421 Signed-off-by: Manoj Gowda <manojgowdabs18@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2421
The rubysec advisory data references the defunct OSVDB database in its
osvdbfield, and bothvulnerabilities/importers/ruby.pyandvulnerabilities/pipelines/v2_importers/ruby_importer.pyturned these intoOSV-<number>aliases -- not public aliases, and a prefix collision with the modern OSV.dev namespace.This PR:
osvdb->OSV-...alias code from both importers (theOSVDB-*.ymlfiles themselves were already skipped);0143_remove_rubygem_osvdb_aliasesdeleting previously imported ones from both theAlias(v1) andAdvisoryAlias(v2) tables. The regex^OSV-\d+$matches only the OSVDB-derived single-hyphen form, so genuine OSV.dev identifiers (OSV-<year>-<number>) are preserved.Testing: the ruby importer tests pass (
7 passed; the 4 errors intest_ruby_advisories_per_fileareTransactionManagementErrors that occur identically on a clean checkout in my sqlite environment and are unrelated).manage.py migrate --planincludes the new migration cleanly.