add poetry command (#67)

* add poetry command

* add poetry.lock extractor & define cmd parser for poetry

* feat: support Poetry caret/tilde version syntax

* add wildcard constraint support & test cases

* readme update

* chore: small fixes
This commit is contained in:
Sahil Bansal
2025-08-29 00:21:09 +05:30
committed by GitHub
parent 78bc6afa67
commit 12aaba8a05
11 changed files with 810 additions and 40 deletions
+3
View File
@@ -12,6 +12,7 @@ import (
"github.com/google/osv-scalibr/extractor/filesystem/language/javascript/bunlock"
"github.com/google/osv-scalibr/extractor/filesystem/language/javascript/packagelockjson"
"github.com/google/osv-scalibr/extractor/filesystem/language/javascript/pnpmlock"
"github.com/google/osv-scalibr/extractor/filesystem/language/python/poetrylock"
"github.com/google/osv-scalibr/extractor/filesystem/language/python/requirements"
"github.com/google/osv-scalibr/extractor/filesystem/language/python/uvlock"
"github.com/google/osv-scalibr/fs"
@@ -34,6 +35,8 @@ func getExtractorForFile(filename string) (filesystem.Extractor, error) {
return requirements.NewDefault(), nil
case filename == "uv.lock":
return uvlock.New(), nil
case filename == "poetry.lock":
return poetrylock.New(), nil
default:
return nil, fmt.Errorf("unsupported lockfile type: %s", filename)
}