diff --git a/ecosystem.go b/ecosystem.go index 0ab806d..f9f6f49 100644 --- a/ecosystem.go +++ b/ecosystem.go @@ -29,13 +29,18 @@ var osvEcosystemNames = map[string]string{ "npm": "npm", "pypi": "PyPI", "cargo": "crates.io", + "conan": "ConanCenter", + "cran": "CRAN", "golang": "Go", + "hackage": "Hackage", ecosystemMaven: "Maven", + "julia": "Julia", "nuget": "NuGet", + "opam": "opam", "composer": "Packagist", "hex": "Hex", "pub": "Pub", - "cocoapods": "CocoaPods", + "swift": "SwiftURL", "githubactions": "GitHub Actions", } diff --git a/ecosystem_test.go b/ecosystem_test.go index 707f21f..4121f03 100644 --- a/ecosystem_test.go +++ b/ecosystem_test.go @@ -91,15 +91,21 @@ func TestEcosystemToOSV(t *testing.T) { {"gem", "RubyGems"}, {"pypi", "PyPI"}, {"cargo", "crates.io"}, + {"conan", "ConanCenter"}, + {"cran", "CRAN"}, {"golang", "Go"}, {"go", "Go"}, + {"hackage", "Hackage"}, {"maven", "Maven"}, + {"julia", "Julia"}, {"nuget", "NuGet"}, + {"opam", "opam"}, {"packagist", "Packagist"}, {"composer", "Packagist"}, {"hex", "Hex"}, {"pub", "Pub"}, - {"cocoapods", "CocoaPods"}, + {"cocoapods", "cocoapods"}, // falls through: OSV rejects CocoaPods + {"swift", "SwiftURL"}, {"github-actions", "GitHub Actions"}, {"unknown", "unknown"}, // falls through } @@ -123,13 +129,19 @@ func TestPURLTypeToOSV(t *testing.T) { {"npm", "npm", true}, {"pypi", "PyPI", true}, {"cargo", "crates.io", true}, + {"conan", "ConanCenter", true}, + {"cran", "CRAN", true}, {"golang", "Go", true}, + {"hackage", "Hackage", true}, {"maven", "Maven", true}, + {"julia", "Julia", true}, {"nuget", "NuGet", true}, + {"opam", "opam", true}, {"composer", "Packagist", true}, {"hex", "Hex", true}, {"pub", "Pub", true}, - {"cocoapods", "CocoaPods", true}, + {"cocoapods", "", false}, + {"swift", "SwiftURL", true}, {"githubactions", "GitHub Actions", true}, // Unknown types report ok=false with an empty string, unlike // EcosystemToOSV which passes the input through.