nexB / purldb

Tools to create and expose a database of purls (Package URLs). This project is sponsored by NLnet project https://nlnet.nl/project/vulnerabilitydatabase/ and nexB for https://www.aboutcode.org/ Chat is at https://gitter.im/aboutcode-org/discuss
https://purldb.readthedocs.io/
29 stars 20 forks source link

Fixes Github Mapper route #370

Closed 404-geek closed 3 months ago

404-geek commented 3 months ago

The github mapper function (minecode/mappers/github.py) is having issues where the github urls fetched in run_visit command are not able to parse and are failing to get added into DB.

This is because of the improper router regex in the mapper file.

@map_router.route('https://api.github.com/repos/[\w\-\.]/[\w\-\.]')

The below regex url is able to parse the urls successfully

@map_router.route('https://api\.github\.com/repos/([^/]+)/([^/]+)')