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

Feature: map the current Dependencydiff package naming convention (GitHub) to OSV #2078

Closed
aidenwang9867 opened this issue Jul 19, 2022 · 0 comments · Fixed by #2088
Closed
Labels
kind/enhancement New feature or request

Comments

@aidenwang9867
Copy link
Contributor

aidenwang9867 commented Jul 19, 2022

Is your feature request related to a problem? Please describe.
In v0 of the API/CLI Dependencydiff (PR #2046/PR #2077), the formats (convention) of dependency fields like the package ecosystem (GH uses pypi for python pkgs whereas OSV uses pip) follow the GitHub naming convention. Examples:

[
  {
    "changeType": "added",
    "packageUrl": "pkg:golang/github.com/google/go-github/v35@35.2.0",
    "sourceRepository": null,
    "manifestPath": "go.mod",
    "ecosystem": "gomod",
    "version": "35.2.0",
    "name": "github.com/google/go-github/v35",
  },
  {
    "changeType": "updated",
    "packageUrl": "pkg:golang/gocloud.dev@0.23.0",
    "sourceRepository": "https://github.com/google/go-cloud",
    "manifestPath": "go.mod",
    "ecosystem": "gomod",
    "version": "0.23.0",
    "name": "gocloud.dev",
  },
]

Describe the solution you'd like
By @laurentsimon: since we may use a different Dependency-diff source API in the future, it would be nice not to get stuck using GH naming convention.

I can do the ecosystem mapping using this list (near The defined ecosystems are:), by defining a static map in the scorecard code to convert the GH ecosystems to the OSV ones. I'll use a follow-up PR to do this mapping very soon.

@aidenwang9867 aidenwang9867 added the kind/enhancement New feature or request label Jul 19, 2022
@aidenwang9867 aidenwang9867 changed the title Feature: convert the current Dependencydiff package naming convention (GitHub) to the OSV naming convention Feature: map the current Dependencydiff package naming convention (GitHub) to OSV Jul 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
None yet
1 participant